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:
Sugato Ray 2024-07-21 01:12:15 -04:00 committed by GitHub
parent d1d4b10479
commit 2887e0757e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -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