Skip to content

Commit 66f195b

Browse files
authored
Cerebras exception correction, added Gemini installation advice (microsoft#66)
1 parent e318461 commit 66f195b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autogen/oai/client.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959

6060
cerebras_import_exception: Optional[ImportError] = None
6161
except ImportError as e:
62+
cerebras_AuthenticationError = cerebras_InternalServerError = cerebras_RateLimitError = Exception
6263
cerebras_import_exception = e
6364

6465
try:
@@ -577,7 +578,7 @@ def _register_default_client(self, config: Dict[str, Any], openai_config: Dict[s
577578
self._clients.append(client)
578579
elif api_type is not None and api_type.startswith("google"):
579580
if gemini_import_exception:
580-
raise ImportError("Please install `google-generativeai` to use Google OpenAI API.")
581+
raise ImportError("Please install `google-generativeai` and 'vertexai' to use Google's API.")
581582
client = GeminiClient(**openai_config)
582583
self._clients.append(client)
583584
elif api_type is not None and api_type.startswith("anthropic"):

0 commit comments

Comments
 (0)