Skip to content

Commit

Permalink
fix: update method name in GeminiClient (microsoft#3007)
Browse files Browse the repository at this point in the history
- change from `_initialize_vartexai` to `_initialize_vertexai`

Co-authored-by: HRUSHIKESH DOKALA <[email protected]>
  • Loading branch information
sugatoray and Hk669 authored Jul 21, 2024
1 parent d1d4b10 commit 2887e07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autogen/oai/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -106,7 +106,7 @@ def __init__(self, **kwargs):
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:
Expand Down Expand Up @@ -142,7 +142,7 @@ def get_usage(response) -> Dict:

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
Expand Down

0 comments on commit 2887e07

Please sign in to comment.