google-genai 1.55.0__py3-none-any.whl → 1.56.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/genai/_interactions/_base_client.py +8 -2
- google/genai/_interactions/resources/interactions.py +6 -6
- google/genai/_interactions/types/__init__.py +2 -0
- google/genai/_interactions/types/audio_content.py +0 -1
- google/genai/_interactions/types/audio_content_param.py +0 -1
- google/genai/_interactions/types/code_execution_call_content.py +0 -1
- google/genai/_interactions/types/code_execution_call_content_param.py +0 -1
- google/genai/_interactions/types/code_execution_result_content.py +0 -1
- google/genai/_interactions/types/code_execution_result_content_param.py +0 -1
- google/genai/_interactions/types/content_delta.py +7 -23
- google/genai/_interactions/types/deep_research_agent_config.py +0 -1
- google/genai/_interactions/types/deep_research_agent_config_param.py +0 -1
- google/genai/_interactions/types/document_content.py +3 -2
- google/genai/_interactions/types/document_content_param.py +3 -2
- google/genai/{tests/__init__.py → _interactions/types/document_mime_type.py} +5 -3
- google/genai/{tests/afc/__init__.py → _interactions/types/document_mime_type_param.py} +8 -4
- google/genai/_interactions/types/dynamic_agent_config.py +0 -1
- google/genai/_interactions/types/dynamic_agent_config_param.py +0 -1
- google/genai/_interactions/types/file_search_result_content.py +0 -1
- google/genai/_interactions/types/file_search_result_content_param.py +0 -1
- google/genai/_interactions/types/function_call_content.py +0 -1
- google/genai/_interactions/types/function_call_content_param.py +0 -1
- google/genai/_interactions/types/function_result_content.py +1 -2
- google/genai/_interactions/types/function_result_content_param.py +1 -2
- google/genai/_interactions/types/google_search_call_content.py +0 -1
- google/genai/_interactions/types/google_search_call_content_param.py +0 -1
- google/genai/_interactions/types/google_search_result_content.py +0 -1
- google/genai/_interactions/types/google_search_result_content_param.py +0 -1
- google/genai/_interactions/types/image_content.py +1 -2
- google/genai/_interactions/types/image_content_param.py +1 -2
- google/genai/_interactions/types/mcp_server_tool_call_content.py +0 -1
- google/genai/_interactions/types/mcp_server_tool_call_content_param.py +0 -1
- google/genai/_interactions/types/mcp_server_tool_result_content.py +1 -2
- google/genai/_interactions/types/mcp_server_tool_result_content_param.py +1 -2
- google/genai/_interactions/types/text_content.py +0 -1
- google/genai/_interactions/types/text_content_param.py +0 -1
- google/genai/_interactions/types/thinking_level.py +1 -1
- google/genai/_interactions/types/thought_content.py +0 -1
- google/genai/_interactions/types/thought_content_param.py +0 -1
- google/genai/_interactions/types/url_context_call_content.py +0 -1
- google/genai/_interactions/types/url_context_call_content_param.py +0 -1
- google/genai/_interactions/types/url_context_result_content.py +0 -1
- google/genai/_interactions/types/url_context_result_content_param.py +0 -1
- google/genai/_interactions/types/video_content.py +1 -2
- google/genai/_interactions/types/video_content_param.py +1 -2
- google/genai/_live_converters.py +2 -30
- google/genai/client.py +3 -1
- google/genai/models.py +2 -29
- google/genai/tunings.py +1 -27
- google/genai/types.py +20 -22
- google/genai/version.py +1 -1
- {google_genai-1.55.0.dist-info → google_genai-1.56.0.dist-info}/METADATA +224 -22
- google_genai-1.56.0.dist-info/RECORD +162 -0
- google/genai/tests/afc/test_convert_if_exist_pydantic_model.py +0 -309
- google/genai/tests/afc/test_convert_number_values_for_function_call_args.py +0 -63
- google/genai/tests/afc/test_find_afc_incompatible_tool_indexes.py +0 -240
- google/genai/tests/afc/test_generate_content_stream_afc.py +0 -530
- google/genai/tests/afc/test_generate_content_stream_afc_thoughts.py +0 -77
- google/genai/tests/afc/test_get_function_map.py +0 -176
- google/genai/tests/afc/test_get_function_response_parts.py +0 -277
- google/genai/tests/afc/test_get_max_remote_calls_for_afc.py +0 -130
- google/genai/tests/afc/test_invoke_function_from_dict_args.py +0 -241
- google/genai/tests/afc/test_raise_error_for_afc_incompatible_config.py +0 -159
- google/genai/tests/afc/test_should_append_afc_history.py +0 -53
- google/genai/tests/afc/test_should_disable_afc.py +0 -214
- google/genai/tests/batches/__init__.py +0 -17
- google/genai/tests/batches/test_cancel.py +0 -77
- google/genai/tests/batches/test_create.py +0 -78
- google/genai/tests/batches/test_create_with_bigquery.py +0 -113
- google/genai/tests/batches/test_create_with_file.py +0 -82
- google/genai/tests/batches/test_create_with_gcs.py +0 -125
- google/genai/tests/batches/test_create_with_inlined_requests.py +0 -255
- google/genai/tests/batches/test_delete.py +0 -86
- google/genai/tests/batches/test_embedding.py +0 -157
- google/genai/tests/batches/test_get.py +0 -78
- google/genai/tests/batches/test_list.py +0 -79
- google/genai/tests/caches/__init__.py +0 -17
- google/genai/tests/caches/constants.py +0 -29
- google/genai/tests/caches/test_create.py +0 -210
- google/genai/tests/caches/test_create_custom_url.py +0 -105
- google/genai/tests/caches/test_delete.py +0 -54
- google/genai/tests/caches/test_delete_custom_url.py +0 -52
- google/genai/tests/caches/test_get.py +0 -94
- google/genai/tests/caches/test_get_custom_url.py +0 -52
- google/genai/tests/caches/test_list.py +0 -68
- google/genai/tests/caches/test_update.py +0 -70
- google/genai/tests/caches/test_update_custom_url.py +0 -58
- google/genai/tests/chats/__init__.py +0 -1
- google/genai/tests/chats/test_get_history.py +0 -597
- google/genai/tests/chats/test_send_message.py +0 -844
- google/genai/tests/chats/test_validate_response.py +0 -90
- google/genai/tests/client/__init__.py +0 -17
- google/genai/tests/client/test_async_stream.py +0 -427
- google/genai/tests/client/test_client_close.py +0 -197
- google/genai/tests/client/test_client_initialization.py +0 -1687
- google/genai/tests/client/test_client_requests.py +0 -355
- google/genai/tests/client/test_custom_client.py +0 -77
- google/genai/tests/client/test_http_options.py +0 -178
- google/genai/tests/client/test_replay_client_equality.py +0 -168
- google/genai/tests/client/test_retries.py +0 -846
- google/genai/tests/client/test_upload_errors.py +0 -136
- google/genai/tests/common/__init__.py +0 -17
- google/genai/tests/common/test_common.py +0 -954
- google/genai/tests/conftest.py +0 -162
- google/genai/tests/documents/__init__.py +0 -17
- google/genai/tests/documents/test_delete.py +0 -51
- google/genai/tests/documents/test_get.py +0 -85
- google/genai/tests/documents/test_list.py +0 -72
- google/genai/tests/errors/__init__.py +0 -1
- google/genai/tests/errors/test_api_error.py +0 -417
- google/genai/tests/file_search_stores/__init__.py +0 -17
- google/genai/tests/file_search_stores/test_create.py +0 -66
- google/genai/tests/file_search_stores/test_delete.py +0 -64
- google/genai/tests/file_search_stores/test_get.py +0 -94
- google/genai/tests/file_search_stores/test_import_file.py +0 -112
- google/genai/tests/file_search_stores/test_list.py +0 -57
- google/genai/tests/file_search_stores/test_upload_to_file_search_store.py +0 -141
- google/genai/tests/files/__init__.py +0 -17
- google/genai/tests/files/test_delete.py +0 -46
- google/genai/tests/files/test_download.py +0 -85
- google/genai/tests/files/test_get.py +0 -46
- google/genai/tests/files/test_list.py +0 -72
- google/genai/tests/files/test_upload.py +0 -255
- google/genai/tests/imports/test_no_optional_imports.py +0 -28
- google/genai/tests/interactions/test_integration.py +0 -80
- google/genai/tests/live/__init__.py +0 -16
- google/genai/tests/live/test_live.py +0 -2177
- google/genai/tests/live/test_live_music.py +0 -362
- google/genai/tests/live/test_live_response.py +0 -163
- google/genai/tests/live/test_send_client_content.py +0 -147
- google/genai/tests/live/test_send_realtime_input.py +0 -268
- google/genai/tests/live/test_send_tool_response.py +0 -222
- google/genai/tests/local_tokenizer/__init__.py +0 -17
- google/genai/tests/local_tokenizer/test_local_tokenizer.py +0 -343
- google/genai/tests/local_tokenizer/test_local_tokenizer_loader.py +0 -235
- google/genai/tests/mcp/__init__.py +0 -17
- google/genai/tests/mcp/test_has_mcp_tool_usage.py +0 -89
- google/genai/tests/mcp/test_mcp_to_gemini_tools.py +0 -191
- google/genai/tests/mcp/test_parse_config_for_mcp_sessions.py +0 -201
- google/genai/tests/mcp/test_parse_config_for_mcp_usage.py +0 -130
- google/genai/tests/mcp/test_set_mcp_usage_header.py +0 -72
- google/genai/tests/models/__init__.py +0 -17
- google/genai/tests/models/constants.py +0 -8
- google/genai/tests/models/test_compute_tokens.py +0 -120
- google/genai/tests/models/test_count_tokens.py +0 -159
- google/genai/tests/models/test_delete.py +0 -107
- google/genai/tests/models/test_edit_image.py +0 -264
- google/genai/tests/models/test_embed_content.py +0 -94
- google/genai/tests/models/test_function_call_streaming.py +0 -442
- google/genai/tests/models/test_generate_content.py +0 -2502
- google/genai/tests/models/test_generate_content_cached_content.py +0 -132
- google/genai/tests/models/test_generate_content_config_zero_value.py +0 -103
- google/genai/tests/models/test_generate_content_from_apikey.py +0 -44
- google/genai/tests/models/test_generate_content_http_options.py +0 -40
- google/genai/tests/models/test_generate_content_image_generation.py +0 -143
- google/genai/tests/models/test_generate_content_mcp.py +0 -343
- google/genai/tests/models/test_generate_content_media_resolution.py +0 -97
- google/genai/tests/models/test_generate_content_model.py +0 -139
- google/genai/tests/models/test_generate_content_part.py +0 -821
- google/genai/tests/models/test_generate_content_thought.py +0 -76
- google/genai/tests/models/test_generate_content_tools.py +0 -1761
- google/genai/tests/models/test_generate_images.py +0 -191
- google/genai/tests/models/test_generate_videos.py +0 -759
- google/genai/tests/models/test_get.py +0 -104
- google/genai/tests/models/test_list.py +0 -233
- google/genai/tests/models/test_recontext_image.py +0 -189
- google/genai/tests/models/test_segment_image.py +0 -148
- google/genai/tests/models/test_update.py +0 -95
- google/genai/tests/models/test_upscale_image.py +0 -157
- google/genai/tests/operations/__init__.py +0 -17
- google/genai/tests/operations/test_get.py +0 -38
- google/genai/tests/public_samples/__init__.py +0 -17
- google/genai/tests/public_samples/test_gemini_text_only.py +0 -34
- google/genai/tests/pytest_helper.py +0 -229
- google/genai/tests/shared/__init__.py +0 -16
- google/genai/tests/shared/batches/__init__.py +0 -14
- google/genai/tests/shared/batches/test_create_delete.py +0 -57
- google/genai/tests/shared/batches/test_create_get_cancel.py +0 -56
- google/genai/tests/shared/batches/test_list.py +0 -40
- google/genai/tests/shared/caches/__init__.py +0 -14
- google/genai/tests/shared/caches/test_create_get_delete.py +0 -67
- google/genai/tests/shared/caches/test_create_update_get.py +0 -71
- google/genai/tests/shared/caches/test_list.py +0 -40
- google/genai/tests/shared/chats/__init__.py +0 -14
- google/genai/tests/shared/chats/test_send_message.py +0 -48
- google/genai/tests/shared/chats/test_send_message_stream.py +0 -50
- google/genai/tests/shared/files/__init__.py +0 -14
- google/genai/tests/shared/files/test_list.py +0 -41
- google/genai/tests/shared/files/test_upload_get_delete.py +0 -54
- google/genai/tests/shared/models/__init__.py +0 -14
- google/genai/tests/shared/models/test_compute_tokens.py +0 -41
- google/genai/tests/shared/models/test_count_tokens.py +0 -40
- google/genai/tests/shared/models/test_edit_image.py +0 -67
- google/genai/tests/shared/models/test_embed.py +0 -40
- google/genai/tests/shared/models/test_generate_content.py +0 -39
- google/genai/tests/shared/models/test_generate_content_stream.py +0 -54
- google/genai/tests/shared/models/test_generate_images.py +0 -40
- google/genai/tests/shared/models/test_generate_videos.py +0 -38
- google/genai/tests/shared/models/test_list.py +0 -37
- google/genai/tests/shared/models/test_recontext_image.py +0 -55
- google/genai/tests/shared/models/test_segment_image.py +0 -52
- google/genai/tests/shared/models/test_upscale_image.py +0 -52
- google/genai/tests/shared/tunings/__init__.py +0 -16
- google/genai/tests/shared/tunings/test_create.py +0 -46
- google/genai/tests/shared/tunings/test_create_get_cancel.py +0 -56
- google/genai/tests/shared/tunings/test_list.py +0 -39
- google/genai/tests/tokens/__init__.py +0 -16
- google/genai/tests/tokens/test_create.py +0 -154
- google/genai/tests/transformers/__init__.py +0 -17
- google/genai/tests/transformers/test_blobs.py +0 -71
- google/genai/tests/transformers/test_bytes.py +0 -15
- google/genai/tests/transformers/test_duck_type.py +0 -96
- google/genai/tests/transformers/test_function_responses.py +0 -72
- google/genai/tests/transformers/test_schema.py +0 -653
- google/genai/tests/transformers/test_t_batch.py +0 -286
- google/genai/tests/transformers/test_t_content.py +0 -160
- google/genai/tests/transformers/test_t_contents.py +0 -398
- google/genai/tests/transformers/test_t_part.py +0 -85
- google/genai/tests/transformers/test_t_parts.py +0 -87
- google/genai/tests/transformers/test_t_tool.py +0 -157
- google/genai/tests/transformers/test_t_tools.py +0 -195
- google/genai/tests/tunings/__init__.py +0 -16
- google/genai/tests/tunings/test_cancel.py +0 -39
- google/genai/tests/tunings/test_end_to_end.py +0 -106
- google/genai/tests/tunings/test_get.py +0 -67
- google/genai/tests/tunings/test_list.py +0 -75
- google/genai/tests/tunings/test_tune.py +0 -268
- google/genai/tests/types/__init__.py +0 -16
- google/genai/tests/types/test_bytes_internal.py +0 -271
- google/genai/tests/types/test_bytes_type.py +0 -152
- google/genai/tests/types/test_future.py +0 -101
- google/genai/tests/types/test_optional_types.py +0 -36
- google/genai/tests/types/test_part_type.py +0 -616
- google/genai/tests/types/test_schema_from_json_schema.py +0 -417
- google/genai/tests/types/test_schema_json_schema.py +0 -468
- google/genai/tests/types/test_types.py +0 -2903
- google_genai-1.55.0.dist-info/RECORD +0 -345
- /google/genai/{tests/interactions/__init__.py → _interactions/py.typed} +0 -0
- {google_genai-1.55.0.dist-info → google_genai-1.56.0.dist-info}/WHEEL +0 -0
- {google_genai-1.55.0.dist-info → google_genai-1.56.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.55.0.dist-info → google_genai-1.56.0.dist-info}/top_level.txt +0 -0
|
@@ -1271,9 +1271,12 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1271
1271
|
*,
|
|
1272
1272
|
cast_to: Type[ResponseT],
|
|
1273
1273
|
body: Body | None = None,
|
|
1274
|
+
files: RequestFiles | None = None,
|
|
1274
1275
|
options: RequestOptions = {},
|
|
1275
1276
|
) -> ResponseT:
|
|
1276
|
-
opts = FinalRequestOptions.construct(
|
|
1277
|
+
opts = FinalRequestOptions.construct(
|
|
1278
|
+
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
|
|
1279
|
+
)
|
|
1277
1280
|
return self.request(cast_to, opts)
|
|
1278
1281
|
|
|
1279
1282
|
def put(
|
|
@@ -1791,9 +1794,12 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1791
1794
|
*,
|
|
1792
1795
|
cast_to: Type[ResponseT],
|
|
1793
1796
|
body: Body | None = None,
|
|
1797
|
+
files: RequestFiles | None = None,
|
|
1794
1798
|
options: RequestOptions = {},
|
|
1795
1799
|
) -> ResponseT:
|
|
1796
|
-
opts = FinalRequestOptions.construct(
|
|
1800
|
+
opts = FinalRequestOptions.construct(
|
|
1801
|
+
method="patch", url=path, json_data=body, files=to_httpx_files(files), **options
|
|
1802
|
+
)
|
|
1797
1803
|
return await self.request(cast_to, opts)
|
|
1798
1804
|
|
|
1799
1805
|
async def put(
|
|
@@ -475,7 +475,7 @@ class InteractionsResource(SyncAPIResource):
|
|
|
475
475
|
if not api_version:
|
|
476
476
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
477
477
|
return self._delete(
|
|
478
|
-
f
|
|
478
|
+
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'),
|
|
479
479
|
options=make_request_options(
|
|
480
480
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
481
481
|
),
|
|
@@ -514,7 +514,7 @@ class InteractionsResource(SyncAPIResource):
|
|
|
514
514
|
if not api_version:
|
|
515
515
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
516
516
|
return self._post(
|
|
517
|
-
f
|
|
517
|
+
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}/cancel'),
|
|
518
518
|
options=make_request_options(
|
|
519
519
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
520
520
|
),
|
|
@@ -641,7 +641,7 @@ class InteractionsResource(SyncAPIResource):
|
|
|
641
641
|
if not api_version:
|
|
642
642
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
643
643
|
return self._get(
|
|
644
|
-
f
|
|
644
|
+
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'),
|
|
645
645
|
options=make_request_options(
|
|
646
646
|
extra_headers=extra_headers,
|
|
647
647
|
extra_query=extra_query,
|
|
@@ -1092,7 +1092,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1092
1092
|
if not api_version:
|
|
1093
1093
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
1094
1094
|
return await self._delete(
|
|
1095
|
-
f
|
|
1095
|
+
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'),
|
|
1096
1096
|
options=make_request_options(
|
|
1097
1097
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1098
1098
|
),
|
|
@@ -1131,7 +1131,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1131
1131
|
if not api_version:
|
|
1132
1132
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
1133
1133
|
return await self._post(
|
|
1134
|
-
f
|
|
1134
|
+
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}/cancel'),
|
|
1135
1135
|
options=make_request_options(
|
|
1136
1136
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1137
1137
|
),
|
|
@@ -1258,7 +1258,7 @@ class AsyncInteractionsResource(AsyncAPIResource):
|
|
|
1258
1258
|
if not api_version:
|
|
1259
1259
|
raise ValueError(f"Expected a non-empty value for `api_version` but received {api_version!r}")
|
|
1260
1260
|
return await self._get(
|
|
1261
|
-
f
|
|
1261
|
+
self._client._build_maybe_vertex_path(api_version=api_version, path=f'interactions/{id}'),
|
|
1262
1262
|
options=make_request_options(
|
|
1263
1263
|
extra_headers=extra_headers,
|
|
1264
1264
|
extra_query=extra_query,
|
|
@@ -51,6 +51,7 @@ from .tool_choice_type import ToolChoiceType as ToolChoiceType
|
|
|
51
51
|
from .generation_config import GenerationConfig as GenerationConfig
|
|
52
52
|
from .interaction_event import InteractionEvent as InteractionEvent
|
|
53
53
|
from .tool_choice_param import ToolChoiceParam as ToolChoiceParam
|
|
54
|
+
from .document_mime_type import DocumentMimeType as DocumentMimeType
|
|
54
55
|
from .text_content_param import TextContentParam as TextContentParam
|
|
55
56
|
from .tool_choice_config import ToolChoiceConfig as ToolChoiceConfig
|
|
56
57
|
from .url_context_result import URLContextResult as URLContextResult
|
|
@@ -71,6 +72,7 @@ from .document_content_param import DocumentContentParam as DocumentContentParam
|
|
|
71
72
|
from .interaction_get_params import InteractionGetParams as InteractionGetParams
|
|
72
73
|
from .function_result_content import FunctionResultContent as FunctionResultContent
|
|
73
74
|
from .generation_config_param import GenerationConfigParam as GenerationConfigParam
|
|
75
|
+
from .document_mime_type_param import DocumentMimeTypeParam as DocumentMimeTypeParam
|
|
74
76
|
from .tool_choice_config_param import ToolChoiceConfigParam as ToolChoiceConfigParam
|
|
75
77
|
from .url_context_call_content import URLContextCallContent as URLContextCallContent
|
|
76
78
|
from .url_context_result_param import URLContextResultParam as URLContextResultParam
|
|
@@ -32,7 +32,6 @@ class AudioContentParam(TypedDict, total=False):
|
|
|
32
32
|
"""An audio content block."""
|
|
33
33
|
|
|
34
34
|
type: Required[Literal["audio"]]
|
|
35
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
36
35
|
|
|
37
36
|
data: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
|
|
38
37
|
|
|
@@ -28,7 +28,6 @@ class CodeExecutionCallContent(BaseModel):
|
|
|
28
28
|
"""Code execution content."""
|
|
29
29
|
|
|
30
30
|
type: Literal["code_execution_call"]
|
|
31
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
32
31
|
|
|
33
32
|
id: Optional[str] = None
|
|
34
33
|
"""A unique ID for this specific tool call."""
|
|
@@ -28,7 +28,6 @@ class CodeExecutionCallContentParam(TypedDict, total=False):
|
|
|
28
28
|
"""Code execution content."""
|
|
29
29
|
|
|
30
30
|
type: Required[Literal["code_execution_call"]]
|
|
31
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
32
31
|
|
|
33
32
|
id: str
|
|
34
33
|
"""A unique ID for this specific tool call."""
|
|
@@ -27,7 +27,6 @@ class CodeExecutionResultContent(BaseModel):
|
|
|
27
27
|
"""Code execution result content."""
|
|
28
28
|
|
|
29
29
|
type: Literal["code_execution_result"]
|
|
30
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
31
30
|
|
|
32
31
|
call_id: Optional[str] = None
|
|
33
32
|
"""ID to match the ID from the code execution call block."""
|
|
@@ -26,7 +26,6 @@ class CodeExecutionResultContentParam(TypedDict, total=False):
|
|
|
26
26
|
"""Code execution result content."""
|
|
27
27
|
|
|
28
28
|
type: Required[Literal["code_execution_result"]]
|
|
29
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
30
29
|
|
|
31
30
|
call_id: str
|
|
32
31
|
"""ID to match the ID from the code execution call block."""
|
|
@@ -26,6 +26,7 @@ from .image_content import ImageContent
|
|
|
26
26
|
from .audio_mime_type import AudioMimeType
|
|
27
27
|
from .image_mime_type import ImageMimeType
|
|
28
28
|
from .video_mime_type import VideoMimeType
|
|
29
|
+
from .document_mime_type import DocumentMimeType
|
|
29
30
|
from .url_context_result import URLContextResult
|
|
30
31
|
from .google_search_result import GoogleSearchResult
|
|
31
32
|
from .url_context_call_arguments import URLContextCallArguments
|
|
@@ -66,7 +67,6 @@ __all__ = [
|
|
|
66
67
|
|
|
67
68
|
class DeltaTextDelta(BaseModel):
|
|
68
69
|
type: Literal["text"]
|
|
69
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
70
70
|
|
|
71
71
|
annotations: Optional[List[Annotation]] = None
|
|
72
72
|
"""Citation information for model-generated content."""
|
|
@@ -76,14 +76,13 @@ class DeltaTextDelta(BaseModel):
|
|
|
76
76
|
|
|
77
77
|
class DeltaImageDelta(BaseModel):
|
|
78
78
|
type: Literal["image"]
|
|
79
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
80
79
|
|
|
81
80
|
data: Optional[str] = None
|
|
82
81
|
|
|
83
82
|
mime_type: Optional[ImageMimeType] = None
|
|
84
83
|
"""The mime type of the image."""
|
|
85
84
|
|
|
86
|
-
resolution: Optional[Literal["low", "medium", "high"]] = None
|
|
85
|
+
resolution: Optional[Literal["low", "medium", "high", "ultra_high"]] = None
|
|
87
86
|
"""The resolution of the media."""
|
|
88
87
|
|
|
89
88
|
uri: Optional[str] = None
|
|
@@ -91,7 +90,6 @@ class DeltaImageDelta(BaseModel):
|
|
|
91
90
|
|
|
92
91
|
class DeltaAudioDelta(BaseModel):
|
|
93
92
|
type: Literal["audio"]
|
|
94
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
95
93
|
|
|
96
94
|
data: Optional[str] = None
|
|
97
95
|
|
|
@@ -103,25 +101,24 @@ class DeltaAudioDelta(BaseModel):
|
|
|
103
101
|
|
|
104
102
|
class DeltaDocumentDelta(BaseModel):
|
|
105
103
|
type: Literal["document"]
|
|
106
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
107
104
|
|
|
108
105
|
data: Optional[str] = None
|
|
109
106
|
|
|
110
|
-
mime_type: Optional[
|
|
107
|
+
mime_type: Optional[DocumentMimeType] = None
|
|
108
|
+
"""The mime type of the document."""
|
|
111
109
|
|
|
112
110
|
uri: Optional[str] = None
|
|
113
111
|
|
|
114
112
|
|
|
115
113
|
class DeltaVideoDelta(BaseModel):
|
|
116
114
|
type: Literal["video"]
|
|
117
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
118
115
|
|
|
119
116
|
data: Optional[str] = None
|
|
120
117
|
|
|
121
118
|
mime_type: Optional[VideoMimeType] = None
|
|
122
119
|
"""The mime type of the video."""
|
|
123
120
|
|
|
124
|
-
resolution: Optional[Literal["low", "medium", "high"]] = None
|
|
121
|
+
resolution: Optional[Literal["low", "medium", "high", "ultra_high"]] = None
|
|
125
122
|
"""The resolution of the media."""
|
|
126
123
|
|
|
127
124
|
uri: Optional[str] = None
|
|
@@ -134,7 +131,6 @@ DeltaThoughtSummaryDeltaContent: TypeAlias = Annotated[
|
|
|
134
131
|
|
|
135
132
|
class DeltaThoughtSummaryDelta(BaseModel):
|
|
136
133
|
type: Literal["thought_summary"]
|
|
137
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
138
134
|
|
|
139
135
|
content: Optional[DeltaThoughtSummaryDeltaContent] = None
|
|
140
136
|
"""A text content block."""
|
|
@@ -142,7 +138,6 @@ class DeltaThoughtSummaryDelta(BaseModel):
|
|
|
142
138
|
|
|
143
139
|
class DeltaThoughtSignatureDelta(BaseModel):
|
|
144
140
|
type: Literal["thought_signature"]
|
|
145
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
146
141
|
|
|
147
142
|
signature: Optional[str] = None
|
|
148
143
|
"""Signature to match the backend source to be part of the generation."""
|
|
@@ -150,7 +145,6 @@ class DeltaThoughtSignatureDelta(BaseModel):
|
|
|
150
145
|
|
|
151
146
|
class DeltaFunctionCallDelta(BaseModel):
|
|
152
147
|
type: Literal["function_call"]
|
|
153
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
154
148
|
|
|
155
149
|
id: Optional[str] = None
|
|
156
150
|
"""A unique ID for this specific tool call."""
|
|
@@ -160,7 +154,7 @@ class DeltaFunctionCallDelta(BaseModel):
|
|
|
160
154
|
name: Optional[str] = None
|
|
161
155
|
|
|
162
156
|
|
|
163
|
-
DeltaFunctionResultDeltaResultItemsItem: TypeAlias = Union[str, ImageContent]
|
|
157
|
+
DeltaFunctionResultDeltaResultItemsItem: TypeAlias = Union[str, ImageContent, object]
|
|
164
158
|
|
|
165
159
|
|
|
166
160
|
class DeltaFunctionResultDeltaResultItems(BaseModel):
|
|
@@ -172,7 +166,6 @@ DeltaFunctionResultDeltaResult: TypeAlias = Union[DeltaFunctionResultDeltaResult
|
|
|
172
166
|
|
|
173
167
|
class DeltaFunctionResultDelta(BaseModel):
|
|
174
168
|
type: Literal["function_result"]
|
|
175
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
176
169
|
|
|
177
170
|
call_id: Optional[str] = None
|
|
178
171
|
"""ID to match the ID from the function call block."""
|
|
@@ -187,7 +180,6 @@ class DeltaFunctionResultDelta(BaseModel):
|
|
|
187
180
|
|
|
188
181
|
class DeltaCodeExecutionCallDelta(BaseModel):
|
|
189
182
|
type: Literal["code_execution_call"]
|
|
190
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
191
183
|
|
|
192
184
|
id: Optional[str] = None
|
|
193
185
|
"""A unique ID for this specific tool call."""
|
|
@@ -198,7 +190,6 @@ class DeltaCodeExecutionCallDelta(BaseModel):
|
|
|
198
190
|
|
|
199
191
|
class DeltaCodeExecutionResultDelta(BaseModel):
|
|
200
192
|
type: Literal["code_execution_result"]
|
|
201
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
202
193
|
|
|
203
194
|
call_id: Optional[str] = None
|
|
204
195
|
"""ID to match the ID from the function call block."""
|
|
@@ -212,7 +203,6 @@ class DeltaCodeExecutionResultDelta(BaseModel):
|
|
|
212
203
|
|
|
213
204
|
class DeltaURLContextCallDelta(BaseModel):
|
|
214
205
|
type: Literal["url_context_call"]
|
|
215
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
216
206
|
|
|
217
207
|
id: Optional[str] = None
|
|
218
208
|
"""A unique ID for this specific tool call."""
|
|
@@ -223,7 +213,6 @@ class DeltaURLContextCallDelta(BaseModel):
|
|
|
223
213
|
|
|
224
214
|
class DeltaURLContextResultDelta(BaseModel):
|
|
225
215
|
type: Literal["url_context_result"]
|
|
226
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
227
216
|
|
|
228
217
|
call_id: Optional[str] = None
|
|
229
218
|
"""ID to match the ID from the function call block."""
|
|
@@ -237,7 +226,6 @@ class DeltaURLContextResultDelta(BaseModel):
|
|
|
237
226
|
|
|
238
227
|
class DeltaGoogleSearchCallDelta(BaseModel):
|
|
239
228
|
type: Literal["google_search_call"]
|
|
240
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
241
229
|
|
|
242
230
|
id: Optional[str] = None
|
|
243
231
|
"""A unique ID for this specific tool call."""
|
|
@@ -248,7 +236,6 @@ class DeltaGoogleSearchCallDelta(BaseModel):
|
|
|
248
236
|
|
|
249
237
|
class DeltaGoogleSearchResultDelta(BaseModel):
|
|
250
238
|
type: Literal["google_search_result"]
|
|
251
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
252
239
|
|
|
253
240
|
call_id: Optional[str] = None
|
|
254
241
|
"""ID to match the ID from the function call block."""
|
|
@@ -262,7 +249,6 @@ class DeltaGoogleSearchResultDelta(BaseModel):
|
|
|
262
249
|
|
|
263
250
|
class DeltaMCPServerToolCallDelta(BaseModel):
|
|
264
251
|
type: Literal["mcp_server_tool_call"]
|
|
265
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
266
252
|
|
|
267
253
|
id: Optional[str] = None
|
|
268
254
|
"""A unique ID for this specific tool call."""
|
|
@@ -274,7 +260,7 @@ class DeltaMCPServerToolCallDelta(BaseModel):
|
|
|
274
260
|
server_name: Optional[str] = None
|
|
275
261
|
|
|
276
262
|
|
|
277
|
-
DeltaMCPServerToolResultDeltaResultItemsItem: TypeAlias = Union[str, ImageContent]
|
|
263
|
+
DeltaMCPServerToolResultDeltaResultItemsItem: TypeAlias = Union[str, ImageContent, object]
|
|
278
264
|
|
|
279
265
|
|
|
280
266
|
class DeltaMCPServerToolResultDeltaResultItems(BaseModel):
|
|
@@ -286,7 +272,6 @@ DeltaMCPServerToolResultDeltaResult: TypeAlias = Union[DeltaMCPServerToolResultD
|
|
|
286
272
|
|
|
287
273
|
class DeltaMCPServerToolResultDelta(BaseModel):
|
|
288
274
|
type: Literal["mcp_server_tool_result"]
|
|
289
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
290
275
|
|
|
291
276
|
call_id: Optional[str] = None
|
|
292
277
|
"""ID to match the ID from the function call block."""
|
|
@@ -314,7 +299,6 @@ class DeltaFileSearchResultDeltaResult(BaseModel):
|
|
|
314
299
|
|
|
315
300
|
class DeltaFileSearchResultDelta(BaseModel):
|
|
316
301
|
type: Literal["file_search_result"]
|
|
317
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
318
302
|
|
|
319
303
|
result: Optional[List[DeltaFileSearchResultDeltaResult]] = None
|
|
320
304
|
|
|
@@ -19,6 +19,7 @@ from typing import Optional
|
|
|
19
19
|
from typing_extensions import Literal
|
|
20
20
|
|
|
21
21
|
from .._models import BaseModel
|
|
22
|
+
from .document_mime_type import DocumentMimeType
|
|
22
23
|
|
|
23
24
|
__all__ = ["DocumentContent"]
|
|
24
25
|
|
|
@@ -27,10 +28,10 @@ class DocumentContent(BaseModel):
|
|
|
27
28
|
"""A document content block."""
|
|
28
29
|
|
|
29
30
|
type: Literal["document"]
|
|
30
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
31
31
|
|
|
32
32
|
data: Optional[str] = None
|
|
33
33
|
|
|
34
|
-
mime_type: Optional[
|
|
34
|
+
mime_type: Optional[DocumentMimeType] = None
|
|
35
|
+
"""The mime type of the document."""
|
|
35
36
|
|
|
36
37
|
uri: Optional[str] = None
|
|
@@ -23,6 +23,7 @@ from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
|
23
23
|
from .._types import Base64FileInput
|
|
24
24
|
from .._utils import PropertyInfo
|
|
25
25
|
from .._models import set_pydantic_config
|
|
26
|
+
from .document_mime_type_param import DocumentMimeTypeParam
|
|
26
27
|
|
|
27
28
|
__all__ = ["DocumentContentParam"]
|
|
28
29
|
|
|
@@ -31,11 +32,11 @@ class DocumentContentParam(TypedDict, total=False):
|
|
|
31
32
|
"""A document content block."""
|
|
32
33
|
|
|
33
34
|
type: Required[Literal["document"]]
|
|
34
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
35
35
|
|
|
36
36
|
data: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
|
|
37
37
|
|
|
38
|
-
mime_type:
|
|
38
|
+
mime_type: DocumentMimeTypeParam
|
|
39
|
+
"""The mime type of the document."""
|
|
39
40
|
|
|
40
41
|
uri: str
|
|
41
42
|
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
#
|
|
15
15
|
|
|
16
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
from typing import Union
|
|
19
|
+
from typing_extensions import Literal, TypeAlias
|
|
18
20
|
|
|
21
|
+
__all__ = ["DocumentMimeType"]
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
pytest.register_assert_rewrite('genai.replay_api_client')
|
|
23
|
+
DocumentMimeType: TypeAlias = Union[str, Literal["application/pdf"]]
|
|
@@ -13,9 +13,13 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
#
|
|
15
15
|
|
|
16
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
from __future__ import annotations
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
from typing import Union
|
|
21
|
+
from typing_extensions import Literal, TypeAlias
|
|
22
|
+
|
|
23
|
+
__all__ = ["DocumentMimeTypeParam"]
|
|
24
|
+
|
|
25
|
+
DocumentMimeTypeParam: TypeAlias = Union[str, Literal["application/pdf"]]
|
|
@@ -29,7 +29,6 @@ class DynamicAgentConfig(BaseModel):
|
|
|
29
29
|
"""Configuration for dynamic agents."""
|
|
30
30
|
|
|
31
31
|
type: Optional[Literal["dynamic"]] = None
|
|
32
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
33
32
|
|
|
34
33
|
if TYPE_CHECKING:
|
|
35
34
|
# Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
|
|
@@ -27,7 +27,6 @@ class DynamicAgentConfigParamTyped(TypedDict, total=False):
|
|
|
27
27
|
"""Configuration for dynamic agents."""
|
|
28
28
|
|
|
29
29
|
type: Literal["dynamic"]
|
|
30
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
DynamicAgentConfigParam: TypeAlias = Union[DynamicAgentConfigParamTyped, Dict[str, object]]
|
|
@@ -40,7 +40,6 @@ class FileSearchResultContent(BaseModel):
|
|
|
40
40
|
"""File Search result content."""
|
|
41
41
|
|
|
42
42
|
type: Literal["file_search_result"]
|
|
43
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
44
43
|
|
|
45
44
|
result: Optional[List[Result]] = None
|
|
46
45
|
"""The results of the File Search."""
|
|
@@ -40,7 +40,6 @@ class FileSearchResultContentParam(TypedDict, total=False):
|
|
|
40
40
|
"""File Search result content."""
|
|
41
41
|
|
|
42
42
|
type: Required[Literal["file_search_result"]]
|
|
43
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
44
43
|
|
|
45
44
|
result: Iterable[Result]
|
|
46
45
|
"""The results of the File Search."""
|
|
@@ -23,7 +23,7 @@ from .image_content import ImageContent
|
|
|
23
23
|
|
|
24
24
|
__all__ = ["FunctionResultContent", "Result", "ResultItems", "ResultItemsItem"]
|
|
25
25
|
|
|
26
|
-
ResultItemsItem: TypeAlias = Union[str, ImageContent]
|
|
26
|
+
ResultItemsItem: TypeAlias = Union[str, ImageContent, object]
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class ResultItems(BaseModel):
|
|
@@ -43,7 +43,6 @@ class FunctionResultContent(BaseModel):
|
|
|
43
43
|
"""The result of the tool call."""
|
|
44
44
|
|
|
45
45
|
type: Literal["function_result"]
|
|
46
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
47
46
|
|
|
48
47
|
is_error: Optional[bool] = None
|
|
49
48
|
"""Whether the tool call resulted in an error."""
|
|
@@ -25,7 +25,7 @@ from .image_content_param import ImageContentParam
|
|
|
25
25
|
|
|
26
26
|
__all__ = ["FunctionResultContentParam", "Result", "ResultItems", "ResultItemsItem"]
|
|
27
27
|
|
|
28
|
-
ResultItemsItem: TypeAlias = Union[str, ImageContentParam]
|
|
28
|
+
ResultItemsItem: TypeAlias = Union[str, ImageContentParam, object]
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class ResultItems(TypedDict, total=False):
|
|
@@ -45,7 +45,6 @@ class FunctionResultContentParam(TypedDict, total=False):
|
|
|
45
45
|
"""The result of the tool call."""
|
|
46
46
|
|
|
47
47
|
type: Required[Literal["function_result"]]
|
|
48
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
49
48
|
|
|
50
49
|
is_error: bool
|
|
51
50
|
"""Whether the tool call resulted in an error."""
|
|
@@ -28,7 +28,6 @@ class GoogleSearchCallContent(BaseModel):
|
|
|
28
28
|
"""Google Search content."""
|
|
29
29
|
|
|
30
30
|
type: Literal["google_search_call"]
|
|
31
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
32
31
|
|
|
33
32
|
id: Optional[str] = None
|
|
34
33
|
"""A unique ID for this specific tool call."""
|
|
@@ -28,7 +28,6 @@ class GoogleSearchCallContentParam(TypedDict, total=False):
|
|
|
28
28
|
"""Google Search content."""
|
|
29
29
|
|
|
30
30
|
type: Required[Literal["google_search_call"]]
|
|
31
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
32
31
|
|
|
33
32
|
id: str
|
|
34
33
|
"""A unique ID for this specific tool call."""
|
|
@@ -28,7 +28,6 @@ class GoogleSearchResultContent(BaseModel):
|
|
|
28
28
|
"""Google Search result content."""
|
|
29
29
|
|
|
30
30
|
type: Literal["google_search_result"]
|
|
31
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
32
31
|
|
|
33
32
|
call_id: Optional[str] = None
|
|
34
33
|
"""ID to match the ID from the google search call block."""
|
|
@@ -29,7 +29,6 @@ class GoogleSearchResultContentParam(TypedDict, total=False):
|
|
|
29
29
|
"""Google Search result content."""
|
|
30
30
|
|
|
31
31
|
type: Required[Literal["google_search_result"]]
|
|
32
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
33
32
|
|
|
34
33
|
call_id: str
|
|
35
34
|
"""ID to match the ID from the google search call block."""
|
|
@@ -28,14 +28,13 @@ class ImageContent(BaseModel):
|
|
|
28
28
|
"""An image content block."""
|
|
29
29
|
|
|
30
30
|
type: Literal["image"]
|
|
31
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
32
31
|
|
|
33
32
|
data: Optional[str] = None
|
|
34
33
|
|
|
35
34
|
mime_type: Optional[ImageMimeType] = None
|
|
36
35
|
"""The mime type of the image."""
|
|
37
36
|
|
|
38
|
-
resolution: Optional[Literal["low", "medium", "high"]] = None
|
|
37
|
+
resolution: Optional[Literal["low", "medium", "high", "ultra_high"]] = None
|
|
39
38
|
"""The resolution of the media."""
|
|
40
39
|
|
|
41
40
|
uri: Optional[str] = None
|
|
@@ -32,14 +32,13 @@ class ImageContentParam(TypedDict, total=False):
|
|
|
32
32
|
"""An image content block."""
|
|
33
33
|
|
|
34
34
|
type: Required[Literal["image"]]
|
|
35
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
36
35
|
|
|
37
36
|
data: Annotated[Union[str, Base64FileInput], PropertyInfo(format="base64")]
|
|
38
37
|
|
|
39
38
|
mime_type: ImageMimeTypeParam
|
|
40
39
|
"""The mime type of the image."""
|
|
41
40
|
|
|
42
|
-
resolution: Literal["low", "medium", "high"]
|
|
41
|
+
resolution: Literal["low", "medium", "high", "ultra_high"]
|
|
43
42
|
"""The resolution of the media."""
|
|
44
43
|
|
|
45
44
|
uri: str
|
|
@@ -23,7 +23,7 @@ from .image_content import ImageContent
|
|
|
23
23
|
|
|
24
24
|
__all__ = ["MCPServerToolResultContent", "Result", "ResultItems", "ResultItemsItem"]
|
|
25
25
|
|
|
26
|
-
ResultItemsItem: TypeAlias = Union[str, ImageContent]
|
|
26
|
+
ResultItemsItem: TypeAlias = Union[str, ImageContent, object]
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class ResultItems(BaseModel):
|
|
@@ -43,7 +43,6 @@ class MCPServerToolResultContent(BaseModel):
|
|
|
43
43
|
"""The result of the tool call."""
|
|
44
44
|
|
|
45
45
|
type: Literal["mcp_server_tool_result"]
|
|
46
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
47
46
|
|
|
48
47
|
name: Optional[str] = None
|
|
49
48
|
"""Name of the tool which is called for this specific tool call."""
|
|
@@ -25,7 +25,7 @@ from .image_content_param import ImageContentParam
|
|
|
25
25
|
|
|
26
26
|
__all__ = ["MCPServerToolResultContentParam", "Result", "ResultItems", "ResultItemsItem"]
|
|
27
27
|
|
|
28
|
-
ResultItemsItem: TypeAlias = Union[str, ImageContentParam]
|
|
28
|
+
ResultItemsItem: TypeAlias = Union[str, ImageContentParam, object]
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class ResultItems(TypedDict, total=False):
|
|
@@ -45,7 +45,6 @@ class MCPServerToolResultContentParam(TypedDict, total=False):
|
|
|
45
45
|
"""The result of the tool call."""
|
|
46
46
|
|
|
47
47
|
type: Required[Literal["mcp_server_tool_result"]]
|
|
48
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
49
48
|
|
|
50
49
|
name: str
|
|
51
50
|
"""Name of the tool which is called for this specific tool call."""
|
|
@@ -28,7 +28,6 @@ class TextContent(BaseModel):
|
|
|
28
28
|
"""A text content block."""
|
|
29
29
|
|
|
30
30
|
type: Literal["text"]
|
|
31
|
-
"""Used as the OpenAPI type discriminator for the content oneof."""
|
|
32
31
|
|
|
33
32
|
annotations: Optional[List[Annotation]] = None
|
|
34
33
|
"""Citation information for model-generated content."""
|