google-genai 0.6.0__py3-none-any.whl → 0.8.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
google/genai/client.py CHANGED
@@ -149,49 +149,43 @@ class Client:
149
149
  ):
150
150
  """Initializes the client.
151
151
 
152
- Args:
153
- vertexai (bool):
154
- Indicates whether the client should use the Vertex AI
155
- API endpoints. Defaults to False (uses Gemini Developer API
156
- endpoints). Applies to the Vertex AI API only.
157
- api_key (str):
158
- The `API key
159
- <https://ai.google.dev/gemini-api/docs/api-key>`_ to use for
160
- authentication. Applies to the Gemini Developer API only.
161
- credentials (google.auth.credentials.Credentials):
162
- The credentials to
163
- use for authentication when calling the Vertex AI APIs. Credentials
164
- can be obtained from environment variables and default credentials.
165
- For more information, see `Set up Application Default Credentials
166
- <https://cloud.google.com/docs/authentication/provide-credentials-adc>`_.
167
- Applies to the Vertex AI API only.
168
- project (str):
169
- The `Google Cloud project ID
170
- <https://cloud.google.com/vertex-ai/docs/start/cloud-environment>`_ to
171
- use for quota. Can be obtained from environment variables (for
172
- example, ``GOOGLE_CLOUD_PROJECT``). Applies to the Vertex AI API only.
173
- location (str):
174
- The `location
175
- <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations>`_
176
- to send API requests to (for example, ``us-central1``). Can be
177
- obtained from environment variables. Applies to the Vertex AI API
178
- only.
179
- debug_config (DebugConfig):
180
- Config settings that control network
181
- behavior of the client. This is typically used when running test code.
182
- http_options (Union[HttpOptions, HttpOptionsDict]):
183
- Http options to use for the client. Response_payload can't be
184
- set when passing to the client constructor.
152
+ Args:
153
+ vertexai (bool): Indicates whether the client should use the Vertex AI
154
+ API endpoints. Defaults to False (uses Gemini Developer API endpoints).
155
+ Applies to the Vertex AI API only.
156
+ api_key (str): The `API key
157
+ <https://ai.google.dev/gemini-api/docs/api-key>`_ to use for
158
+ authentication. Applies to the Gemini Developer API only.
159
+ credentials (google.auth.credentials.Credentials): The credentials to use
160
+ for authentication when calling the Vertex AI APIs. Credentials can be
161
+ obtained from environment variables and default credentials. For more
162
+ information, see `Set up Application Default Credentials
163
+ <https://cloud.google.com/docs/authentication/provide-credentials-adc>`_.
164
+ Applies to the Vertex AI API only.
165
+ project (str): The `Google Cloud project ID
166
+ <https://cloud.google.com/vertex-ai/docs/start/cloud-environment>`_ to
167
+ use for quota. Can be obtained from environment variables (for example,
168
+ ``GOOGLE_CLOUD_PROJECT``). Applies to the Vertex AI API only.
169
+ location (str): The `location
170
+ <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations>`_
171
+ to send API requests to (for example, ``us-central1``). Can be obtained
172
+ from environment variables. Applies to the Vertex AI API only.
173
+ debug_config (DebugConfig): Config settings that control network behavior
174
+ of the client. This is typically used when running test code.
175
+ http_options (Union[HttpOptions, HttpOptionsDict]): Http options to use
176
+ for the client. The field deprecated_response_payload should not be set
177
+ in http_options.
185
178
  """
186
179
 
187
180
  self._debug_config = debug_config or DebugConfig()
188
181
 
189
- # Throw ValueError if response_payload is set in http_options due to
190
- # unpredictable behavior when running multiple coroutines through
182
+ # Throw ValueError if deprecated_response_payload is set in http_options
183
+ # due to unpredictable behavior when running multiple coroutines through
191
184
  # client.aio.
192
- if http_options and 'response_payload' in http_options:
185
+ if http_options and 'deprecated_response_payload' in http_options:
193
186
  raise ValueError(
194
- 'Setting response_payload in http_options is not supported.'
187
+ 'Setting deprecated_response_payload in http_options is not'
188
+ ' supported.'
195
189
  )
196
190
 
197
191
  self._api_client = self._get_api_client(