google-genai 1.60.0__tar.gz → 1.62.0__tar.gz
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-1.60.0/google_genai.egg-info → google_genai-1.62.0}/PKG-INFO +1 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_base_client.py +5 -2
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_compat.py +3 -3
- google_genai-1.62.0/google/genai/_interactions/_utils/_json.py +50 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/resources/interactions.py +50 -28
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/__init__.py +2 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/content_delta.py +1 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/function_result_content.py +2 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/function_result_content_param.py +4 -4
- google_genai-1.60.0/google/genai/_interactions/types/interaction_event.py → google_genai-1.62.0/google/genai/_interactions/types/interaction_complete_event.py +3 -3
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/interaction_get_params.py +3 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/interaction_sse_event.py +11 -2
- google_genai-1.62.0/google/genai/_interactions/types/interaction_start_event.py +36 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/batches.py +3 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/errors.py +19 -6
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/files.py +15 -15
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/live.py +22 -2
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/live_music.py +14 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/models.py +486 -197
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_create_with_inlined_requests.py +31 -15
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_get.py +1 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/test_client_close.py +0 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/errors/test_api_error.py +38 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/files/test_register_table.py +1 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_schema.py +10 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/tunings/test_tune.py +87 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tunings.py +211 -20
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/types.py +178 -14
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/version.py +1 -1
- {google_genai-1.60.0 → google_genai-1.62.0/google_genai.egg-info}/PKG-INFO +1 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/google_genai.egg-info/SOURCES.txt +3 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/pyproject.toml +1 -1
- {google_genai-1.60.0 → google_genai-1.62.0}/LICENSE +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/MANIFEST.in +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/README.md +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_adapters.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_api_client.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_api_module.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_automatic_function_calling_util.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_base_transformers.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_base_url.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_common.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_extra_utils.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_client.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_client_adapter.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_constants.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_exceptions.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_files.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_models.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_qs.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_resource.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_response.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_streaming.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_types.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_compat.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_datetime_parse.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_logs.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_proxy.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_reflection.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_resources_proxy.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_streams.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_sync.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_transform.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_typing.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_utils/_utils.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/_version.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/resources/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/allowed_tools.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/allowed_tools_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/annotation.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/annotation_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/audio_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/audio_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/audio_mime_type.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/audio_mime_type_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/code_execution_call_arguments.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/code_execution_call_arguments_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/code_execution_call_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/code_execution_call_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/code_execution_result_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/code_execution_result_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/content_start.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/content_stop.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/deep_research_agent_config.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/deep_research_agent_config_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/document_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/document_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/document_mime_type.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/document_mime_type_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/dynamic_agent_config.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/dynamic_agent_config_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/error_event.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/file_search_call_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/file_search_call_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/file_search_result_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/file_search_result_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/function.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/function_call_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/function_call_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/function_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/generation_config.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/generation_config_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/google_search_call_arguments.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/google_search_call_arguments_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/google_search_call_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/google_search_call_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/google_search_result.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/google_search_result_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/google_search_result_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/google_search_result_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/image_config.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/image_config_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/image_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/image_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/image_mime_type.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/image_mime_type_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/interaction.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/interaction_create_params.py +4 -4
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/interaction_status_update.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/mcp_server_tool_call_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/mcp_server_tool_call_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/mcp_server_tool_result_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/mcp_server_tool_result_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/model.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/model_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/speech_config.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/speech_config_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/text_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/text_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/thinking_level.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/thought_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/thought_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/tool.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/tool_choice.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/tool_choice_config.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/tool_choice_config_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/tool_choice_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/tool_choice_type.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/tool_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/turn.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/turn_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/url_context_call_arguments.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/url_context_call_arguments_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/url_context_call_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/url_context_call_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/url_context_result.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/url_context_result_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/url_context_result_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/url_context_result_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/usage.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/usage_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/video_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/video_content_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/video_mime_type.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/video_mime_type_param.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_live_converters.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_local_tokenizer_loader.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_mcp_utils.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_operations_converters.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_replay_api_client.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_test_api_client.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_tokens_converters.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_transformers.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/caches.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/chats.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/client.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/documents.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/file_search_stores.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/interactions.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/local_tokenizer.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/operations.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/pagers.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/py.typed +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_convert_if_exist_pydantic_model.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_convert_number_values_for_function_call_args.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_find_afc_incompatible_tool_indexes.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_generate_content_stream_afc.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_generate_content_stream_afc_thoughts.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_get_function_map.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_get_function_response_parts.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_get_max_remote_calls_for_afc.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_invoke_function_from_dict_args.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_raise_error_for_afc_incompatible_config.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_should_append_afc_history.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/afc/test_should_disable_afc.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_cancel.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_create.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_create_with_bigquery.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_create_with_file.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_create_with_gcs.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_delete.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_embedding.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/batches/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/constants.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/test_create.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/test_create_custom_url.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/test_delete.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/test_delete_custom_url.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/test_get.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/test_get_custom_url.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/test_update.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/caches/test_update_custom_url.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/chats/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/chats/test_get_history.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/chats/test_send_message.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/chats/test_validate_response.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/test_async_stream.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/test_client_initialization.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/test_client_requests.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/test_custom_client.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/test_http_options.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/test_replay_client_equality.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/test_retries.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/client/test_upload_errors.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/common/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/common/test_common.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/conftest.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/documents/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/documents/test_delete.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/documents/test_get.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/documents/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/errors/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/file_search_stores/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/file_search_stores/test_create.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/file_search_stores/test_delete.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/file_search_stores/test_get.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/file_search_stores/test_import_file.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/file_search_stores/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/file_search_stores/test_upload_to_file_search_store.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/files/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/files/test_delete.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/files/test_download.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/files/test_get.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/files/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/files/test_register.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/files/test_upload.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/imports/test_no_optional_imports.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/interactions/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/interactions/test_auth.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/interactions/test_integration.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/interactions/test_paths.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/live/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/live/test_live.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/live/test_live_music.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/live/test_live_response.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/live/test_send_client_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/live/test_send_realtime_input.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/live/test_send_tool_response.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/local_tokenizer/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/local_tokenizer/test_local_tokenizer.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/local_tokenizer/test_local_tokenizer_loader.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/mcp/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/mcp/test_has_mcp_tool_usage.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/mcp/test_mcp_to_gemini_tools.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/mcp/test_parse_config_for_mcp_sessions.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/mcp/test_parse_config_for_mcp_usage.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/mcp/test_set_mcp_usage_header.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/constants.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_compute_tokens.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_count_tokens.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_delete.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_edit_image.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_embed_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_function_call_streaming.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_cached_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_config_zero_value.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_from_apikey.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_http_options.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_image_generation.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_mcp.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_media_resolution.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_model.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_part.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_thought.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_content_tools.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_images.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_generate_videos.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_get.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_recontext_image.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_segment_image.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_update.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/models/test_upscale_image.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/operations/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/operations/test_get.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/public_samples/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/public_samples/test_gemini_text_only.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/pytest_helper.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/batches/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/batches/test_create_delete.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/batches/test_create_get_cancel.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/batches/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/caches/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/caches/test_create_get_delete.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/caches/test_create_update_get.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/caches/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/chats/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/chats/test_send_message.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/chats/test_send_message_stream.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/files/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/files/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/files/test_upload_get_delete.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_compute_tokens.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_count_tokens.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_edit_image.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_embed.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_generate_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_generate_content_stream.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_generate_images.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_generate_videos.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_recontext_image.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_segment_image.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/models/test_upscale_image.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/tunings/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/tunings/test_create.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/tunings/test_create_get_cancel.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/shared/tunings/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/tokens/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/tokens/test_create.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_blobs.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_bytes.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_duck_type.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_function_responses.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_t_batch.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_t_content.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_t_contents.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_t_part.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_t_parts.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_t_tool.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/transformers/test_t_tools.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/tunings/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/tunings/test_cancel.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/tunings/test_end_to_end.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/tunings/test_get.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/tunings/test_list.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/types/__init__.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/types/test_bytes_internal.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/types/test_bytes_type.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/types/test_future.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/types/test_optional_types.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/types/test_part_type.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/types/test_schema_from_json_schema.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/types/test_schema_json_schema.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tests/types/test_types.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google/genai/tokens.py +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google_genai.egg-info/dependency_links.txt +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google_genai.egg-info/requires.txt +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/google_genai.egg-info/top_level.txt +0 -0
- {google_genai-1.60.0 → google_genai-1.62.0}/setup.cfg +0 -0
|
@@ -101,6 +101,7 @@ from ._exceptions import (
|
|
|
101
101
|
APIConnectionError,
|
|
102
102
|
APIResponseValidationError,
|
|
103
103
|
)
|
|
104
|
+
from ._utils._json import openapi_dumps
|
|
104
105
|
|
|
105
106
|
log: logging.Logger = logging.getLogger(__name__)
|
|
106
107
|
|
|
@@ -578,8 +579,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
578
579
|
kwargs["content"] = options.content
|
|
579
580
|
elif isinstance(json_data, bytes):
|
|
580
581
|
kwargs["content"] = json_data
|
|
581
|
-
|
|
582
|
-
|
|
582
|
+
elif not files:
|
|
583
|
+
# Don't set content when JSON is sent as multipart/form-data,
|
|
584
|
+
# since httpx's content param overrides other body arguments
|
|
585
|
+
kwargs["content"] = openapi_dumps(json_data) if is_given(json_data) and json_data is not None else None
|
|
583
586
|
kwargs["files"] = files
|
|
584
587
|
else:
|
|
585
588
|
headers.pop("Content-Type", None)
|
|
@@ -154,6 +154,7 @@ def model_dump(
|
|
|
154
154
|
exclude_defaults: bool = False,
|
|
155
155
|
warnings: bool = True,
|
|
156
156
|
mode: Literal["json", "python"] = "python",
|
|
157
|
+
by_alias: bool | None = None,
|
|
157
158
|
) -> dict[str, Any]:
|
|
158
159
|
if (not PYDANTIC_V1) or hasattr(model, "model_dump"):
|
|
159
160
|
return model.model_dump(
|
|
@@ -163,13 +164,12 @@ def model_dump(
|
|
|
163
164
|
exclude_defaults=exclude_defaults,
|
|
164
165
|
# warnings are not supported in Pydantic v1
|
|
165
166
|
warnings=True if PYDANTIC_V1 else warnings,
|
|
167
|
+
by_alias=by_alias,
|
|
166
168
|
)
|
|
167
169
|
return cast(
|
|
168
170
|
"dict[str, Any]",
|
|
169
171
|
model.dict( # pyright: ignore[reportDeprecated, reportUnnecessaryCast]
|
|
170
|
-
exclude=exclude,
|
|
171
|
-
exclude_unset=exclude_unset,
|
|
172
|
-
exclude_defaults=exclude_defaults,
|
|
172
|
+
exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, by_alias=bool(by_alias)
|
|
173
173
|
),
|
|
174
174
|
)
|
|
175
175
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Copyright 2025 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
import json
|
|
17
|
+
from typing import Any
|
|
18
|
+
from datetime import datetime
|
|
19
|
+
from typing_extensions import override
|
|
20
|
+
|
|
21
|
+
import pydantic
|
|
22
|
+
|
|
23
|
+
from .._compat import model_dump
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def openapi_dumps(obj: Any) -> bytes:
|
|
27
|
+
"""
|
|
28
|
+
Serialize an object to UTF-8 encoded JSON bytes.
|
|
29
|
+
|
|
30
|
+
Extends the standard json.dumps with support for additional types
|
|
31
|
+
commonly used in the SDK, such as `datetime`, `pydantic.BaseModel`, etc.
|
|
32
|
+
"""
|
|
33
|
+
return json.dumps(
|
|
34
|
+
obj,
|
|
35
|
+
cls=_CustomEncoder,
|
|
36
|
+
# Uses the same defaults as httpx's JSON serialization
|
|
37
|
+
ensure_ascii=False,
|
|
38
|
+
separators=(",", ":"),
|
|
39
|
+
allow_nan=False,
|
|
40
|
+
).encode()
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class _CustomEncoder(json.JSONEncoder):
|
|
44
|
+
@override
|
|
45
|
+
def default(self, o: Any) -> Any:
|
|
46
|
+
if isinstance(o, datetime):
|
|
47
|
+
return o.isoformat()
|
|
48
|
+
if isinstance(o, pydantic.BaseModel):
|
|
49
|
+
return model_dump(o, exclude_unset=True, mode="json", by_alias=True)
|
|
50
|
+
return super().default(o)
|
{google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/resources/interactions.py
RENAMED
|
@@ -68,9 +68,9 @@ class InteractionsResource(SyncAPIResource):
|
|
|
68
68
|
def create(
|
|
69
69
|
self,
|
|
70
70
|
*,
|
|
71
|
+
api_version: str | None = None,
|
|
71
72
|
input: interaction_create_params.Input,
|
|
72
73
|
model: ModelParam,
|
|
73
|
-
api_version: str | None = None,
|
|
74
74
|
background: bool | Omit = omit,
|
|
75
75
|
generation_config: GenerationConfigParam | Omit = omit,
|
|
76
76
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -131,10 +131,10 @@ class InteractionsResource(SyncAPIResource):
|
|
|
131
131
|
def create(
|
|
132
132
|
self,
|
|
133
133
|
*,
|
|
134
|
+
api_version: str | None = None,
|
|
134
135
|
input: interaction_create_params.Input,
|
|
135
136
|
model: ModelParam,
|
|
136
137
|
stream: Literal[True],
|
|
137
|
-
api_version: str | None = None,
|
|
138
138
|
background: bool | Omit = omit,
|
|
139
139
|
generation_config: GenerationConfigParam | Omit = omit,
|
|
140
140
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -194,9 +194,9 @@ class InteractionsResource(SyncAPIResource):
|
|
|
194
194
|
def create(
|
|
195
195
|
self,
|
|
196
196
|
*,
|
|
197
|
+
api_version: str | None = None,
|
|
197
198
|
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]],
|
|
198
199
|
input: interaction_create_params.Input,
|
|
199
|
-
api_version: str | None = None,
|
|
200
200
|
agent_config: interaction_create_params.AgentConfig | Omit = omit,
|
|
201
201
|
background: bool | Omit = omit,
|
|
202
202
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -257,10 +257,10 @@ class InteractionsResource(SyncAPIResource):
|
|
|
257
257
|
def create(
|
|
258
258
|
self,
|
|
259
259
|
*,
|
|
260
|
+
api_version: str | None = None,
|
|
260
261
|
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]],
|
|
261
262
|
input: interaction_create_params.Input,
|
|
262
263
|
stream: Literal[True],
|
|
263
|
-
api_version: str | None = None,
|
|
264
264
|
agent_config: interaction_create_params.AgentConfig | Omit = omit,
|
|
265
265
|
background: bool | Omit = omit,
|
|
266
266
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -320,10 +320,10 @@ class InteractionsResource(SyncAPIResource):
|
|
|
320
320
|
def create(
|
|
321
321
|
self,
|
|
322
322
|
*,
|
|
323
|
+
api_version: str | None = None,
|
|
323
324
|
input: interaction_create_params.Input,
|
|
324
325
|
model: ModelParam,
|
|
325
326
|
stream: bool,
|
|
326
|
-
api_version: str | None = None,
|
|
327
327
|
background: bool | Omit = omit,
|
|
328
328
|
generation_config: GenerationConfigParam | Omit = omit,
|
|
329
329
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -383,9 +383,9 @@ class InteractionsResource(SyncAPIResource):
|
|
|
383
383
|
def create(
|
|
384
384
|
self,
|
|
385
385
|
*,
|
|
386
|
+
api_version: str | None = None,
|
|
386
387
|
input: interaction_create_params.Input,
|
|
387
388
|
model: ModelParam | Omit = omit,
|
|
388
|
-
api_version: str | None = None,
|
|
389
389
|
background: bool | Omit = omit,
|
|
390
390
|
generation_config: GenerationConfigParam | Omit = omit,
|
|
391
391
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -468,12 +468,12 @@ class InteractionsResource(SyncAPIResource):
|
|
|
468
468
|
|
|
469
469
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
470
470
|
"""
|
|
471
|
-
if not id:
|
|
472
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
473
471
|
if api_version is None:
|
|
474
472
|
api_version = self._client._get_api_version_path_param()
|
|
475
473
|
if not api_version:
|
|
476
474
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
475
|
+
if not id:
|
|
476
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
477
477
|
return self._delete(
|
|
478
478
|
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'),
|
|
479
479
|
options=make_request_options(
|
|
@@ -507,12 +507,12 @@ class InteractionsResource(SyncAPIResource):
|
|
|
507
507
|
|
|
508
508
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
509
509
|
"""
|
|
510
|
-
if not id:
|
|
511
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
512
510
|
if api_version is None:
|
|
513
511
|
api_version = self._client._get_api_version_path_param()
|
|
514
512
|
if not api_version:
|
|
515
513
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
514
|
+
if not id:
|
|
515
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
516
516
|
return self._post(
|
|
517
517
|
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}/cancel'),
|
|
518
518
|
options=make_request_options(
|
|
@@ -527,6 +527,7 @@ class InteractionsResource(SyncAPIResource):
|
|
|
527
527
|
id: str,
|
|
528
528
|
*,
|
|
529
529
|
api_version: str | None = None,
|
|
530
|
+
include_input: bool | Omit = omit,
|
|
530
531
|
last_event_id: str | Omit = omit,
|
|
531
532
|
stream: Literal[False] | Omit = omit,
|
|
532
533
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -540,6 +541,8 @@ class InteractionsResource(SyncAPIResource):
|
|
|
540
541
|
Retrieves the full details of a single interaction based on its `Interaction.id`.
|
|
541
542
|
|
|
542
543
|
Args:
|
|
544
|
+
include_input: If set to true, includes the input in the response.
|
|
545
|
+
|
|
543
546
|
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.
|
|
544
547
|
|
|
545
548
|
stream: If set to true, the generated content will be streamed incrementally.
|
|
@@ -559,8 +562,9 @@ class InteractionsResource(SyncAPIResource):
|
|
|
559
562
|
self,
|
|
560
563
|
id: str,
|
|
561
564
|
*,
|
|
562
|
-
stream: Literal[True],
|
|
563
565
|
api_version: str | None = None,
|
|
566
|
+
stream: Literal[True],
|
|
567
|
+
include_input: bool | Omit = omit,
|
|
564
568
|
last_event_id: str | Omit = omit,
|
|
565
569
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
566
570
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -575,6 +579,8 @@ class InteractionsResource(SyncAPIResource):
|
|
|
575
579
|
Args:
|
|
576
580
|
stream: If set to true, the generated content will be streamed incrementally.
|
|
577
581
|
|
|
582
|
+
include_input: If set to true, includes the input in the response.
|
|
583
|
+
|
|
578
584
|
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.
|
|
579
585
|
|
|
580
586
|
extra_headers: Send extra headers
|
|
@@ -592,8 +598,9 @@ class InteractionsResource(SyncAPIResource):
|
|
|
592
598
|
self,
|
|
593
599
|
id: str,
|
|
594
600
|
*,
|
|
595
|
-
stream: bool,
|
|
596
601
|
api_version: str | None = None,
|
|
602
|
+
stream: bool,
|
|
603
|
+
include_input: bool | Omit = omit,
|
|
597
604
|
last_event_id: str | Omit = omit,
|
|
598
605
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
599
606
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -608,6 +615,8 @@ class InteractionsResource(SyncAPIResource):
|
|
|
608
615
|
Args:
|
|
609
616
|
stream: If set to true, the generated content will be streamed incrementally.
|
|
610
617
|
|
|
618
|
+
include_input: If set to true, includes the input in the response.
|
|
619
|
+
|
|
611
620
|
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.
|
|
612
621
|
|
|
613
622
|
extra_headers: Send extra headers
|
|
@@ -625,6 +634,7 @@ class InteractionsResource(SyncAPIResource):
|
|
|
625
634
|
id: str,
|
|
626
635
|
*,
|
|
627
636
|
api_version: str | None = None,
|
|
637
|
+
include_input: bool | Omit = omit,
|
|
628
638
|
last_event_id: str | Omit = omit,
|
|
629
639
|
stream: Literal[False] | Literal[True] | Omit = omit,
|
|
630
640
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -634,12 +644,12 @@ class InteractionsResource(SyncAPIResource):
|
|
|
634
644
|
extra_body: Body | None = None,
|
|
635
645
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
636
646
|
) -> Interaction | Stream[InteractionSSEEvent]:
|
|
637
|
-
if not id:
|
|
638
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
639
647
|
if api_version is None:
|
|
640
648
|
api_version = self._client._get_api_version_path_param()
|
|
641
649
|
if not api_version:
|
|
642
650
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
651
|
+
if not id:
|
|
652
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
643
653
|
return self._get(
|
|
644
654
|
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'),
|
|
645
655
|
options=make_request_options(
|
|
@@ -649,6 +659,7 @@ class InteractionsResource(SyncAPIResource):
|
|
|
649
659
|
timeout=timeout,
|
|
650
660
|
query=maybe_transform(
|
|
651
661
|
{
|
|
662
|
+
"include_input": include_input,
|
|
652
663
|
"last_event_id": last_event_id,
|
|
653
664
|
"stream": stream,
|
|
654
665
|
},
|
|
@@ -685,9 +696,9 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
685
696
|
async def create(
|
|
686
697
|
self,
|
|
687
698
|
*,
|
|
699
|
+
api_version: str | None = None,
|
|
688
700
|
input: interaction_create_params.Input,
|
|
689
701
|
model: ModelParam,
|
|
690
|
-
api_version: str | None = None,
|
|
691
702
|
background: bool | Omit = omit,
|
|
692
703
|
generation_config: GenerationConfigParam | Omit = omit,
|
|
693
704
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -748,10 +759,10 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
748
759
|
async def create(
|
|
749
760
|
self,
|
|
750
761
|
*,
|
|
762
|
+
api_version: str | None = None,
|
|
751
763
|
input: interaction_create_params.Input,
|
|
752
764
|
model: ModelParam,
|
|
753
765
|
stream: Literal[True],
|
|
754
|
-
api_version: str | None = None,
|
|
755
766
|
background: bool | Omit = omit,
|
|
756
767
|
generation_config: GenerationConfigParam | Omit = omit,
|
|
757
768
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -811,9 +822,9 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
811
822
|
async def create(
|
|
812
823
|
self,
|
|
813
824
|
*,
|
|
825
|
+
api_version: str | None = None,
|
|
814
826
|
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]],
|
|
815
827
|
input: interaction_create_params.Input,
|
|
816
|
-
api_version: str | None = None,
|
|
817
828
|
agent_config: interaction_create_params.AgentConfig | Omit = omit,
|
|
818
829
|
background: bool | Omit = omit,
|
|
819
830
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -874,10 +885,10 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
874
885
|
async def create(
|
|
875
886
|
self,
|
|
876
887
|
*,
|
|
888
|
+
api_version: str | None = None,
|
|
877
889
|
agent: Union[str, Literal["deep-research-pro-preview-12-2025"]],
|
|
878
890
|
input: interaction_create_params.Input,
|
|
879
891
|
stream: Literal[True],
|
|
880
|
-
api_version: str | None = None,
|
|
881
892
|
agent_config: interaction_create_params.AgentConfig | Omit = omit,
|
|
882
893
|
background: bool | Omit = omit,
|
|
883
894
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -937,10 +948,10 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
937
948
|
async def create(
|
|
938
949
|
self,
|
|
939
950
|
*,
|
|
951
|
+
api_version: str | None = None,
|
|
940
952
|
input: interaction_create_params.Input,
|
|
941
953
|
model: ModelParam,
|
|
942
954
|
stream: bool,
|
|
943
|
-
api_version: str | None = None,
|
|
944
955
|
background: bool | Omit = omit,
|
|
945
956
|
generation_config: GenerationConfigParam | Omit = omit,
|
|
946
957
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -1000,9 +1011,9 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1000
1011
|
async def create(
|
|
1001
1012
|
self,
|
|
1002
1013
|
*,
|
|
1014
|
+
api_version: str | None = None,
|
|
1003
1015
|
input: interaction_create_params.Input,
|
|
1004
1016
|
model: ModelParam | Omit = omit,
|
|
1005
|
-
api_version: str | None = None,
|
|
1006
1017
|
background: bool | Omit = omit,
|
|
1007
1018
|
generation_config: GenerationConfigParam | Omit = omit,
|
|
1008
1019
|
previous_interaction_id: str | Omit = omit,
|
|
@@ -1085,12 +1096,12 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1085
1096
|
|
|
1086
1097
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
1087
1098
|
"""
|
|
1088
|
-
if not id:
|
|
1089
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
1090
1099
|
if api_version is None:
|
|
1091
1100
|
api_version = self._client._get_api_version_path_param()
|
|
1092
1101
|
if not api_version:
|
|
1093
1102
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
1103
|
+
if not id:
|
|
1104
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
1094
1105
|
return await self._delete(
|
|
1095
1106
|
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'),
|
|
1096
1107
|
options=make_request_options(
|
|
@@ -1124,12 +1135,12 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1124
1135
|
|
|
1125
1136
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
1126
1137
|
"""
|
|
1127
|
-
if not id:
|
|
1128
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
1129
1138
|
if api_version is None:
|
|
1130
1139
|
api_version = self._client._get_api_version_path_param()
|
|
1131
1140
|
if not api_version:
|
|
1132
1141
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
1142
|
+
if not id:
|
|
1143
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
1133
1144
|
return await self._post(
|
|
1134
1145
|
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}/cancel'),
|
|
1135
1146
|
options=make_request_options(
|
|
@@ -1144,6 +1155,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1144
1155
|
id: str,
|
|
1145
1156
|
*,
|
|
1146
1157
|
api_version: str | None = None,
|
|
1158
|
+
include_input: bool | Omit = omit,
|
|
1147
1159
|
last_event_id: str | Omit = omit,
|
|
1148
1160
|
stream: Literal[False] | Omit = omit,
|
|
1149
1161
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -1157,6 +1169,8 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1157
1169
|
Retrieves the full details of a single interaction based on its `Interaction.id`.
|
|
1158
1170
|
|
|
1159
1171
|
Args:
|
|
1172
|
+
include_input: If set to true, includes the input in the response.
|
|
1173
|
+
|
|
1160
1174
|
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.
|
|
1161
1175
|
|
|
1162
1176
|
stream: If set to true, the generated content will be streamed incrementally.
|
|
@@ -1176,8 +1190,9 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1176
1190
|
self,
|
|
1177
1191
|
id: str,
|
|
1178
1192
|
*,
|
|
1179
|
-
stream: Literal[True],
|
|
1180
1193
|
api_version: str | None = None,
|
|
1194
|
+
stream: Literal[True],
|
|
1195
|
+
include_input: bool | Omit = omit,
|
|
1181
1196
|
last_event_id: str | Omit = omit,
|
|
1182
1197
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1183
1198
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -1192,6 +1207,8 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1192
1207
|
Args:
|
|
1193
1208
|
stream: If set to true, the generated content will be streamed incrementally.
|
|
1194
1209
|
|
|
1210
|
+
include_input: If set to true, includes the input in the response.
|
|
1211
|
+
|
|
1195
1212
|
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.
|
|
1196
1213
|
|
|
1197
1214
|
extra_headers: Send extra headers
|
|
@@ -1209,8 +1226,9 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1209
1226
|
self,
|
|
1210
1227
|
id: str,
|
|
1211
1228
|
*,
|
|
1212
|
-
stream: bool,
|
|
1213
1229
|
api_version: str | None = None,
|
|
1230
|
+
stream: bool,
|
|
1231
|
+
include_input: bool | Omit = omit,
|
|
1214
1232
|
last_event_id: str | Omit = omit,
|
|
1215
1233
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1216
1234
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -1225,6 +1243,8 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1225
1243
|
Args:
|
|
1226
1244
|
stream: If set to true, the generated content will be streamed incrementally.
|
|
1227
1245
|
|
|
1246
|
+
include_input: If set to true, includes the input in the response.
|
|
1247
|
+
|
|
1228
1248
|
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.
|
|
1229
1249
|
|
|
1230
1250
|
extra_headers: Send extra headers
|
|
@@ -1242,6 +1262,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1242
1262
|
id: str,
|
|
1243
1263
|
*,
|
|
1244
1264
|
api_version: str | None = None,
|
|
1265
|
+
include_input: bool | Omit = omit,
|
|
1245
1266
|
last_event_id: str | Omit = omit,
|
|
1246
1267
|
stream: Literal[False] | Literal[True] | Omit = omit,
|
|
1247
1268
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -1251,12 +1272,12 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1251
1272
|
extra_body: Body | None = None,
|
|
1252
1273
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1253
1274
|
) -> Interaction | AsyncStream[InteractionSSEEvent]:
|
|
1254
|
-
if not id:
|
|
1255
|
-
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
1256
1275
|
if api_version is None:
|
|
1257
1276
|
api_version = self._client._get_api_version_path_param()
|
|
1258
1277
|
if not api_version:
|
|
1259
1278
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
1279
|
+
if not id:
|
|
1280
|
+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
|
|
1260
1281
|
return await self._get(
|
|
1261
1282
|
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'),
|
|
1262
1283
|
options=make_request_options(
|
|
@@ -1266,6 +1287,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1266
1287
|
timeout=timeout,
|
|
1267
1288
|
query=await async_maybe_transform(
|
|
1268
1289
|
{
|
|
1290
|
+
"include_input": include_input,
|
|
1269
1291
|
"last_event_id": last_event_id,
|
|
1270
1292
|
"stream": stream,
|
|
1271
1293
|
},
|
|
@@ -52,7 +52,6 @@ from .annotation_param import AnnotationParam as AnnotationParam
|
|
|
52
52
|
from .document_content import DocumentContent as DocumentContent
|
|
53
53
|
from .tool_choice_type import ToolChoiceType as ToolChoiceType
|
|
54
54
|
from .generation_config import GenerationConfig as GenerationConfig
|
|
55
|
-
from .interaction_event import InteractionEvent as InteractionEvent
|
|
56
55
|
from .tool_choice_param import ToolChoiceParam as ToolChoiceParam
|
|
57
56
|
from .document_mime_type import DocumentMimeType as DocumentMimeType
|
|
58
57
|
from .image_config_param import ImageConfigParam as ImageConfigParam
|
|
@@ -76,6 +75,7 @@ from .document_content_param import DocumentContentParam as DocumentContentParam
|
|
|
76
75
|
from .interaction_get_params import InteractionGetParams as InteractionGetParams
|
|
77
76
|
from .function_result_content import FunctionResultContent as FunctionResultContent
|
|
78
77
|
from .generation_config_param import GenerationConfigParam as GenerationConfigParam
|
|
78
|
+
from .interaction_start_event import InteractionStartEvent as InteractionStartEvent
|
|
79
79
|
from .document_mime_type_param import DocumentMimeTypeParam as DocumentMimeTypeParam
|
|
80
80
|
from .file_search_call_content import FileSearchCallContent as FileSearchCallContent
|
|
81
81
|
from .tool_choice_config_param import ToolChoiceConfigParam as ToolChoiceConfigParam
|
|
@@ -88,6 +88,7 @@ from .dynamic_agent_config_param import DynamicAgentConfigParam as DynamicAgentC
|
|
|
88
88
|
from .file_search_result_content import FileSearchResultContent as FileSearchResultContent
|
|
89
89
|
from .google_search_call_content import GoogleSearchCallContent as GoogleSearchCallContent
|
|
90
90
|
from .google_search_result_param import GoogleSearchResultParam as GoogleSearchResultParam
|
|
91
|
+
from .interaction_complete_event import InteractionCompleteEvent as InteractionCompleteEvent
|
|
91
92
|
from .url_context_call_arguments import URLContextCallArguments as URLContextCallArguments
|
|
92
93
|
from .url_context_result_content import URLContextResultContent as URLContextResultContent
|
|
93
94
|
from .code_execution_call_content import CodeExecutionCallContent as CodeExecutionCallContent
|
{google_genai-1.60.0 → google_genai-1.62.0}/google/genai/_interactions/types/content_delta.py
RENAMED
|
@@ -155,7 +155,7 @@ class DeltaFunctionCallDelta(BaseModel):
|
|
|
155
155
|
name: Optional[str] = None
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
DeltaFunctionResultDeltaResultItemsItem: TypeAlias = Union[
|
|
158
|
+
DeltaFunctionResultDeltaResultItemsItem: TypeAlias = Union[TextContent, ImageContent, object]
|
|
159
159
|
|
|
160
160
|
|
|
161
161
|
class DeltaFunctionResultDeltaResultItems(BaseModel):
|
|
@@ -19,11 +19,12 @@ from typing import List, Union, Optional
|
|
|
19
19
|
from typing_extensions import Literal, TypeAlias
|
|
20
20
|
|
|
21
21
|
from .._models import BaseModel
|
|
22
|
+
from .text_content import TextContent
|
|
22
23
|
from .image_content import ImageContent
|
|
23
24
|
|
|
24
25
|
__all__ = ["FunctionResultContent", "Result", "ResultItems", "ResultItemsItem"]
|
|
25
26
|
|
|
26
|
-
ResultItemsItem: TypeAlias = Union[
|
|
27
|
+
ResultItemsItem: TypeAlias = Union[TextContent, ImageContent, object]
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
class ResultItems(BaseModel):
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
|
|
18
18
|
from __future__ import annotations
|
|
19
19
|
|
|
20
|
-
from typing import Union
|
|
20
|
+
from typing import Union, Iterable
|
|
21
21
|
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
22
22
|
|
|
23
|
-
from
|
|
23
|
+
from .text_content_param import TextContentParam
|
|
24
24
|
from .image_content_param import ImageContentParam
|
|
25
25
|
|
|
26
26
|
__all__ = ["FunctionResultContentParam", "Result", "ResultItems", "ResultItemsItem"]
|
|
27
27
|
|
|
28
|
-
ResultItemsItem: TypeAlias = Union[
|
|
28
|
+
ResultItemsItem: TypeAlias = Union[TextContentParam, ImageContentParam, object]
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class ResultItems(TypedDict, total=False):
|
|
32
|
-
items:
|
|
32
|
+
items: Iterable[ResultItemsItem]
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
Result: TypeAlias = Union[ResultItems, str, object]
|
|
@@ -21,16 +21,16 @@ from typing_extensions import Literal
|
|
|
21
21
|
from .._models import BaseModel
|
|
22
22
|
from .interaction import Interaction
|
|
23
23
|
|
|
24
|
-
__all__ = ["
|
|
24
|
+
__all__ = ["InteractionCompleteEvent"]
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class InteractionCompleteEvent(BaseModel):
|
|
28
28
|
event_id: Optional[str] = None
|
|
29
29
|
"""
|
|
30
30
|
The event_id token to be used to resume the interaction stream, from this event.
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
|
-
event_type: Optional[Literal["interaction.
|
|
33
|
+
event_type: Optional[Literal["interaction.complete"]] = None
|
|
34
34
|
|
|
35
35
|
interaction: Optional[Interaction] = None
|
|
36
36
|
"""The Interaction resource."""
|
|
@@ -26,6 +26,9 @@ __all__ = ["InteractionGetParamsBase", "InteractionGetParamsNonStreaming", "Inte
|
|
|
26
26
|
class InteractionGetParamsBase(TypedDict, total=False):
|
|
27
27
|
api_version: str
|
|
28
28
|
|
|
29
|
+
include_input: bool
|
|
30
|
+
"""If set to true, includes the input in the response."""
|
|
31
|
+
|
|
29
32
|
last_event_id: str
|
|
30
33
|
"""Optional.
|
|
31
34
|
|
|
@@ -23,12 +23,21 @@ from .error_event import ErrorEvent
|
|
|
23
23
|
from .content_stop import ContentStop
|
|
24
24
|
from .content_delta import ContentDelta
|
|
25
25
|
from .content_start import ContentStart
|
|
26
|
-
from .
|
|
26
|
+
from .interaction_start_event import InteractionStartEvent
|
|
27
27
|
from .interaction_status_update import InteractionStatusUpdate
|
|
28
|
+
from .interaction_complete_event import InteractionCompleteEvent
|
|
28
29
|
|
|
29
30
|
__all__ = ["InteractionSSEEvent"]
|
|
30
31
|
|
|
31
32
|
InteractionSSEEvent: TypeAlias = Annotated[
|
|
32
|
-
Union[
|
|
33
|
+
Union[
|
|
34
|
+
InteractionStartEvent,
|
|
35
|
+
InteractionCompleteEvent,
|
|
36
|
+
InteractionStatusUpdate,
|
|
37
|
+
ContentStart,
|
|
38
|
+
ContentDelta,
|
|
39
|
+
ContentStop,
|
|
40
|
+
ErrorEvent,
|
|
41
|
+
],
|
|
33
42
|
PropertyInfo(discriminator="event_type"),
|
|
34
43
|
]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright 2025 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
17
|
+
|
|
18
|
+
from typing import Optional
|
|
19
|
+
from typing_extensions import Literal
|
|
20
|
+
|
|
21
|
+
from .._models import BaseModel
|
|
22
|
+
from .interaction import Interaction
|
|
23
|
+
|
|
24
|
+
__all__ = ["InteractionStartEvent"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class InteractionStartEvent(BaseModel):
|
|
28
|
+
event_id: Optional[str] = None
|
|
29
|
+
"""
|
|
30
|
+
The event_id token to be used to resume the interaction stream, from this event.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
event_type: Optional[Literal["interaction.start"]] = None
|
|
34
|
+
|
|
35
|
+
interaction: Optional[Interaction] = None
|
|
36
|
+
"""The Interaction resource."""
|
|
@@ -1208,6 +1208,9 @@ def _InlinedResponse_from_mldev(
|
|
|
1208
1208
|
),
|
|
1209
1209
|
)
|
|
1210
1210
|
|
|
1211
|
+
if getv(from_object, ['metadata']) is not None:
|
|
1212
|
+
setv(to_object, ['metadata'], getv(from_object, ['metadata']))
|
|
1213
|
+
|
|
1211
1214
|
if getv(from_object, ['error']) is not None:
|
|
1212
1215
|
setv(to_object, ['error'], getv(from_object, ['error']))
|
|
1213
1216
|
|