From 847c8fd11adf55f6adad48707cf682732f3d539c Mon Sep 17 00:00:00 2001 From: Alan <60404530+BloodBoy21@users.noreply.github.com> Date: Mon, 12 May 2025 11:17:23 -0700 Subject: [PATCH] Copybara import of the project: -- d481e0604a79470e2c1308827b3ecb78bfb5327e by Alan B : feat: :construction: catch user transcription -- bba436bb76d1d2f9d5ba969fce38ff8b8a443254 by Alan B : feat: :sparkles: send user transcription event as llm_response -- ad2abf540c60895b79c50f9051a6289ce394b98d by Alan B : style: :lipstick: update lint problems -- 744703c06716300c0f9f41633d3bafdf4cb180a1 by Hangfei Lin : fix: set right order for input transcription -- 31a5d42d6155b0e5caad0c73c8df43255322016f by Hangfei Lin : remove print -- 59e5d9c72060f97d124883150989315401a4c1b5 by Hangfei Lin : remove api version COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/590 from BloodBoy21:feat/api-version-vertex 1ed855249cae398b40691b91c6e468bccec07a3a PiperOrigin-RevId: 757840099 --- src/google/adk/models/google_llm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/google/adk/models/google_llm.py b/src/google/adk/models/google_llm.py index 342d8bc..e4f21e5 100644 --- a/src/google/adk/models/google_llm.py +++ b/src/google/adk/models/google_llm.py @@ -174,9 +174,11 @@ class Gemini(BaseLlm): @cached_property def _live_api_client(self) -> Client: if self._api_backend == 'vertex': + #use beta version for vertex api + api_version = 'v1beta1' # use default api version for vertex return Client( - http_options=types.HttpOptions(headers=self._tracking_headers) + http_options=types.HttpOptions(headers=self._tracking_headers,api_version=api_version) ) else: # use v1alpha for ml_dev