-
Notifications
You must be signed in to change notification settings - Fork 15.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mask API key for Anyscale chat model #12419
Mask API key for Anyscale chat model #12419
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
8089afb
to
5f63da9
Compare
@@ -67,12 +74,13 @@ def lc_secrets(self) -> Dict[str, str]: | |||
|
|||
@staticmethod | |||
def get_available_models( | |||
anyscale_api_key: Optional[str] = None, | |||
anyscale_api_key: Optional[SecretStr] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The static method is public, let's accept Optional[Union[str, SecretStr]]
and leverage _to_secret
once again to avoid breaking API for any existing users that rely on the staticmethod directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've addressed this comment this new commit dcbb17f
Looks good we let's update the static method to also handle |
) | ||
|
||
|
||
@pytest.mark.requires("openai") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more thing that i noticed -- anyscale doesn't use openai under the hood, so we don't need to use requirs("openai")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh sorry totally wrong -- yes it does use openai, so this is fine
@aidoskanapyanov i think we can close this one since you've already taken care of the code in: #12406 ? |
@eyurtsev ok 👍 |
Description: Add masking of API Key for Anyscale chat model when printed.
Issue: #12165
Dependencies: None
Tag maintainer: @eyurtsev