Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update method name in GeminiClient #3007

Merged
merged 2 commits into from
Jul 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading