You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m getting the following warning. My agents still work but this warning is annoying.
[autogen.oai.client: 09-15 17:51:15] {184} WARNING - The API key specified is not a valid OpenAI format; it won't work with the OpenAI-hosted model.
I was told in the most recent update of autogen you guys implemented the following but it seems to be still presenting this warning.
def is_valid_api_key(api_key: str) -> bool:
"""Determine if input is valid OpenAI API key.
Args:
api_key (str): An input string to be validated.
Returns:
bool: A boolean that indicates if input is valid OpenAI API key.
"""
api_key_re = re.compile(r"^sk-([A-Za-z0-9]+(-+[A-Za-z0-9]+)*-)?[A-Za-z0-9]{32,}$")
return bool(re.fullmatch(api_key_re, api_key))
Steps to reproduce
No response
Model Used
Gpt4o
Expected Behavior
No warning should be given.
Screenshots and logs
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
I’m getting the following warning. My agents still work but this warning is annoying.
[autogen.oai.client: 09-15 17:51:15] {184} WARNING - The API key specified is not a valid OpenAI format; it won't work with the OpenAI-hosted model.
I was told in the most recent update of autogen you guys implemented the following but it seems to be still presenting this warning.
def is_valid_api_key(api_key: str) -> bool:
"""Determine if input is valid OpenAI API key.
Steps to reproduce
No response
Model Used
Gpt4o
Expected Behavior
No warning should be given.
Screenshots and logs
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: