Skip to content

Commit

Permalink
Update error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaranvpl committed Jan 29, 2025
1 parent 666bb62 commit 27cb917
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autogen/oai/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
gemini_import_exception: Optional[ImportError] = None
else:
gemini_InternalServerError = gemini_ResourceExhausted = Exception # noqa: N816
gemini_import_exception = ImportError("google-generativeai not found")
gemini_import_exception = ImportError("google-genai not found")

with optional_import_block() as anthropic_result:
from anthropic import ( # noqa
Expand Down Expand Up @@ -756,7 +756,7 @@ def _register_default_client(self, config: dict[str, Any], openai_config: dict[s
self._clients.append(client)
elif api_type is not None and api_type.startswith("google"):
if gemini_import_exception:
raise ImportError("Please install `google-generativeai` and 'vertexai' to use Google's API.")
raise ImportError("Please install `google-genai` and 'vertexai' to use Google's API.")
client = GeminiClient(response_format=response_format, **openai_config)
self._clients.append(client)
elif api_type is not None and api_type.startswith("anthropic"):
Expand Down

0 comments on commit 27cb917

Please sign in to comment.