diff --git a/google/genai/_interactions/_exceptions.py b/google/genai/_interactions/_exceptions.py index c2c87e8d8..0b8bc6eb0 100644 --- a/google/genai/_interactions/_exceptions.py +++ b/google/genai/_interactions/_exceptions.py @@ -44,7 +44,8 @@ class APIError(GeminiNextGenAPIClientError): body: object | None """The API response body. - If the API responded with a valid JSON structure then this property will be the decoded result. + If the API responded with a valid JSON structure then this property will be the + decoded result. If it isn't a valid JSON structure then this will be the raw response. diff --git a/google/genai/_interactions/resources/interactions.py b/google/genai/_interactions/resources/interactions.py index 9d7a535df..46c39e24a 100644 --- a/google/genai/_interactions/resources/interactions.py +++ b/google/genai/_interactions/resources/interactions.py @@ -102,8 +102,8 @@ def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -167,8 +167,8 @@ def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -228,8 +228,8 @@ def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -293,8 +293,8 @@ def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -356,8 +356,8 @@ def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -496,7 +496,8 @@ def cancel( ) -> Interaction: """Cancels an interaction by id. - This only applies to background interactions that are still running. + This only applies to background interactions that + are still running. Args: extra_headers: Send extra headers @@ -537,10 +538,12 @@ def get( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Interaction: """ - Retrieves the full details of a single interaction based on its `Interaction.id`. + Retrieves the full details of a single interaction based on its + `Interaction.id`. Args: - last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true. + last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the + event marked by the event id. Can only be used if `stream` is true. stream: If set to true, the generated content will be streamed incrementally. @@ -570,12 +573,14 @@ def get( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Stream[InteractionSSEEvent]: """ - Retrieves the full details of a single interaction based on its `Interaction.id`. + Retrieves the full details of a single interaction based on its + `Interaction.id`. Args: stream: If set to true, the generated content will be streamed incrementally. - last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true. + last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the + event marked by the event id. Can only be used if `stream` is true. extra_headers: Send extra headers @@ -603,12 +608,14 @@ def get( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Interaction | Stream[InteractionSSEEvent]: """ - Retrieves the full details of a single interaction based on its `Interaction.id`. + Retrieves the full details of a single interaction based on its + `Interaction.id`. Args: stream: If set to true, the generated content will be streamed incrementally. - last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true. + last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the + event marked by the event id. Can only be used if `stream` is true. extra_headers: Send extra headers @@ -719,8 +726,8 @@ async def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -784,8 +791,8 @@ async def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -845,8 +852,8 @@ async def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -910,8 +917,8 @@ async def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -973,8 +980,8 @@ async def create( previous_interaction_id: The ID of the previous interaction, if any. - response_format: Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + response_format: Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. response_mime_type: The mime type of the response. This is required if response_format is set. @@ -1113,7 +1120,8 @@ async def cancel( ) -> Interaction: """Cancels an interaction by id. - This only applies to background interactions that are still running. + This only applies to background interactions that + are still running. Args: extra_headers: Send extra headers @@ -1154,10 +1162,12 @@ async def get( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Interaction: """ - Retrieves the full details of a single interaction based on its `Interaction.id`. + Retrieves the full details of a single interaction based on its + `Interaction.id`. Args: - last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true. + last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the + event marked by the event id. Can only be used if `stream` is true. stream: If set to true, the generated content will be streamed incrementally. @@ -1187,12 +1197,14 @@ async def get( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncStream[InteractionSSEEvent]: """ - Retrieves the full details of a single interaction based on its `Interaction.id`. + Retrieves the full details of a single interaction based on its + `Interaction.id`. Args: stream: If set to true, the generated content will be streamed incrementally. - last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true. + last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the + event marked by the event id. Can only be used if `stream` is true. extra_headers: Send extra headers @@ -1220,12 +1232,14 @@ async def get( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Interaction | AsyncStream[InteractionSSEEvent]: """ - Retrieves the full details of a single interaction based on its `Interaction.id`. + Retrieves the full details of a single interaction based on its + `Interaction.id`. Args: stream: If set to true, the generated content will be streamed incrementally. - last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true. + last_event_id: Optional. If set, resumes the interaction stream from the next chunk after the + event marked by the event id. Can only be used if `stream` is true. extra_headers: Send extra headers diff --git a/google/genai/_interactions/types/annotation.py b/google/genai/_interactions/types/annotation.py index 3fc2f9234..099fe9dec 100644 --- a/google/genai/_interactions/types/annotation.py +++ b/google/genai/_interactions/types/annotation.py @@ -31,8 +31,7 @@ class Annotation(BaseModel): source: Optional[str] = None """Source attributed for a portion of the text. - Could be a URL, title, or - other identifier. + Could be a URL, title, or other identifier. """ start_index: Optional[int] = None diff --git a/google/genai/_interactions/types/annotation_param.py b/google/genai/_interactions/types/annotation_param.py index 649c1e510..50dd05c24 100644 --- a/google/genai/_interactions/types/annotation_param.py +++ b/google/genai/_interactions/types/annotation_param.py @@ -31,8 +31,7 @@ class AnnotationParam(TypedDict, total=False): source: str """Source attributed for a portion of the text. - Could be a URL, title, or - other identifier. + Could be a URL, title, or other identifier. """ start_index: int diff --git a/google/genai/_interactions/types/interaction_create_params.py b/google/genai/_interactions/types/interaction_create_params.py index c1e50aac2..1e51b0518 100644 --- a/google/genai/_interactions/types/interaction_create_params.py +++ b/google/genai/_interactions/types/interaction_create_params.py @@ -77,8 +77,8 @@ class BaseCreateModelInteractionParams(TypedDict, total=False): response_format: object """ - Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. """ response_mime_type: str @@ -141,8 +141,8 @@ class BaseCreateAgentInteractionParams(TypedDict, total=False): response_format: object """ - Enforces that the generated response is a JSON object that complies with - the JSON schema specified in this field. + Enforces that the generated response is a JSON object that complies with the + JSON schema specified in this field. """ response_mime_type: str diff --git a/google/genai/_interactions/types/interaction_get_params.py b/google/genai/_interactions/types/interaction_get_params.py index ffbf07ff1..dcec4fbdd 100644 --- a/google/genai/_interactions/types/interaction_get_params.py +++ b/google/genai/_interactions/types/interaction_get_params.py @@ -29,7 +29,8 @@ class InteractionGetParamsBase(TypedDict, total=False): last_event_id: str """Optional. - If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true. + If set, resumes the interaction stream from the next chunk after the event + marked by the event id. Can only be used if `stream` is true. """ diff --git a/google/genai/_interactions/types/tool.py b/google/genai/_interactions/types/tool.py index 373d49782..e5ee8aba5 100644 --- a/google/genai/_interactions/types/tool.py +++ b/google/genai/_interactions/types/tool.py @@ -73,10 +73,7 @@ class MCPServer(BaseModel): """The name of the MCPServer.""" url: Optional[str] = None - """ - The full URL for the MCPServer endpoint. - Example: "https://api.example.com/mcp" - """ + """The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp" """ class FileSearch(BaseModel): diff --git a/google/genai/_interactions/types/tool_param.py b/google/genai/_interactions/types/tool_param.py index 08b6bb93d..a394274d1 100644 --- a/google/genai/_interactions/types/tool_param.py +++ b/google/genai/_interactions/types/tool_param.py @@ -73,10 +73,7 @@ class MCPServer(TypedDict, total=False): """The name of the MCPServer.""" url: str - """ - The full URL for the MCPServer endpoint. - Example: "https://api.example.com/mcp" - """ + """The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp" """ class FileSearch(TypedDict, total=False): diff --git a/google/genai/_interactions/types/turn.py b/google/genai/_interactions/types/turn.py index b769c7686..15e82bb28 100644 --- a/google/genai/_interactions/types/turn.py +++ b/google/genai/_interactions/types/turn.py @@ -28,8 +28,4 @@ class Turn(BaseModel): """The content of the turn.""" role: Optional[str] = None - """The originator of this turn. - - Must be user for input or model for - model output. - """ + """The originator of this turn. Must be user for input or model for model output.""" diff --git a/google/genai/_interactions/types/turn_param.py b/google/genai/_interactions/types/turn_param.py index e55030db1..54bb270aa 100644 --- a/google/genai/_interactions/types/turn_param.py +++ b/google/genai/_interactions/types/turn_param.py @@ -30,8 +30,4 @@ class TurnParam(TypedDict, total=False): """The content of the turn.""" role: str - """The originator of this turn. - - Must be user for input or model for - model output. - """ + """The originator of this turn. Must be user for input or model for model output."""