From 1db75d2828046b591d3709e99e8fb7170c3fdca1 Mon Sep 17 00:00:00 2001 From: Ayush Agrawal Date: Mon, 15 Jun 2026 17:08:00 -0700 Subject: [PATCH] docs: fix typos across docstrings PiperOrigin-RevId: 932749755 --- google/genai/file_search_stores.py | 9 +++++---- google/genai/files.py | 12 +++++++----- google/genai/types.py | 20 ++++++++++---------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/google/genai/file_search_stores.py b/google/genai/file_search_stores.py index 716f59de4..330bd437f 100644 --- a/google/genai/file_search_stores.py +++ b/google/genai/file_search_stores.py @@ -803,7 +803,8 @@ def upload_to_file_search_store( binary mode. In other words, do not use non-blocking mode or text mode. The given stream must be seekable, that is, it must be able to call `seek()` on 'path'. - config: Optional parameters to set `diplay_name`, `mime_type`, and others. + config: Optional parameters to set `display_name`, `mime_type`, and + others. """ if self._api_client.vertexai: raise ValueError( @@ -839,7 +840,7 @@ def upload_to_file_search_store( ) ): raise KeyError( - 'Failed to upload file to file search store. Upload URL did not' + 'Failed to upload file to file search store. Upload URL was not' ' returned from the upload request.' ) elif 'x-goog-upload-url' in response.sdk_http_response.headers: @@ -1432,7 +1433,7 @@ async def upload_to_file_search_store( binary mode. In other words, do not use non-blocking mode or text mode. The given stream must be seekable, that is, it must be able to call `seek()` on 'path'. - config: Optional parameters to set `diplay_name`, `mime_type` and others. + config: Optional parameters to set `display_name`, `mime_type` and others. """ if self._api_client.vertexai: raise ValueError( @@ -1468,7 +1469,7 @@ async def upload_to_file_search_store( ) ): raise KeyError( - 'Failed to upload file to file search store. Upload URL did not' + 'Failed to upload file to file search store. Upload URL was not' ' returned from the upload request.' ) elif 'x-goog-upload-url' in response.sdk_http_response.headers: diff --git a/google/genai/files.py b/google/genai/files.py index 6057a20bd..1933f0416 100644 --- a/google/genai/files.py +++ b/google/genai/files.py @@ -588,7 +588,8 @@ def upload( binary mode. In other words, do not use non-blocking mode or text mode. The given stream must be seekable, that is, it must be able to call `seek()` on 'path'. - config: Optional parameters to set `diplay_name`, `mime_type`, and `name`. + config: Optional parameters to set `display_name`, `mime_type`, and + `name`. """ if self._api_client.vertexai: raise ValueError( @@ -630,7 +631,7 @@ def upload( or 'x-goog-upload-url' not in response.sdk_http_response.headers ): raise KeyError( - 'Failed to create file. Upload URL did not returned from the create' + 'Failed to create file. Upload URL was not returned from the create' ' file request.' ) upload_url = response.sdk_http_response.headers['x-goog-upload-url'] @@ -1207,7 +1208,8 @@ async def upload( binary mode. In other words, do not use non-blocking mode or text mode. The given stream must be seekable, that is, it must be able to call `seek()` on 'path'. - config: Optional parameters to set `diplay_name`, `mime_type`, and `name`. + config: Optional parameters to set `display_name`, `mime_type`, and + `name`. """ if self._api_client.vertexai: raise ValueError( @@ -1251,7 +1253,7 @@ async def upload( ) ): raise KeyError( - 'Failed to create file. Upload URL did not returned from the create' + 'Failed to create file. Upload URL was not returned from the create' ' file request.' ) elif 'x-goog-upload-url' in response.sdk_http_response.headers: @@ -1282,7 +1284,7 @@ async def download( ) -> bytes: """Downloads a file's data from the file service. - The Gemini Enterprise Agent Platform implementation of the API foes not + The Gemini Enterprise Agent Platform implementation of the API does not include the file service. Files created by `upload` can't be downloaded. You can tell which files are diff --git a/google/genai/types.py b/google/genai/types.py index 5efe172fc..c43b58c3c 100644 --- a/google/genai/types.py +++ b/google/genai/types.py @@ -17444,7 +17444,7 @@ class InlinedEmbedContentResponseDict(TypedDict, total=False): class BatchJobDestination(_common.BaseModel): - """Config for `des` parameter.""" + """Config for `dest` parameter.""" format: Optional[str] = Field( default=None, @@ -17495,7 +17495,7 @@ class BatchJobDestination(_common.BaseModel): class BatchJobDestinationDict(TypedDict, total=False): - """Config for `des` parameter.""" + """Config for `dest` parameter.""" format: Optional[str] """Storage format of the output files. Must be one of: @@ -19591,9 +19591,9 @@ class LiveServerSessionResumptionUpdate(_common.BaseModel): default=None, description="""Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set. -Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM). +Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM). -Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed.""", +Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames are likely not needed.""", ) @@ -19612,9 +19612,9 @@ class LiveServerSessionResumptionUpdateDict(TypedDict, total=False): last_consumed_client_message_index: Optional[int] """Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set. -Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM). +Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM). -Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed.""" +Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames are likely not needed.""" LiveServerSessionResumptionUpdateOrDict = Union[ @@ -21748,7 +21748,7 @@ class UserContent(Content): - Create a user Content object with a string: user_content = UserContent("Why is the sky blue?") - Create a user Content object with a file data Part object: - user_content = UserContent(Part.from_uri(file_uril="gs://bucket/file.txt", + user_content = UserContent(Part.from_uri(file_uri="gs://bucket/file.txt", mime_type="text/plain")) - Create a user Content object with byte data Part object: user_content = UserContent(Part.from_bytes(data=b"Hello, World!", @@ -21778,7 +21778,7 @@ class ModelContent(Content): - Create a model Content object with a string: model_content = ModelContent("Why is the sky blue?") - Create a model Content object with a file data Part object: - model_content = ModelContent(Part.from_uri(file_uril="gs://bucket/file.txt", + model_content = ModelContent(Part.from_uri(file_uri="gs://bucket/file.txt", mime_type="text/plain")) - Create a model Content object with byte data Part object: model_content = ModelContent(Part.from_bytes(data=b"Hello, World!", @@ -22284,7 +22284,7 @@ class LLMBasedMetricSpecDict(TypedDict, total=False): class CustomCodeExecutionSpec(_common.BaseModel): - """Specificies a metric that is computed by running user-defined Python functions remotely.""" + """Specifies a metric that is computed by running user-defined Python functions remotely.""" evaluation_function: Optional[str] = Field( default=None, @@ -22298,7 +22298,7 @@ def evaluate(instance: dict[str, Any]) -> float: class CustomCodeExecutionSpecDict(TypedDict, total=False): - """Specificies a metric that is computed by running user-defined Python functions remotely.""" + """Specifies a metric that is computed by running user-defined Python functions remotely.""" evaluation_function: Optional[str] """A string representing a user-defined function for evaluation.