mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
fix: update method name in GeminiClient (#3007)
- change from `_initialize_vartexai` to `_initialize_vertexai` Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
This commit is contained in:
@@ -72,7 +72,7 @@ class GeminiClient:
|
||||
"max_output_tokens": "max_output_tokens",
|
||||
}
|
||||
|
||||
def _initialize_vartexai(self, **params):
|
||||
def _initialize_vertexai(self, **params):
|
||||
if "google_application_credentials" in params:
|
||||
# Path to JSON Keyfile
|
||||
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = params["google_application_credentials"]
|
||||
@@ -106,7 +106,7 @@ class GeminiClient:
|
||||
self.api_key = os.getenv("GOOGLE_API_KEY")
|
||||
if self.api_key is None:
|
||||
self.use_vertexai = True
|
||||
self._initialize_vartexai(**kwargs)
|
||||
self._initialize_vertexai(**kwargs)
|
||||
else:
|
||||
self.use_vertexai = False
|
||||
else:
|
||||
@@ -142,7 +142,7 @@ class GeminiClient:
|
||||
|
||||
def create(self, params: Dict) -> ChatCompletion:
|
||||
if self.use_vertexai:
|
||||
self._initialize_vartexai(**params)
|
||||
self._initialize_vertexai(**params)
|
||||
else:
|
||||
assert ("project_id" not in params) and (
|
||||
"location" not in params
|
||||
|
||||
Reference in New Issue
Block a user