ogx_open_client 1.0.3.dev0__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.
- ogx_client/__init__.py +1135 -0
- ogx_client/_exceptions.py +114 -0
- ogx_client/_types.py +312 -0
- ogx_client/_version.py +8 -0
- ogx_client/api/__init__.py +33 -0
- ogx_client/api/admin_api.py +1411 -0
- ogx_client/api/alpha_api.py +354 -0
- ogx_client/api/batches_api.py +1247 -0
- ogx_client/api/chat_api.py +352 -0
- ogx_client/api/chat_completions_api.py +1028 -0
- ogx_client/api/completions_api.py +440 -0
- ogx_client/api/connectors_api.py +1235 -0
- ogx_client/api/conversations_api.py +1288 -0
- ogx_client/api/embeddings_api.py +429 -0
- ogx_client/api/file_batches_api.py +1370 -0
- ogx_client/api/file_processors_api.py +442 -0
- ogx_client/api/files_api.py +1539 -0
- ogx_client/api/inference_api.py +429 -0
- ogx_client/api/input_items_api.py +472 -0
- ogx_client/api/inspect_api.py +617 -0
- ogx_client/api/interactions_api.py +430 -0
- ogx_client/api/items_api.py +1359 -0
- ogx_client/api/messages_api.py +2466 -0
- ogx_client/api/models_api.py +451 -0
- ogx_client/api/openai_api.py +481 -0
- ogx_client/api/prompts_api.py +1883 -0
- ogx_client/api/providers_api.py +636 -0
- ogx_client/api/responses_api.py +1876 -0
- ogx_client/api/routes_api.py +389 -0
- ogx_client/api/tools_api.py +389 -0
- ogx_client/api/vector_io_api.py +740 -0
- ogx_client/api/vector_stores_api.py +1936 -0
- ogx_client/api/vector_stores_files_api.py +2011 -0
- ogx_client/api/versions_api.py +386 -0
- ogx_client/api_client.py +833 -0
- ogx_client/api_response.py +21 -0
- ogx_client/async_api_client.py +203 -0
- ogx_client/async_api_response.py +134 -0
- ogx_client/async_stream.py +161 -0
- ogx_client/configuration.py +585 -0
- ogx_client/exceptions.py +253 -0
- ogx_client/lib/__init__.py +17 -0
- ogx_client/lib/_utils.py +26 -0
- ogx_client/lib/agents/__init__.py +5 -0
- ogx_client/lib/agents/agent.py +540 -0
- ogx_client/lib/agents/client_tool.py +258 -0
- ogx_client/lib/agents/event_logger.py +134 -0
- ogx_client/lib/agents/event_synthesizer.py +448 -0
- ogx_client/lib/agents/react/__init__.py +5 -0
- ogx_client/lib/agents/react/agent.py +94 -0
- ogx_client/lib/agents/react/prompts.py +151 -0
- ogx_client/lib/agents/react/tool_parser.py +59 -0
- ogx_client/lib/agents/tool_parser.py +42 -0
- ogx_client/lib/agents/turn_events.py +268 -0
- ogx_client/lib/agents/types.py +63 -0
- ogx_client/lib/cli/__init__.py +12 -0
- ogx_client/lib/cli/common/__init__.py +5 -0
- ogx_client/lib/cli/common/utils.py +54 -0
- ogx_client/lib/cli/configure.py +68 -0
- ogx_client/lib/cli/constants.py +14 -0
- ogx_client/lib/cli/datasets/__init__.py +9 -0
- ogx_client/lib/cli/datasets/datasets.py +22 -0
- ogx_client/lib/cli/datasets/list.py +32 -0
- ogx_client/lib/cli/datasets/register.py +78 -0
- ogx_client/lib/cli/datasets/unregister.py +20 -0
- ogx_client/lib/cli/eval/__init__.py +9 -0
- ogx_client/lib/cli/eval/eval.py +22 -0
- ogx_client/lib/cli/eval/run_benchmark.py +193 -0
- ogx_client/lib/cli/eval/run_scoring.py +116 -0
- ogx_client/lib/cli/eval/utils.py +59 -0
- ogx_client/lib/cli/eval_tasks/__init__.py +9 -0
- ogx_client/lib/cli/eval_tasks/eval_tasks.py +65 -0
- ogx_client/lib/cli/eval_tasks/list.py +35 -0
- ogx_client/lib/cli/inference/__init__.py +9 -0
- ogx_client/lib/cli/inference/inference.py +88 -0
- ogx_client/lib/cli/inspect/__init__.py +9 -0
- ogx_client/lib/cli/inspect/inspect.py +19 -0
- ogx_client/lib/cli/inspect/version.py +22 -0
- ogx_client/lib/cli/models/__init__.py +9 -0
- ogx_client/lib/cli/models/models.py +149 -0
- ogx_client/lib/cli/ogx_client.py +111 -0
- ogx_client/lib/cli/post_training/__init__.py +9 -0
- ogx_client/lib/cli/post_training/post_training.py +114 -0
- ogx_client/lib/cli/providers/__init__.py +9 -0
- ogx_client/lib/cli/providers/inspect.py +33 -0
- ogx_client/lib/cli/providers/list.py +32 -0
- ogx_client/lib/cli/providers/providers.py +21 -0
- ogx_client/lib/cli/scoring_functions/__init__.py +9 -0
- ogx_client/lib/cli/scoring_functions/list.py +38 -0
- ogx_client/lib/cli/scoring_functions/scoring_functions.py +62 -0
- ogx_client/lib/cli/toolgroups/__init__.py +9 -0
- ogx_client/lib/cli/toolgroups/toolgroups.py +129 -0
- ogx_client/lib/cli/vector_stores/__init__.py +9 -0
- ogx_client/lib/cli/vector_stores/vector_stores.py +138 -0
- ogx_client/lib/inference/__init__.py +5 -0
- ogx_client/lib/inference/event_logger.py +58 -0
- ogx_client/lib/inference/utils.py +21 -0
- ogx_client/lib/stream_printer.py +30 -0
- ogx_client/lib/tools/__init__.py +9 -0
- ogx_client/lib/tools/mcp_oauth.py +303 -0
- ogx_client/models/__init__.py +505 -0
- ogx_client/models/add_items_request.py +148 -0
- ogx_client/models/allowed_tools_config.py +145 -0
- ogx_client/models/allowed_tools_filter.py +141 -0
- ogx_client/models/anthropic_base64_image_source.py +140 -0
- ogx_client/models/anthropic_base64_image_source_anthropic_url_image_source.py +396 -0
- ogx_client/models/anthropic_count_tokens_request.py +170 -0
- ogx_client/models/anthropic_count_tokens_response.py +119 -0
- ogx_client/models/anthropic_create_message_request.py +217 -0
- ogx_client/models/anthropic_image_block.py +144 -0
- ogx_client/models/anthropic_list_models_response.py +163 -0
- ogx_client/models/anthropic_message.py +141 -0
- ogx_client/models/anthropic_message_response.py +187 -0
- ogx_client/models/anthropic_model_info.py +149 -0
- ogx_client/models/anthropic_text_block.py +131 -0
- ogx_client/models/anthropic_text_block5_variants.py +549 -0
- ogx_client/models/anthropic_text_block5_variants1.py +549 -0
- ogx_client/models/anthropic_text_block_anthropic_image_block.py +203 -0
- ogx_client/models/anthropic_thinking_block.py +138 -0
- ogx_client/models/anthropic_thinking_config.py +137 -0
- ogx_client/models/anthropic_tool_def.py +128 -0
- ogx_client/models/anthropic_tool_result_block_input.py +153 -0
- ogx_client/models/anthropic_tool_result_block_output.py +153 -0
- ogx_client/models/anthropic_tool_use_block.py +135 -0
- ogx_client/models/anthropic_url_image_source.py +131 -0
- ogx_client/models/anthropic_usage.py +135 -0
- ogx_client/models/api.py +59 -0
- ogx_client/models/approval_filter.py +148 -0
- ogx_client/models/array_type.py +129 -0
- ogx_client/models/batch.py +302 -0
- ogx_client/models/batch_error.py +158 -0
- ogx_client/models/batch_request_counts.py +136 -0
- ogx_client/models/batch_usage.py +166 -0
- ogx_client/models/bf16_quantization_config.py +129 -0
- ogx_client/models/boolean_type.py +129 -0
- ogx_client/models/cancel_batch_request.py +119 -0
- ogx_client/models/chat_completion_input_type.py +129 -0
- ogx_client/models/chat_completion_message.py +216 -0
- ogx_client/models/chat_completion_message_custom_tool_call.py +143 -0
- ogx_client/models/chat_completion_message_custom_tool_call_custom.py +121 -0
- ogx_client/models/chat_completion_message_function_call.py +121 -0
- ogx_client/models/chat_completion_message_list.py +165 -0
- ogx_client/models/chat_completion_message_tool_call.py +143 -0
- ogx_client/models/chat_completion_message_tool_call_chat_completion_message_custom_tool_call.py +203 -0
- ogx_client/models/chat_completion_message_tool_call_chat_completion_message_custom_tool_call1.py +206 -0
- ogx_client/models/chat_completion_message_tool_call_function.py +121 -0
- ogx_client/models/chunk.py +151 -0
- ogx_client/models/chunk_for_deletion.py +121 -0
- ogx_client/models/chunk_metadata.py +180 -0
- ogx_client/models/compact_response_request.py +239 -0
- ogx_client/models/comparison_filter.py +135 -0
- ogx_client/models/completion_input_type.py +129 -0
- ogx_client/models/compound_filter.py +128 -0
- ogx_client/models/connector.py +152 -0
- ogx_client/models/connector_input.py +131 -0
- ogx_client/models/connector_type.py +42 -0
- ogx_client/models/context_management.py +133 -0
- ogx_client/models/conversation.py +140 -0
- ogx_client/models/conversation_deleted_resource.py +133 -0
- ogx_client/models/conversation_item.py +855 -0
- ogx_client/models/conversation_item_create_request.py +148 -0
- ogx_client/models/conversation_item_deleted_resource.py +133 -0
- ogx_client/models/conversation_item_include.py +48 -0
- ogx_client/models/conversation_item_list.py +158 -0
- ogx_client/models/conversation_message.py +149 -0
- ogx_client/models/create_batch_request.py +144 -0
- ogx_client/models/create_conversation_request.py +159 -0
- ogx_client/models/create_message_batch_request.py +148 -0
- ogx_client/models/create_prompt_request.py +126 -0
- ogx_client/models/create_response_request.py +407 -0
- ogx_client/models/custom_tool_config.py +119 -0
- ogx_client/models/delete_chunks_request.py +132 -0
- ogx_client/models/delete_conversation_request.py +119 -0
- ogx_client/models/delete_file_request.py +119 -0
- ogx_client/models/delete_item_request.py +121 -0
- ogx_client/models/delete_prompt_request.py +119 -0
- ogx_client/models/dialog_type.py +129 -0
- ogx_client/models/embedded_chunk.py +157 -0
- ogx_client/models/embedded_chunk_input.py +157 -0
- ogx_client/models/embedded_chunk_output.py +157 -0
- ogx_client/models/embeddings_response.py +136 -0
- ogx_client/models/error.py +143 -0
- ogx_client/models/error_detail.py +313 -0
- ogx_client/models/errors.py +172 -0
- ogx_client/models/expires_after.py +129 -0
- ogx_client/models/fp8_quantization_config.py +129 -0
- ogx_client/models/function_tool_config.py +119 -0
- ogx_client/models/get_chat_completion_request.py +119 -0
- ogx_client/models/get_connector_request.py +119 -0
- ogx_client/models/get_connector_tool_request.py +121 -0
- ogx_client/models/get_conversation_request.py +119 -0
- ogx_client/models/get_model_request.py +119 -0
- ogx_client/models/get_model_v1_models_model_id_get200_response.py +414 -0
- ogx_client/models/get_prompt_request.py +126 -0
- ogx_client/models/google_create_interaction_request.py +213 -0
- ogx_client/models/google_function_call_content.py +153 -0
- ogx_client/models/google_function_call_output.py +153 -0
- ogx_client/models/google_function_declaration.py +146 -0
- ogx_client/models/google_function_response_content.py +160 -0
- ogx_client/models/google_generation_config.py +146 -0
- ogx_client/models/google_input_turn.py +141 -0
- ogx_client/models/google_interaction_response.py +199 -0
- ogx_client/models/google_list_models_response.py +147 -0
- ogx_client/models/google_model_info.py +123 -0
- ogx_client/models/google_text_content.py +131 -0
- ogx_client/models/google_text_content_google_function_call_content_google_function_response_content.py +218 -0
- ogx_client/models/google_text_output.py +131 -0
- ogx_client/models/google_text_output_google_function_call_output_google_thought_output.py +447 -0
- ogx_client/models/google_thought_output.py +149 -0
- ogx_client/models/google_tool.py +145 -0
- ogx_client/models/google_usage.py +136 -0
- ogx_client/models/grammar_response_format.py +131 -0
- ogx_client/models/greedy_sampling_strategy.py +129 -0
- ogx_client/models/greedy_sampling_strategy_top_p_sampling_strategy_top_k_sampling_strategy.py +447 -0
- ogx_client/models/health_info.py +120 -0
- ogx_client/models/health_status.py +44 -0
- ogx_client/models/image_content_item.py +144 -0
- ogx_client/models/image_content_item_input.py +144 -0
- ogx_client/models/image_content_item_input_text_content_item.py +396 -0
- ogx_client/models/image_content_item_output.py +144 -0
- ogx_client/models/image_content_item_output_text_content_item.py +396 -0
- ogx_client/models/image_content_item_text_content_item.py +396 -0
- ogx_client/models/image_delta.py +131 -0
- ogx_client/models/inline_provider_spec.py +183 -0
- ogx_client/models/input_tokens_details.py +132 -0
- ogx_client/models/insert_chunks_request.py +139 -0
- ogx_client/models/inspect_provider_request.py +119 -0
- ogx_client/models/int4_quantization_config.py +136 -0
- ogx_client/models/integer_number.py +207 -0
- ogx_client/models/interleaved_content.py +280 -0
- ogx_client/models/interleaved_content_item.py +396 -0
- ogx_client/models/job.py +122 -0
- ogx_client/models/job_status.py +46 -0
- ogx_client/models/json_schema_response_format.py +131 -0
- ogx_client/models/json_type.py +129 -0
- ogx_client/models/list_batches_request.py +126 -0
- ogx_client/models/list_batches_response.py +158 -0
- ogx_client/models/list_chat_completion_messages_request.py +142 -0
- ogx_client/models/list_chat_completions_request.py +147 -0
- ogx_client/models/list_connector_tools_request.py +119 -0
- ogx_client/models/list_connectors_response.py +147 -0
- ogx_client/models/list_files_request.py +147 -0
- ogx_client/models/list_items_request.py +158 -0
- ogx_client/models/list_message_batches_response.py +163 -0
- ogx_client/models/list_models_response.py +147 -0
- ogx_client/models/list_models_v1_models_get200_response.py +414 -0
- ogx_client/models/list_number_string.py +265 -0
- ogx_client/models/list_open_ai_chat_completion_response.py +165 -0
- ogx_client/models/list_open_ai_file_response.py +165 -0
- ogx_client/models/list_open_ai_response_input_item.py +159 -0
- ogx_client/models/list_open_ai_response_object.py +165 -0
- ogx_client/models/list_prompt_versions_request.py +119 -0
- ogx_client/models/list_prompts_response.py +147 -0
- ogx_client/models/list_providers_response.py +147 -0
- ogx_client/models/list_routes_request.py +134 -0
- ogx_client/models/list_routes_response.py +147 -0
- ogx_client/models/list_string_allowed_tools_filter.py +269 -0
- ogx_client/models/list_tool_defs_response.py +147 -0
- ogx_client/models/list_tool_groups_response.py +147 -0
- ogx_client/models/list_tools_request.py +124 -0
- ogx_client/models/list_tools_response.py +147 -0
- ogx_client/models/mcp_list_tools_tool.py +128 -0
- ogx_client/models/message_batch.py +187 -0
- ogx_client/models/message_batch_request_counts.py +127 -0
- ogx_client/models/message_batch_request_params.py +142 -0
- ogx_client/models/metric_in_response.py +141 -0
- ogx_client/models/model.py +171 -0
- ogx_client/models/model_type.py +44 -0
- ogx_client/models/number_type.py +129 -0
- ogx_client/models/object_type.py +129 -0
- ogx_client/models/open_ai_assistant_message_param.py +187 -0
- ogx_client/models/open_ai_assistant_message_param_input.py +187 -0
- ogx_client/models/open_ai_assistant_message_param_output.py +187 -0
- ogx_client/models/open_ai_attach_file_request.py +164 -0
- ogx_client/models/open_ai_chat_completion.py +173 -0
- ogx_client/models/open_ai_chat_completion_chunk.py +173 -0
- ogx_client/models/open_ai_chat_completion_content_part_image_param.py +144 -0
- ogx_client/models/open_ai_chat_completion_content_part_param.py +447 -0
- ogx_client/models/open_ai_chat_completion_content_part_text_param.py +131 -0
- ogx_client/models/open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param.py +203 -0
- ogx_client/models/open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param_open_ai_file.py +447 -0
- ogx_client/models/open_ai_chat_completion_custom_tool_call_function.py +121 -0
- ogx_client/models/open_ai_chat_completion_request_with_extra_body.py +377 -0
- ogx_client/models/open_ai_chat_completion_response_message.py +180 -0
- ogx_client/models/open_ai_chat_completion_tool_call_function.py +121 -0
- ogx_client/models/open_ai_chat_completion_tool_choice.py +447 -0
- ogx_client/models/open_ai_chat_completion_tool_choice_allowed_tools.py +144 -0
- ogx_client/models/open_ai_chat_completion_tool_choice_custom_tool.py +144 -0
- ogx_client/models/open_ai_chat_completion_tool_choice_function_tool.py +144 -0
- ogx_client/models/open_ai_chat_completion_usage.py +154 -0
- ogx_client/models/open_ai_chat_completion_usage_completion_tokens_details.py +120 -0
- ogx_client/models/open_ai_chat_completion_usage_prompt_tokens_details.py +120 -0
- ogx_client/models/open_ai_choice.py +167 -0
- ogx_client/models/open_ai_choice_delta.py +163 -0
- ogx_client/models/open_ai_choice_logprobs.py +169 -0
- ogx_client/models/open_ai_chunk_choice.py +162 -0
- ogx_client/models/open_ai_chunk_choice_logprobs.py +169 -0
- ogx_client/models/open_ai_compacted_response.py +161 -0
- ogx_client/models/open_ai_completion.py +149 -0
- ogx_client/models/open_ai_completion_choice.py +154 -0
- ogx_client/models/open_ai_completion_logprobs.py +162 -0
- ogx_client/models/open_ai_completion_request_with_extra_body.py +273 -0
- ogx_client/models/open_ai_completion_with_input_messages.py +186 -0
- ogx_client/models/open_ai_create_vector_store_file_batch_request_with_extra_body.py +212 -0
- ogx_client/models/open_ai_create_vector_store_request_with_extra_body.py +198 -0
- ogx_client/models/open_ai_delete_response_object.py +133 -0
- ogx_client/models/open_ai_developer_message_param.py +151 -0
- ogx_client/models/open_ai_embedding_data.py +147 -0
- ogx_client/models/open_ai_embedding_usage.py +121 -0
- ogx_client/models/open_ai_embeddings_request_with_extra_body.py +164 -0
- ogx_client/models/open_ai_embeddings_response.py +160 -0
- ogx_client/models/open_ai_file.py +144 -0
- ogx_client/models/open_ai_file_delete_response.py +133 -0
- ogx_client/models/open_ai_file_file.py +138 -0
- ogx_client/models/open_ai_file_object.py +153 -0
- ogx_client/models/open_ai_file_purpose.py +50 -0
- ogx_client/models/open_ai_file_upload_purpose.py +47 -0
- ogx_client/models/open_ai_finish_reason.py +46 -0
- ogx_client/models/open_ai_image_url.py +136 -0
- ogx_client/models/open_ai_list_models_response.py +142 -0
- ogx_client/models/open_ai_message_param.py +549 -0
- ogx_client/models/open_ai_model.py +142 -0
- ogx_client/models/open_ai_response_annotation_citation.py +137 -0
- ogx_client/models/open_ai_response_annotation_container_file_citation.py +139 -0
- ogx_client/models/open_ai_response_annotation_file_citation.py +135 -0
- ogx_client/models/open_ai_response_annotation_file_citation4_variants.py +498 -0
- ogx_client/models/open_ai_response_annotation_file_path.py +133 -0
- ogx_client/models/open_ai_response_annotations.py +498 -0
- ogx_client/models/open_ai_response_compaction.py +138 -0
- ogx_client/models/open_ai_response_content_part.py +447 -0
- ogx_client/models/open_ai_response_content_part_output_text.py +162 -0
- ogx_client/models/open_ai_response_content_part_output_text_open_ai_response_content_part_refusal_open_ai_response_content_part_reasoning_text.py +447 -0
- ogx_client/models/open_ai_response_content_part_reasoning_summary.py +131 -0
- ogx_client/models/open_ai_response_content_part_reasoning_text.py +131 -0
- ogx_client/models/open_ai_response_content_part_refusal.py +131 -0
- ogx_client/models/open_ai_response_error.py +121 -0
- ogx_client/models/open_ai_response_format_json_object.py +129 -0
- ogx_client/models/open_ai_response_format_json_schema.py +144 -0
- ogx_client/models/open_ai_response_format_param.py +447 -0
- ogx_client/models/open_ai_response_format_text.py +129 -0
- ogx_client/models/open_ai_response_format_text_open_ai_response_format_json_schema_open_ai_response_format_json_object.py +453 -0
- ogx_client/models/open_ai_response_incomplete_details.py +119 -0
- ogx_client/models/open_ai_response_input.py +251 -0
- ogx_client/models/open_ai_response_input_function_tool_call_output.py +160 -0
- ogx_client/models/open_ai_response_input_function_tool_call_output_open_ai_response_mcp_approval_response_open_ai_response_compaction.py +233 -0
- ogx_client/models/open_ai_response_input_message_content.py +447 -0
- ogx_client/models/open_ai_response_input_message_content_file.py +157 -0
- ogx_client/models/open_ai_response_input_message_content_image.py +155 -0
- ogx_client/models/open_ai_response_input_message_content_text.py +131 -0
- ogx_client/models/open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file.py +447 -0
- ogx_client/models/open_ai_response_input_tool.py +516 -0
- ogx_client/models/open_ai_response_input_tool_choice.py +203 -0
- ogx_client/models/open_ai_response_input_tool_choice_allowed_tools.py +143 -0
- ogx_client/models/open_ai_response_input_tool_choice_allowed_tools6_variants.py +618 -0
- ogx_client/models/open_ai_response_input_tool_choice_custom_tool.py +131 -0
- ogx_client/models/open_ai_response_input_tool_choice_file_search.py +129 -0
- ogx_client/models/open_ai_response_input_tool_choice_function_tool.py +131 -0
- ogx_client/models/open_ai_response_input_tool_choice_mcp_tool.py +138 -0
- ogx_client/models/open_ai_response_input_tool_choice_mode.py +44 -0
- ogx_client/models/open_ai_response_input_tool_choice_mode1.py +209 -0
- ogx_client/models/open_ai_response_input_tool_choice_mode2.py +209 -0
- ogx_client/models/open_ai_response_input_tool_choice_web_search.py +129 -0
- ogx_client/models/open_ai_response_input_tool_file_search.py +166 -0
- ogx_client/models/open_ai_response_input_tool_function.py +152 -0
- ogx_client/models/open_ai_response_input_tool_mcp.py +194 -0
- ogx_client/models/open_ai_response_input_tool_web_search.py +147 -0
- ogx_client/models/open_ai_response_input_tool_web_search4_variants.py +516 -0
- ogx_client/models/open_ai_response_input_tool_web_search4_variants1.py +516 -0
- ogx_client/models/open_ai_response_mcp_approval_request.py +137 -0
- ogx_client/models/open_ai_response_mcp_approval_response.py +147 -0
- ogx_client/models/open_ai_response_message.py +167 -0
- ogx_client/models/open_ai_response_message11_variants.py +855 -0
- ogx_client/models/open_ai_response_message8_variants.py +702 -0
- ogx_client/models/open_ai_response_message_input.py +167 -0
- ogx_client/models/open_ai_response_message_input11_variants.py +855 -0
- ogx_client/models/open_ai_response_message_input8_variants.py +702 -0
- ogx_client/models/open_ai_response_message_output.py +167 -0
- ogx_client/models/open_ai_response_message_output11_variants.py +855 -0
- ogx_client/models/open_ai_response_message_output8_variants.py +702 -0
- ogx_client/models/open_ai_response_message_output_union.py +233 -0
- ogx_client/models/open_ai_response_object.py +412 -0
- ogx_client/models/open_ai_response_object_stream.py +2181 -0
- ogx_client/models/open_ai_response_object_stream_error.py +147 -0
- ogx_client/models/open_ai_response_object_stream_response_completed.py +146 -0
- ogx_client/models/open_ai_response_object_stream_response_content_part_added.py +154 -0
- ogx_client/models/open_ai_response_object_stream_response_content_part_done.py +154 -0
- ogx_client/models/open_ai_response_object_stream_response_created.py +146 -0
- ogx_client/models/open_ai_response_object_stream_response_failed.py +146 -0
- ogx_client/models/open_ai_response_object_stream_response_file_search_call_completed.py +135 -0
- ogx_client/models/open_ai_response_object_stream_response_file_search_call_in_progress.py +135 -0
- ogx_client/models/open_ai_response_object_stream_response_file_search_call_searching.py +135 -0
- ogx_client/models/open_ai_response_object_stream_response_function_call_arguments_delta.py +137 -0
- ogx_client/models/open_ai_response_object_stream_response_function_call_arguments_done.py +137 -0
- ogx_client/models/open_ai_response_object_stream_response_in_progress.py +146 -0
- ogx_client/models/open_ai_response_object_stream_response_incomplete.py +146 -0
- ogx_client/models/open_ai_response_object_stream_response_mcp_call_arguments_delta.py +137 -0
- ogx_client/models/open_ai_response_object_stream_response_mcp_call_arguments_done.py +137 -0
- ogx_client/models/open_ai_response_object_stream_response_mcp_call_completed.py +131 -0
- ogx_client/models/open_ai_response_object_stream_response_mcp_call_failed.py +131 -0
- ogx_client/models/open_ai_response_object_stream_response_mcp_call_in_progress.py +135 -0
- ogx_client/models/open_ai_response_object_stream_response_mcp_list_tools_completed.py +131 -0
- ogx_client/models/open_ai_response_object_stream_response_mcp_list_tools_failed.py +131 -0
- ogx_client/models/open_ai_response_object_stream_response_mcp_list_tools_in_progress.py +131 -0
- ogx_client/models/open_ai_response_object_stream_response_output_item_added.py +150 -0
- ogx_client/models/open_ai_response_object_stream_response_output_item_done.py +150 -0
- ogx_client/models/open_ai_response_object_stream_response_output_text_annotation_added.py +154 -0
- ogx_client/models/open_ai_response_object_stream_response_output_text_delta.py +157 -0
- ogx_client/models/open_ai_response_object_stream_response_output_text_done.py +139 -0
- ogx_client/models/open_ai_response_object_stream_response_reasoning_summary_part_added.py +152 -0
- ogx_client/models/open_ai_response_object_stream_response_reasoning_summary_part_done.py +152 -0
- ogx_client/models/open_ai_response_object_stream_response_reasoning_summary_text_delta.py +139 -0
- ogx_client/models/open_ai_response_object_stream_response_reasoning_summary_text_done.py +139 -0
- ogx_client/models/open_ai_response_object_stream_response_reasoning_text_delta.py +139 -0
- ogx_client/models/open_ai_response_object_stream_response_reasoning_text_done.py +139 -0
- ogx_client/models/open_ai_response_object_stream_response_refusal_delta.py +139 -0
- ogx_client/models/open_ai_response_object_stream_response_refusal_done.py +139 -0
- ogx_client/models/open_ai_response_object_stream_response_web_search_call_completed.py +135 -0
- ogx_client/models/open_ai_response_object_stream_response_web_search_call_in_progress.py +135 -0
- ogx_client/models/open_ai_response_object_stream_response_web_search_call_searching.py +135 -0
- ogx_client/models/open_ai_response_object_with_input.py +425 -0
- ogx_client/models/open_ai_response_output.py +702 -0
- ogx_client/models/open_ai_response_output_item.py +702 -0
- ogx_client/models/open_ai_response_output_message_content.py +396 -0
- ogx_client/models/open_ai_response_output_message_content_output_text.py +162 -0
- ogx_client/models/open_ai_response_output_message_content_output_text_input.py +162 -0
- ogx_client/models/open_ai_response_output_message_content_output_text_input_open_ai_response_content_part_refusal.py +396 -0
- ogx_client/models/open_ai_response_output_message_content_output_text_open_ai_response_content_part_refusal.py +396 -0
- ogx_client/models/open_ai_response_output_message_content_output_text_output.py +162 -0
- ogx_client/models/open_ai_response_output_message_content_output_text_output_open_ai_response_content_part_refusal.py +396 -0
- ogx_client/models/open_ai_response_output_message_file_search_tool_call.py +153 -0
- ogx_client/models/open_ai_response_output_message_file_search_tool_call_results.py +127 -0
- ogx_client/models/open_ai_response_output_message_function_tool_call.py +149 -0
- ogx_client/models/open_ai_response_output_message_mcp_call.py +151 -0
- ogx_client/models/open_ai_response_output_message_mcp_list_tools.py +146 -0
- ogx_client/models/open_ai_response_output_message_reasoning_content.py +131 -0
- ogx_client/models/open_ai_response_output_message_reasoning_item.py +179 -0
- ogx_client/models/open_ai_response_output_message_reasoning_summary.py +131 -0
- ogx_client/models/open_ai_response_output_message_web_search_tool_call.py +133 -0
- ogx_client/models/open_ai_response_prompt.py +151 -0
- ogx_client/models/open_ai_response_reasoning.py +168 -0
- ogx_client/models/open_ai_response_text.py +154 -0
- ogx_client/models/open_ai_response_text_format.py +157 -0
- ogx_client/models/open_ai_response_tool.py +516 -0
- ogx_client/models/open_ai_response_tool_mcp.py +151 -0
- ogx_client/models/open_ai_response_usage.py +153 -0
- ogx_client/models/open_ai_response_usage_input_tokens_details.py +119 -0
- ogx_client/models/open_ai_response_usage_output_tokens_details.py +119 -0
- ogx_client/models/open_ai_search_vector_store_request.py +171 -0
- ogx_client/models/open_ai_system_message_param.py +151 -0
- ogx_client/models/open_ai_token_log_prob.py +146 -0
- ogx_client/models/open_ai_tool_message_param.py +146 -0
- ogx_client/models/open_ai_top_log_prob.py +128 -0
- ogx_client/models/open_ai_update_vector_store_file_request.py +119 -0
- ogx_client/models/open_ai_update_vector_store_request.py +151 -0
- ogx_client/models/open_ai_user_message_param.py +151 -0
- ogx_client/models/open_ai_user_message_param_input.py +151 -0
- ogx_client/models/open_ai_user_message_param_input5_variants.py +549 -0
- ogx_client/models/open_ai_user_message_param_output.py +151 -0
- ogx_client/models/open_ai_user_message_param_output5_variants.py +549 -0
- ogx_client/models/open_aijson_schema.py +140 -0
- ogx_client/models/order.py +43 -0
- ogx_client/models/output_tokens_details.py +132 -0
- ogx_client/models/paginated_response.py +145 -0
- ogx_client/models/param_type.py +753 -0
- ogx_client/models/process_file_request.py +151 -0
- ogx_client/models/process_file_response.py +149 -0
- ogx_client/models/prompt.py +133 -0
- ogx_client/models/provider_info.py +127 -0
- ogx_client/models/provider_spec.py +169 -0
- ogx_client/models/query_chunks_request.py +141 -0
- ogx_client/models/query_chunks_response.py +149 -0
- ogx_client/models/register_model_request.py +155 -0
- ogx_client/models/remote_provider_spec.py +178 -0
- ogx_client/models/rerank_data.py +122 -0
- ogx_client/models/rerank_request.py +155 -0
- ogx_client/models/rerank_response.py +147 -0
- ogx_client/models/response_format.py +396 -0
- ogx_client/models/response_item_include.py +48 -0
- ogx_client/models/response_retrieve_item_v1_conversations_conversation_id_items_item_id_get.py +849 -0
- ogx_client/models/response_stream_options.py +119 -0
- ogx_client/models/response_truncation.py +43 -0
- ogx_client/models/retrieve_batch_request.py +119 -0
- ogx_client/models/retrieve_file_content_request.py +119 -0
- ogx_client/models/retrieve_file_request.py +119 -0
- ogx_client/models/retrieve_item_request.py +121 -0
- ogx_client/models/route_info.py +123 -0
- ogx_client/models/sampling_params.py +154 -0
- ogx_client/models/sampling_strategy.py +447 -0
- ogx_client/models/score_request.py +136 -0
- ogx_client/models/scoring_result.py +124 -0
- ogx_client/models/search_ranking_options.py +160 -0
- ogx_client/models/service_tier.py +45 -0
- ogx_client/models/set_default_version_body_request.py +119 -0
- ogx_client/models/set_default_version_request.py +121 -0
- ogx_client/models/string4_variants.py +415 -0
- ogx_client/models/string4_variants1.py +416 -0
- ogx_client/models/string_approval_filter.py +222 -0
- ogx_client/models/string_list_anthropic_text_block.py +272 -0
- ogx_client/models/string_list_anthropic_text_block1.py +272 -0
- ogx_client/models/string_list_anthropic_text_block_anthropic_image_block.py +266 -0
- ogx_client/models/string_list_google_input_turn.py +266 -0
- ogx_client/models/string_list_google_text_content_google_function_call_content_google_function_response_content.py +266 -0
- ogx_client/models/string_list_image_content_item_input_text_content_item.py +280 -0
- ogx_client/models/string_list_image_content_item_input_text_content_item1.py +280 -0
- ogx_client/models/string_list_image_content_item_output_text_content_item.py +280 -0
- ogx_client/models/string_list_image_content_item_text_content_item.py +286 -0
- ogx_client/models/string_list_image_content_item_text_content_item1.py +280 -0
- ogx_client/models/string_list_image_content_item_text_content_item2.py +286 -0
- ogx_client/models/string_list_image_content_item_text_content_item3.py +280 -0
- ogx_client/models/string_list_image_content_item_text_content_item4.py +280 -0
- ogx_client/models/string_list_image_content_item_text_content_item5.py +280 -0
- ogx_client/models/string_list_open_ai_chat_completion_content_part_text_param.py +272 -0
- ogx_client/models/string_list_open_ai_chat_completion_content_part_text_param1.py +266 -0
- ogx_client/models/string_list_open_ai_chat_completion_content_part_text_param2.py +266 -0
- ogx_client/models/string_list_open_ai_chat_completion_content_part_text_param3.py +266 -0
- ogx_client/models/string_list_open_ai_chat_completion_content_part_text_param4.py +272 -0
- ogx_client/models/string_list_open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param_open_ai_file.py +266 -0
- ogx_client/models/string_list_open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file.py +266 -0
- ogx_client/models/string_list_open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file_list_open_ai_response_output_message_content_output_text_input_open_ai_response_content_part_refusal.py +342 -0
- ogx_client/models/string_list_open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file_list_open_ai_response_output_message_content_output_text_open_ai_response_content_part_refusal.py +342 -0
- ogx_client/models/string_list_open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file_list_open_ai_response_output_message_content_output_text_output_open_ai_response_content_part_refusal.py +342 -0
- ogx_client/models/string_list_open_ai_response_message_union_open_ai_response_input_function_tool_call_output.py +272 -0
- ogx_client/models/string_list_open_ai_response_message_union_open_ai_response_input_function_tool_call_output1.py +266 -0
- ogx_client/models/string_list_string.py +271 -0
- ogx_client/models/string_list_string1.py +265 -0
- ogx_client/models/string_list_string2.py +265 -0
- ogx_client/models/string_number_boolean.py +225 -0
- ogx_client/models/string_number_boolean1.py +224 -0
- ogx_client/models/string_object.py +271 -0
- ogx_client/models/string_object1.py +271 -0
- ogx_client/models/string_open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param.py +220 -0
- ogx_client/models/string_open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param1.py +220 -0
- ogx_client/models/string_type.py +129 -0
- ogx_client/models/system_message.py +144 -0
- ogx_client/models/text_content_item.py +131 -0
- ogx_client/models/text_delta.py +131 -0
- ogx_client/models/token_log_probs.py +119 -0
- ogx_client/models/tool_config.py +119 -0
- ogx_client/models/tool_def.py +154 -0
- ogx_client/models/tool_group.py +167 -0
- ogx_client/models/tool_group_input.py +148 -0
- ogx_client/models/tool_invocation_result.py +158 -0
- ogx_client/models/tool_response_message.py +146 -0
- ogx_client/models/top_k_sampling_strategy.py +132 -0
- ogx_client/models/top_p_sampling_strategy.py +134 -0
- ogx_client/models/union_type.py +129 -0
- ogx_client/models/unregister_model_request.py +119 -0
- ogx_client/models/update_conversation_request.py +119 -0
- ogx_client/models/update_prompt_body_request.py +130 -0
- ogx_client/models/update_prompt_request.py +132 -0
- ogx_client/models/upload_file_request.py +140 -0
- ogx_client/models/url.py +119 -0
- ogx_client/models/urlor_data.py +144 -0
- ogx_client/models/user_message.py +164 -0
- ogx_client/models/vector_store_chunking_strategy.py +453 -0
- ogx_client/models/vector_store_chunking_strategy_auto.py +129 -0
- ogx_client/models/vector_store_chunking_strategy_auto_vector_store_chunking_strategy_static_vector_store_chunking_strategy_contextual.py +453 -0
- ogx_client/models/vector_store_chunking_strategy_auto_vector_store_chunking_strategy_static_vector_store_chunking_strategy_contextual1.py +447 -0
- ogx_client/models/vector_store_chunking_strategy_contextual.py +144 -0
- ogx_client/models/vector_store_chunking_strategy_contextual_config.py +145 -0
- ogx_client/models/vector_store_chunking_strategy_static.py +144 -0
- ogx_client/models/vector_store_chunking_strategy_static_config.py +122 -0
- ogx_client/models/vector_store_content.py +162 -0
- ogx_client/models/vector_store_create_request.py +167 -0
- ogx_client/models/vector_store_delete_response.py +133 -0
- ogx_client/models/vector_store_expiration_after.py +129 -0
- ogx_client/models/vector_store_file_batch_file_entry.py +164 -0
- ogx_client/models/vector_store_file_batch_object.py +159 -0
- ogx_client/models/vector_store_file_content_response.py +151 -0
- ogx_client/models/vector_store_file_counts.py +127 -0
- ogx_client/models/vector_store_file_delete_response.py +133 -0
- ogx_client/models/vector_store_file_last_error.py +128 -0
- ogx_client/models/vector_store_file_object.py +206 -0
- ogx_client/models/vector_store_file_status.py +45 -0
- ogx_client/models/vector_store_files_list_in_batch_response.py +148 -0
- ogx_client/models/vector_store_list_files_response.py +148 -0
- ogx_client/models/vector_store_list_response.py +148 -0
- ogx_client/models/vector_store_modify_request.py +151 -0
- ogx_client/models/vector_store_object.py +202 -0
- ogx_client/models/vector_store_search_request.py +151 -0
- ogx_client/models/vector_store_search_response.py +161 -0
- ogx_client/models/vector_store_search_response_page.py +153 -0
- ogx_client/models/vector_store_status.py +44 -0
- ogx_client/models/version_info.py +119 -0
- ogx_client/ogx_client.py +309 -0
- ogx_client/py.typed +0 -0
- ogx_client/rest.py +255 -0
- ogx_client/stream.py +183 -0
- ogx_open_client/__init__.py +1167 -0
- ogx_open_client/_exceptions.py +114 -0
- ogx_open_client/_types.py +312 -0
- ogx_open_client/_version.py +8 -0
- ogx_open_client/api/__init__.py +33 -0
- ogx_open_client/api/admin_api.py +1411 -0
- ogx_open_client/api/alpha_api.py +354 -0
- ogx_open_client/api/batches_api.py +1247 -0
- ogx_open_client/api/chat_api.py +352 -0
- ogx_open_client/api/chat_completions_api.py +1028 -0
- ogx_open_client/api/completions_api.py +440 -0
- ogx_open_client/api/connectors_api.py +1235 -0
- ogx_open_client/api/conversations_api.py +1288 -0
- ogx_open_client/api/embeddings_api.py +429 -0
- ogx_open_client/api/file_batches_api.py +1370 -0
- ogx_open_client/api/file_processors_api.py +442 -0
- ogx_open_client/api/files_api.py +1539 -0
- ogx_open_client/api/inference_api.py +429 -0
- ogx_open_client/api/input_items_api.py +472 -0
- ogx_open_client/api/inspect_api.py +617 -0
- ogx_open_client/api/interactions_api.py +430 -0
- ogx_open_client/api/items_api.py +1359 -0
- ogx_open_client/api/messages_api.py +2466 -0
- ogx_open_client/api/models_api.py +451 -0
- ogx_open_client/api/openai_api.py +481 -0
- ogx_open_client/api/prompts_api.py +1883 -0
- ogx_open_client/api/providers_api.py +636 -0
- ogx_open_client/api/responses_api.py +1876 -0
- ogx_open_client/api/routes_api.py +389 -0
- ogx_open_client/api/tools_api.py +389 -0
- ogx_open_client/api/vector_io_api.py +740 -0
- ogx_open_client/api/vector_stores_api.py +1936 -0
- ogx_open_client/api/vector_stores_files_api.py +2011 -0
- ogx_open_client/api/versions_api.py +386 -0
- ogx_open_client/api_client.py +833 -0
- ogx_open_client/api_response.py +21 -0
- ogx_open_client/async_api_client.py +203 -0
- ogx_open_client/async_api_response.py +134 -0
- ogx_open_client/async_stream.py +161 -0
- ogx_open_client/configuration.py +585 -0
- ogx_open_client/exceptions.py +253 -0
- ogx_open_client/lib/__init__.py +17 -0
- ogx_open_client/lib/_utils.py +26 -0
- ogx_open_client/lib/agents/__init__.py +5 -0
- ogx_open_client/lib/agents/agent.py +540 -0
- ogx_open_client/lib/agents/client_tool.py +258 -0
- ogx_open_client/lib/agents/event_logger.py +134 -0
- ogx_open_client/lib/agents/event_synthesizer.py +448 -0
- ogx_open_client/lib/agents/react/__init__.py +5 -0
- ogx_open_client/lib/agents/react/agent.py +94 -0
- ogx_open_client/lib/agents/react/prompts.py +151 -0
- ogx_open_client/lib/agents/react/tool_parser.py +59 -0
- ogx_open_client/lib/agents/tool_parser.py +42 -0
- ogx_open_client/lib/agents/turn_events.py +268 -0
- ogx_open_client/lib/agents/types.py +63 -0
- ogx_open_client/lib/cli/__init__.py +12 -0
- ogx_open_client/lib/cli/common/__init__.py +5 -0
- ogx_open_client/lib/cli/common/utils.py +54 -0
- ogx_open_client/lib/cli/configure.py +68 -0
- ogx_open_client/lib/cli/constants.py +14 -0
- ogx_open_client/lib/cli/datasets/__init__.py +9 -0
- ogx_open_client/lib/cli/datasets/datasets.py +22 -0
- ogx_open_client/lib/cli/datasets/list.py +32 -0
- ogx_open_client/lib/cli/datasets/register.py +78 -0
- ogx_open_client/lib/cli/datasets/unregister.py +20 -0
- ogx_open_client/lib/cli/eval/__init__.py +9 -0
- ogx_open_client/lib/cli/eval/eval.py +22 -0
- ogx_open_client/lib/cli/eval/run_benchmark.py +193 -0
- ogx_open_client/lib/cli/eval/run_scoring.py +116 -0
- ogx_open_client/lib/cli/eval/utils.py +59 -0
- ogx_open_client/lib/cli/eval_tasks/__init__.py +9 -0
- ogx_open_client/lib/cli/eval_tasks/eval_tasks.py +65 -0
- ogx_open_client/lib/cli/eval_tasks/list.py +35 -0
- ogx_open_client/lib/cli/inference/__init__.py +9 -0
- ogx_open_client/lib/cli/inference/inference.py +88 -0
- ogx_open_client/lib/cli/inspect/__init__.py +9 -0
- ogx_open_client/lib/cli/inspect/inspect.py +19 -0
- ogx_open_client/lib/cli/inspect/version.py +22 -0
- ogx_open_client/lib/cli/models/__init__.py +9 -0
- ogx_open_client/lib/cli/models/models.py +149 -0
- ogx_open_client/lib/cli/ogx_client.py +111 -0
- ogx_open_client/lib/cli/post_training/__init__.py +9 -0
- ogx_open_client/lib/cli/post_training/post_training.py +114 -0
- ogx_open_client/lib/cli/providers/__init__.py +9 -0
- ogx_open_client/lib/cli/providers/inspect.py +33 -0
- ogx_open_client/lib/cli/providers/list.py +32 -0
- ogx_open_client/lib/cli/providers/providers.py +21 -0
- ogx_open_client/lib/cli/scoring_functions/__init__.py +9 -0
- ogx_open_client/lib/cli/scoring_functions/list.py +38 -0
- ogx_open_client/lib/cli/scoring_functions/scoring_functions.py +62 -0
- ogx_open_client/lib/cli/toolgroups/__init__.py +9 -0
- ogx_open_client/lib/cli/toolgroups/toolgroups.py +129 -0
- ogx_open_client/lib/cli/vector_stores/__init__.py +9 -0
- ogx_open_client/lib/cli/vector_stores/vector_stores.py +138 -0
- ogx_open_client/lib/inference/__init__.py +5 -0
- ogx_open_client/lib/inference/event_logger.py +58 -0
- ogx_open_client/lib/inference/utils.py +21 -0
- ogx_open_client/lib/stream_printer.py +30 -0
- ogx_open_client/lib/tools/__init__.py +9 -0
- ogx_open_client/lib/tools/mcp_oauth.py +303 -0
- ogx_open_client/models/__init__.py +521 -0
- ogx_open_client/models/add_items_request.py +148 -0
- ogx_open_client/models/allowed_tools_config.py +145 -0
- ogx_open_client/models/allowed_tools_filter.py +141 -0
- ogx_open_client/models/anthropic_base64_image_source.py +140 -0
- ogx_open_client/models/anthropic_base64_image_source_anthropic_url_image_source.py +396 -0
- ogx_open_client/models/anthropic_bash_tool.py +161 -0
- ogx_open_client/models/anthropic_cache_control.py +129 -0
- ogx_open_client/models/anthropic_count_tokens_request.py +170 -0
- ogx_open_client/models/anthropic_count_tokens_response.py +119 -0
- ogx_open_client/models/anthropic_create_message_request.py +217 -0
- ogx_open_client/models/anthropic_custom_tool_def.py +160 -0
- ogx_open_client/models/anthropic_custom_tool_def4_variants.py +510 -0
- ogx_open_client/models/anthropic_image_block.py +164 -0
- ogx_open_client/models/anthropic_list_models_response.py +163 -0
- ogx_open_client/models/anthropic_message.py +141 -0
- ogx_open_client/models/anthropic_message_response.py +187 -0
- ogx_open_client/models/anthropic_model_info.py +149 -0
- ogx_open_client/models/anthropic_redacted_thinking_block.py +131 -0
- ogx_open_client/models/anthropic_text_block.py +151 -0
- ogx_open_client/models/anthropic_text_block5_variants.py +549 -0
- ogx_open_client/models/anthropic_text_block5_variants1.py +549 -0
- ogx_open_client/models/anthropic_text_block6_variants.py +600 -0
- ogx_open_client/models/anthropic_text_block6_variants1.py +600 -0
- ogx_open_client/models/anthropic_text_block_anthropic_image_block.py +203 -0
- ogx_open_client/models/anthropic_text_editor_tool.py +155 -0
- ogx_open_client/models/anthropic_thinking_block.py +158 -0
- ogx_open_client/models/anthropic_thinking_config.py +137 -0
- ogx_open_client/models/anthropic_tool_def.py +128 -0
- ogx_open_client/models/anthropic_tool_result_block_input.py +173 -0
- ogx_open_client/models/anthropic_tool_result_block_output.py +173 -0
- ogx_open_client/models/anthropic_tool_use_block.py +155 -0
- ogx_open_client/models/anthropic_url_image_source.py +131 -0
- ogx_open_client/models/anthropic_usage.py +135 -0
- ogx_open_client/models/anthropic_web_search_tool.py +202 -0
- ogx_open_client/models/api.py +59 -0
- ogx_open_client/models/approval_filter.py +148 -0
- ogx_open_client/models/array_type.py +129 -0
- ogx_open_client/models/batch.py +302 -0
- ogx_open_client/models/batch_error.py +158 -0
- ogx_open_client/models/batch_request_counts.py +136 -0
- ogx_open_client/models/batch_usage.py +166 -0
- ogx_open_client/models/bf16_quantization_config.py +129 -0
- ogx_open_client/models/boolean_type.py +129 -0
- ogx_open_client/models/cancel_batch_request.py +119 -0
- ogx_open_client/models/chat_completion_input_type.py +129 -0
- ogx_open_client/models/chat_completion_message.py +216 -0
- ogx_open_client/models/chat_completion_message_custom_tool_call.py +143 -0
- ogx_open_client/models/chat_completion_message_custom_tool_call_custom.py +121 -0
- ogx_open_client/models/chat_completion_message_function_call.py +121 -0
- ogx_open_client/models/chat_completion_message_list.py +165 -0
- ogx_open_client/models/chat_completion_message_tool_call.py +143 -0
- ogx_open_client/models/chat_completion_message_tool_call_chat_completion_message_custom_tool_call.py +203 -0
- ogx_open_client/models/chat_completion_message_tool_call_chat_completion_message_custom_tool_call1.py +206 -0
- ogx_open_client/models/chat_completion_message_tool_call_function.py +121 -0
- ogx_open_client/models/chunk.py +151 -0
- ogx_open_client/models/chunk_for_deletion.py +121 -0
- ogx_open_client/models/chunk_metadata.py +180 -0
- ogx_open_client/models/compact_response_request.py +239 -0
- ogx_open_client/models/comparison_filter.py +135 -0
- ogx_open_client/models/completion_input_type.py +129 -0
- ogx_open_client/models/compound_filter.py +128 -0
- ogx_open_client/models/connector.py +152 -0
- ogx_open_client/models/connector_input.py +131 -0
- ogx_open_client/models/connector_type.py +42 -0
- ogx_open_client/models/context_management.py +133 -0
- ogx_open_client/models/conversation.py +140 -0
- ogx_open_client/models/conversation_deleted_resource.py +133 -0
- ogx_open_client/models/conversation_item.py +855 -0
- ogx_open_client/models/conversation_item_create_request.py +148 -0
- ogx_open_client/models/conversation_item_deleted_resource.py +133 -0
- ogx_open_client/models/conversation_item_include.py +48 -0
- ogx_open_client/models/conversation_item_list.py +158 -0
- ogx_open_client/models/conversation_message.py +149 -0
- ogx_open_client/models/create_batch_request.py +144 -0
- ogx_open_client/models/create_conversation_request.py +159 -0
- ogx_open_client/models/create_message_batch_request.py +148 -0
- ogx_open_client/models/create_prompt_request.py +126 -0
- ogx_open_client/models/create_response_request.py +402 -0
- ogx_open_client/models/custom_tool_config.py +119 -0
- ogx_open_client/models/delete_chunks_request.py +132 -0
- ogx_open_client/models/delete_conversation_request.py +119 -0
- ogx_open_client/models/delete_file_request.py +119 -0
- ogx_open_client/models/delete_item_request.py +121 -0
- ogx_open_client/models/delete_prompt_request.py +119 -0
- ogx_open_client/models/dialog_type.py +129 -0
- ogx_open_client/models/embedded_chunk.py +157 -0
- ogx_open_client/models/embedded_chunk_input.py +157 -0
- ogx_open_client/models/embedded_chunk_output.py +157 -0
- ogx_open_client/models/embeddings_response.py +136 -0
- ogx_open_client/models/error.py +143 -0
- ogx_open_client/models/error_detail.py +313 -0
- ogx_open_client/models/errors.py +172 -0
- ogx_open_client/models/expires_after.py +129 -0
- ogx_open_client/models/fp8_quantization_config.py +129 -0
- ogx_open_client/models/function_tool_config.py +119 -0
- ogx_open_client/models/get_chat_completion_request.py +119 -0
- ogx_open_client/models/get_connector_request.py +119 -0
- ogx_open_client/models/get_connector_tool_request.py +121 -0
- ogx_open_client/models/get_conversation_request.py +119 -0
- ogx_open_client/models/get_model_request.py +119 -0
- ogx_open_client/models/get_model_v1_models_model_id_get200_response.py +414 -0
- ogx_open_client/models/get_prompt_request.py +126 -0
- ogx_open_client/models/google_create_interaction_request.py +213 -0
- ogx_open_client/models/google_function_call_content.py +153 -0
- ogx_open_client/models/google_function_call_output.py +153 -0
- ogx_open_client/models/google_function_declaration.py +146 -0
- ogx_open_client/models/google_function_response_content.py +160 -0
- ogx_open_client/models/google_generation_config.py +146 -0
- ogx_open_client/models/google_input_turn.py +141 -0
- ogx_open_client/models/google_interaction_response.py +199 -0
- ogx_open_client/models/google_list_models_response.py +147 -0
- ogx_open_client/models/google_model_info.py +123 -0
- ogx_open_client/models/google_text_content.py +131 -0
- ogx_open_client/models/google_text_content_google_function_call_content_google_function_response_content.py +218 -0
- ogx_open_client/models/google_text_output.py +131 -0
- ogx_open_client/models/google_text_output_google_function_call_output_google_thought_output.py +447 -0
- ogx_open_client/models/google_thought_output.py +149 -0
- ogx_open_client/models/google_tool.py +145 -0
- ogx_open_client/models/google_usage.py +136 -0
- ogx_open_client/models/grammar_response_format.py +131 -0
- ogx_open_client/models/greedy_sampling_strategy.py +129 -0
- ogx_open_client/models/greedy_sampling_strategy_top_p_sampling_strategy_top_k_sampling_strategy.py +447 -0
- ogx_open_client/models/health_info.py +120 -0
- ogx_open_client/models/health_status.py +44 -0
- ogx_open_client/models/image_content_item.py +144 -0
- ogx_open_client/models/image_content_item_input.py +144 -0
- ogx_open_client/models/image_content_item_input_text_content_item.py +396 -0
- ogx_open_client/models/image_content_item_output.py +144 -0
- ogx_open_client/models/image_content_item_output_text_content_item.py +396 -0
- ogx_open_client/models/image_content_item_text_content_item.py +396 -0
- ogx_open_client/models/image_delta.py +131 -0
- ogx_open_client/models/inline_provider_spec.py +183 -0
- ogx_open_client/models/input_tokens_details.py +132 -0
- ogx_open_client/models/insert_chunks_request.py +139 -0
- ogx_open_client/models/inspect_provider_request.py +119 -0
- ogx_open_client/models/int4_quantization_config.py +136 -0
- ogx_open_client/models/integer_number.py +207 -0
- ogx_open_client/models/interleaved_content.py +280 -0
- ogx_open_client/models/interleaved_content_item.py +396 -0
- ogx_open_client/models/job.py +122 -0
- ogx_open_client/models/job_status.py +46 -0
- ogx_open_client/models/json_schema_response_format.py +131 -0
- ogx_open_client/models/json_type.py +129 -0
- ogx_open_client/models/list_batches_request.py +126 -0
- ogx_open_client/models/list_batches_response.py +158 -0
- ogx_open_client/models/list_chat_completion_messages_request.py +142 -0
- ogx_open_client/models/list_chat_completions_request.py +147 -0
- ogx_open_client/models/list_connector_tools_request.py +119 -0
- ogx_open_client/models/list_connectors_response.py +147 -0
- ogx_open_client/models/list_files_request.py +147 -0
- ogx_open_client/models/list_items_request.py +158 -0
- ogx_open_client/models/list_message_batches_response.py +163 -0
- ogx_open_client/models/list_models_response.py +147 -0
- ogx_open_client/models/list_models_v1_models_get200_response.py +414 -0
- ogx_open_client/models/list_number_string.py +265 -0
- ogx_open_client/models/list_open_ai_chat_completion_response.py +165 -0
- ogx_open_client/models/list_open_ai_file_response.py +165 -0
- ogx_open_client/models/list_open_ai_response_input_item.py +159 -0
- ogx_open_client/models/list_open_ai_response_object.py +165 -0
- ogx_open_client/models/list_prompt_versions_request.py +119 -0
- ogx_open_client/models/list_prompts_response.py +147 -0
- ogx_open_client/models/list_providers_response.py +147 -0
- ogx_open_client/models/list_routes_request.py +134 -0
- ogx_open_client/models/list_routes_response.py +147 -0
- ogx_open_client/models/list_string_allowed_tools_filter.py +269 -0
- ogx_open_client/models/list_tool_defs_response.py +147 -0
- ogx_open_client/models/list_tool_groups_response.py +147 -0
- ogx_open_client/models/list_tools_request.py +124 -0
- ogx_open_client/models/list_tools_response.py +147 -0
- ogx_open_client/models/mcp_list_tools_tool.py +128 -0
- ogx_open_client/models/message_batch.py +187 -0
- ogx_open_client/models/message_batch_request_counts.py +127 -0
- ogx_open_client/models/message_batch_request_params.py +142 -0
- ogx_open_client/models/metric_in_response.py +141 -0
- ogx_open_client/models/model.py +171 -0
- ogx_open_client/models/model_type.py +44 -0
- ogx_open_client/models/number_type.py +129 -0
- ogx_open_client/models/object_type.py +129 -0
- ogx_open_client/models/open_ai_assistant_message_param.py +187 -0
- ogx_open_client/models/open_ai_assistant_message_param_input.py +187 -0
- ogx_open_client/models/open_ai_assistant_message_param_output.py +187 -0
- ogx_open_client/models/open_ai_attach_file_request.py +164 -0
- ogx_open_client/models/open_ai_chat_completion.py +173 -0
- ogx_open_client/models/open_ai_chat_completion_chunk.py +173 -0
- ogx_open_client/models/open_ai_chat_completion_content_part_image_param.py +144 -0
- ogx_open_client/models/open_ai_chat_completion_content_part_param.py +447 -0
- ogx_open_client/models/open_ai_chat_completion_content_part_text_param.py +131 -0
- ogx_open_client/models/open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param.py +203 -0
- ogx_open_client/models/open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param_open_ai_file.py +447 -0
- ogx_open_client/models/open_ai_chat_completion_custom_tool_call_function.py +121 -0
- ogx_open_client/models/open_ai_chat_completion_request_with_extra_body.py +377 -0
- ogx_open_client/models/open_ai_chat_completion_response_message.py +180 -0
- ogx_open_client/models/open_ai_chat_completion_tool_call_function.py +121 -0
- ogx_open_client/models/open_ai_chat_completion_tool_choice.py +447 -0
- ogx_open_client/models/open_ai_chat_completion_tool_choice_allowed_tools.py +144 -0
- ogx_open_client/models/open_ai_chat_completion_tool_choice_custom_tool.py +144 -0
- ogx_open_client/models/open_ai_chat_completion_tool_choice_function_tool.py +144 -0
- ogx_open_client/models/open_ai_chat_completion_usage.py +154 -0
- ogx_open_client/models/open_ai_chat_completion_usage_completion_tokens_details.py +120 -0
- ogx_open_client/models/open_ai_chat_completion_usage_prompt_tokens_details.py +120 -0
- ogx_open_client/models/open_ai_choice.py +167 -0
- ogx_open_client/models/open_ai_choice_delta.py +163 -0
- ogx_open_client/models/open_ai_choice_logprobs.py +169 -0
- ogx_open_client/models/open_ai_chunk_choice.py +162 -0
- ogx_open_client/models/open_ai_chunk_choice_logprobs.py +169 -0
- ogx_open_client/models/open_ai_compacted_response.py +161 -0
- ogx_open_client/models/open_ai_completion.py +149 -0
- ogx_open_client/models/open_ai_completion_choice.py +154 -0
- ogx_open_client/models/open_ai_completion_logprobs.py +162 -0
- ogx_open_client/models/open_ai_completion_request_with_extra_body.py +273 -0
- ogx_open_client/models/open_ai_completion_with_input_messages.py +186 -0
- ogx_open_client/models/open_ai_create_vector_store_file_batch_request_with_extra_body.py +212 -0
- ogx_open_client/models/open_ai_create_vector_store_request_with_extra_body.py +198 -0
- ogx_open_client/models/open_ai_delete_response_object.py +133 -0
- ogx_open_client/models/open_ai_developer_message_param.py +151 -0
- ogx_open_client/models/open_ai_embedding_data.py +147 -0
- ogx_open_client/models/open_ai_embedding_usage.py +121 -0
- ogx_open_client/models/open_ai_embeddings_request_with_extra_body.py +164 -0
- ogx_open_client/models/open_ai_embeddings_response.py +160 -0
- ogx_open_client/models/open_ai_file.py +144 -0
- ogx_open_client/models/open_ai_file_delete_response.py +133 -0
- ogx_open_client/models/open_ai_file_file.py +138 -0
- ogx_open_client/models/open_ai_file_object.py +153 -0
- ogx_open_client/models/open_ai_file_purpose.py +50 -0
- ogx_open_client/models/open_ai_file_upload_purpose.py +47 -0
- ogx_open_client/models/open_ai_finish_reason.py +46 -0
- ogx_open_client/models/open_ai_image_url.py +136 -0
- ogx_open_client/models/open_ai_list_models_response.py +142 -0
- ogx_open_client/models/open_ai_message_param.py +549 -0
- ogx_open_client/models/open_ai_model.py +142 -0
- ogx_open_client/models/open_ai_response_annotation_citation.py +137 -0
- ogx_open_client/models/open_ai_response_annotation_container_file_citation.py +139 -0
- ogx_open_client/models/open_ai_response_annotation_file_citation.py +135 -0
- ogx_open_client/models/open_ai_response_annotation_file_citation4_variants.py +498 -0
- ogx_open_client/models/open_ai_response_annotation_file_path.py +133 -0
- ogx_open_client/models/open_ai_response_annotations.py +498 -0
- ogx_open_client/models/open_ai_response_compaction.py +138 -0
- ogx_open_client/models/open_ai_response_content_part.py +447 -0
- ogx_open_client/models/open_ai_response_content_part_output_text.py +162 -0
- ogx_open_client/models/open_ai_response_content_part_output_text_open_ai_response_content_part_refusal_open_ai_response_content_part_reasoning_text.py +447 -0
- ogx_open_client/models/open_ai_response_content_part_reasoning_summary.py +131 -0
- ogx_open_client/models/open_ai_response_content_part_reasoning_text.py +131 -0
- ogx_open_client/models/open_ai_response_content_part_refusal.py +131 -0
- ogx_open_client/models/open_ai_response_error.py +121 -0
- ogx_open_client/models/open_ai_response_format_json_object.py +129 -0
- ogx_open_client/models/open_ai_response_format_json_schema.py +144 -0
- ogx_open_client/models/open_ai_response_format_param.py +447 -0
- ogx_open_client/models/open_ai_response_format_text.py +129 -0
- ogx_open_client/models/open_ai_response_format_text_open_ai_response_format_json_schema_open_ai_response_format_json_object.py +453 -0
- ogx_open_client/models/open_ai_response_incomplete_details.py +119 -0
- ogx_open_client/models/open_ai_response_input.py +251 -0
- ogx_open_client/models/open_ai_response_input_function_tool_call_output.py +160 -0
- ogx_open_client/models/open_ai_response_input_function_tool_call_output_open_ai_response_mcp_approval_response_open_ai_response_compaction.py +233 -0
- ogx_open_client/models/open_ai_response_input_message_content.py +447 -0
- ogx_open_client/models/open_ai_response_input_message_content_file.py +157 -0
- ogx_open_client/models/open_ai_response_input_message_content_image.py +155 -0
- ogx_open_client/models/open_ai_response_input_message_content_text.py +131 -0
- ogx_open_client/models/open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file.py +447 -0
- ogx_open_client/models/open_ai_response_input_tool.py +516 -0
- ogx_open_client/models/open_ai_response_input_tool_choice.py +203 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_allowed_tools.py +143 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_allowed_tools6_variants.py +618 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_custom_tool.py +131 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_file_search.py +129 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_function_tool.py +131 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_mcp_tool.py +138 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_mode.py +44 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_mode1.py +209 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_mode2.py +209 -0
- ogx_open_client/models/open_ai_response_input_tool_choice_web_search.py +129 -0
- ogx_open_client/models/open_ai_response_input_tool_file_search.py +166 -0
- ogx_open_client/models/open_ai_response_input_tool_function.py +152 -0
- ogx_open_client/models/open_ai_response_input_tool_mcp.py +194 -0
- ogx_open_client/models/open_ai_response_input_tool_web_search.py +186 -0
- ogx_open_client/models/open_ai_response_input_tool_web_search4_variants.py +516 -0
- ogx_open_client/models/open_ai_response_input_tool_web_search4_variants1.py +516 -0
- ogx_open_client/models/open_ai_response_mcp_approval_request.py +137 -0
- ogx_open_client/models/open_ai_response_mcp_approval_response.py +147 -0
- ogx_open_client/models/open_ai_response_message.py +167 -0
- ogx_open_client/models/open_ai_response_message11_variants.py +855 -0
- ogx_open_client/models/open_ai_response_message8_variants.py +702 -0
- ogx_open_client/models/open_ai_response_message_input.py +167 -0
- ogx_open_client/models/open_ai_response_message_input11_variants.py +855 -0
- ogx_open_client/models/open_ai_response_message_input8_variants.py +702 -0
- ogx_open_client/models/open_ai_response_message_output.py +167 -0
- ogx_open_client/models/open_ai_response_message_output11_variants.py +855 -0
- ogx_open_client/models/open_ai_response_message_output8_variants.py +702 -0
- ogx_open_client/models/open_ai_response_message_output_union.py +233 -0
- ogx_open_client/models/open_ai_response_object.py +407 -0
- ogx_open_client/models/open_ai_response_object_stream.py +2181 -0
- ogx_open_client/models/open_ai_response_object_stream_error.py +147 -0
- ogx_open_client/models/open_ai_response_object_stream_response_completed.py +146 -0
- ogx_open_client/models/open_ai_response_object_stream_response_content_part_added.py +154 -0
- ogx_open_client/models/open_ai_response_object_stream_response_content_part_done.py +154 -0
- ogx_open_client/models/open_ai_response_object_stream_response_created.py +146 -0
- ogx_open_client/models/open_ai_response_object_stream_response_failed.py +146 -0
- ogx_open_client/models/open_ai_response_object_stream_response_file_search_call_completed.py +135 -0
- ogx_open_client/models/open_ai_response_object_stream_response_file_search_call_in_progress.py +135 -0
- ogx_open_client/models/open_ai_response_object_stream_response_file_search_call_searching.py +135 -0
- ogx_open_client/models/open_ai_response_object_stream_response_function_call_arguments_delta.py +137 -0
- ogx_open_client/models/open_ai_response_object_stream_response_function_call_arguments_done.py +137 -0
- ogx_open_client/models/open_ai_response_object_stream_response_in_progress.py +146 -0
- ogx_open_client/models/open_ai_response_object_stream_response_incomplete.py +146 -0
- ogx_open_client/models/open_ai_response_object_stream_response_mcp_call_arguments_delta.py +137 -0
- ogx_open_client/models/open_ai_response_object_stream_response_mcp_call_arguments_done.py +137 -0
- ogx_open_client/models/open_ai_response_object_stream_response_mcp_call_completed.py +131 -0
- ogx_open_client/models/open_ai_response_object_stream_response_mcp_call_failed.py +131 -0
- ogx_open_client/models/open_ai_response_object_stream_response_mcp_call_in_progress.py +135 -0
- ogx_open_client/models/open_ai_response_object_stream_response_mcp_list_tools_completed.py +131 -0
- ogx_open_client/models/open_ai_response_object_stream_response_mcp_list_tools_failed.py +131 -0
- ogx_open_client/models/open_ai_response_object_stream_response_mcp_list_tools_in_progress.py +131 -0
- ogx_open_client/models/open_ai_response_object_stream_response_output_item_added.py +150 -0
- ogx_open_client/models/open_ai_response_object_stream_response_output_item_done.py +150 -0
- ogx_open_client/models/open_ai_response_object_stream_response_output_text_annotation_added.py +154 -0
- ogx_open_client/models/open_ai_response_object_stream_response_output_text_delta.py +157 -0
- ogx_open_client/models/open_ai_response_object_stream_response_output_text_done.py +139 -0
- ogx_open_client/models/open_ai_response_object_stream_response_reasoning_summary_part_added.py +152 -0
- ogx_open_client/models/open_ai_response_object_stream_response_reasoning_summary_part_done.py +152 -0
- ogx_open_client/models/open_ai_response_object_stream_response_reasoning_summary_text_delta.py +139 -0
- ogx_open_client/models/open_ai_response_object_stream_response_reasoning_summary_text_done.py +139 -0
- ogx_open_client/models/open_ai_response_object_stream_response_reasoning_text_delta.py +139 -0
- ogx_open_client/models/open_ai_response_object_stream_response_reasoning_text_done.py +139 -0
- ogx_open_client/models/open_ai_response_object_stream_response_refusal_delta.py +139 -0
- ogx_open_client/models/open_ai_response_object_stream_response_refusal_done.py +139 -0
- ogx_open_client/models/open_ai_response_object_stream_response_web_search_call_completed.py +135 -0
- ogx_open_client/models/open_ai_response_object_stream_response_web_search_call_in_progress.py +135 -0
- ogx_open_client/models/open_ai_response_object_stream_response_web_search_call_searching.py +135 -0
- ogx_open_client/models/open_ai_response_object_with_input.py +425 -0
- ogx_open_client/models/open_ai_response_output.py +702 -0
- ogx_open_client/models/open_ai_response_output_item.py +702 -0
- ogx_open_client/models/open_ai_response_output_message_content.py +396 -0
- ogx_open_client/models/open_ai_response_output_message_content_output_text.py +162 -0
- ogx_open_client/models/open_ai_response_output_message_content_output_text_input.py +162 -0
- ogx_open_client/models/open_ai_response_output_message_content_output_text_input_open_ai_response_content_part_refusal.py +396 -0
- ogx_open_client/models/open_ai_response_output_message_content_output_text_open_ai_response_content_part_refusal.py +396 -0
- ogx_open_client/models/open_ai_response_output_message_content_output_text_output.py +162 -0
- ogx_open_client/models/open_ai_response_output_message_content_output_text_output_open_ai_response_content_part_refusal.py +396 -0
- ogx_open_client/models/open_ai_response_output_message_file_search_tool_call.py +153 -0
- ogx_open_client/models/open_ai_response_output_message_file_search_tool_call_results.py +127 -0
- ogx_open_client/models/open_ai_response_output_message_function_tool_call.py +149 -0
- ogx_open_client/models/open_ai_response_output_message_mcp_call.py +151 -0
- ogx_open_client/models/open_ai_response_output_message_mcp_list_tools.py +146 -0
- ogx_open_client/models/open_ai_response_output_message_reasoning_content.py +131 -0
- ogx_open_client/models/open_ai_response_output_message_reasoning_item.py +179 -0
- ogx_open_client/models/open_ai_response_output_message_reasoning_summary.py +131 -0
- ogx_open_client/models/open_ai_response_output_message_web_search_tool_call.py +153 -0
- ogx_open_client/models/open_ai_response_output_message_web_search_tool_call_input.py +153 -0
- ogx_open_client/models/open_ai_response_output_message_web_search_tool_call_output.py +153 -0
- ogx_open_client/models/open_ai_response_prompt.py +151 -0
- ogx_open_client/models/open_ai_response_reasoning.py +168 -0
- ogx_open_client/models/open_ai_response_text.py +154 -0
- ogx_open_client/models/open_ai_response_text_format.py +157 -0
- ogx_open_client/models/open_ai_response_tool.py +516 -0
- ogx_open_client/models/open_ai_response_tool_mcp.py +151 -0
- ogx_open_client/models/open_ai_response_usage.py +153 -0
- ogx_open_client/models/open_ai_response_usage_input_tokens_details.py +119 -0
- ogx_open_client/models/open_ai_response_usage_output_tokens_details.py +119 -0
- ogx_open_client/models/open_ai_search_vector_store_request.py +171 -0
- ogx_open_client/models/open_ai_system_message_param.py +151 -0
- ogx_open_client/models/open_ai_token_log_prob.py +146 -0
- ogx_open_client/models/open_ai_tool_message_param.py +146 -0
- ogx_open_client/models/open_ai_top_log_prob.py +128 -0
- ogx_open_client/models/open_ai_update_vector_store_file_request.py +119 -0
- ogx_open_client/models/open_ai_update_vector_store_request.py +151 -0
- ogx_open_client/models/open_ai_user_message_param.py +151 -0
- ogx_open_client/models/open_ai_user_message_param_input.py +151 -0
- ogx_open_client/models/open_ai_user_message_param_input5_variants.py +549 -0
- ogx_open_client/models/open_ai_user_message_param_output.py +151 -0
- ogx_open_client/models/open_ai_user_message_param_output5_variants.py +549 -0
- ogx_open_client/models/open_aijson_schema.py +140 -0
- ogx_open_client/models/order.py +43 -0
- ogx_open_client/models/output_tokens_details.py +132 -0
- ogx_open_client/models/paginated_response.py +145 -0
- ogx_open_client/models/param_type.py +753 -0
- ogx_open_client/models/process_file_request.py +151 -0
- ogx_open_client/models/process_file_response.py +149 -0
- ogx_open_client/models/prompt.py +133 -0
- ogx_open_client/models/provider_info.py +127 -0
- ogx_open_client/models/provider_spec.py +169 -0
- ogx_open_client/models/query_chunks_request.py +141 -0
- ogx_open_client/models/query_chunks_response.py +149 -0
- ogx_open_client/models/register_model_request.py +155 -0
- ogx_open_client/models/remote_provider_spec.py +178 -0
- ogx_open_client/models/rerank_data.py +122 -0
- ogx_open_client/models/rerank_request.py +155 -0
- ogx_open_client/models/rerank_response.py +147 -0
- ogx_open_client/models/response_format.py +396 -0
- ogx_open_client/models/response_item_include.py +48 -0
- ogx_open_client/models/response_retrieve_item_v1_conversations_conversation_id_items_item_id_get.py +849 -0
- ogx_open_client/models/response_stream_options.py +119 -0
- ogx_open_client/models/response_truncation.py +43 -0
- ogx_open_client/models/retrieve_batch_request.py +119 -0
- ogx_open_client/models/retrieve_file_content_request.py +119 -0
- ogx_open_client/models/retrieve_file_request.py +119 -0
- ogx_open_client/models/retrieve_item_request.py +121 -0
- ogx_open_client/models/route_info.py +123 -0
- ogx_open_client/models/sampling_params.py +154 -0
- ogx_open_client/models/sampling_strategy.py +447 -0
- ogx_open_client/models/score_request.py +136 -0
- ogx_open_client/models/scoring_result.py +124 -0
- ogx_open_client/models/search_ranking_options.py +160 -0
- ogx_open_client/models/service_tier.py +45 -0
- ogx_open_client/models/set_default_version_body_request.py +119 -0
- ogx_open_client/models/set_default_version_request.py +121 -0
- ogx_open_client/models/string4_variants.py +415 -0
- ogx_open_client/models/string4_variants1.py +416 -0
- ogx_open_client/models/string_approval_filter.py +222 -0
- ogx_open_client/models/string_list_anthropic_text_block.py +272 -0
- ogx_open_client/models/string_list_anthropic_text_block1.py +272 -0
- ogx_open_client/models/string_list_anthropic_text_block_anthropic_image_block.py +266 -0
- ogx_open_client/models/string_list_google_input_turn.py +266 -0
- ogx_open_client/models/string_list_google_text_content_google_function_call_content_google_function_response_content.py +266 -0
- ogx_open_client/models/string_list_image_content_item_input_text_content_item.py +280 -0
- ogx_open_client/models/string_list_image_content_item_input_text_content_item1.py +280 -0
- ogx_open_client/models/string_list_image_content_item_output_text_content_item.py +280 -0
- ogx_open_client/models/string_list_image_content_item_text_content_item.py +286 -0
- ogx_open_client/models/string_list_image_content_item_text_content_item1.py +280 -0
- ogx_open_client/models/string_list_image_content_item_text_content_item2.py +286 -0
- ogx_open_client/models/string_list_image_content_item_text_content_item3.py +280 -0
- ogx_open_client/models/string_list_image_content_item_text_content_item4.py +280 -0
- ogx_open_client/models/string_list_image_content_item_text_content_item5.py +280 -0
- ogx_open_client/models/string_list_open_ai_chat_completion_content_part_text_param.py +272 -0
- ogx_open_client/models/string_list_open_ai_chat_completion_content_part_text_param1.py +266 -0
- ogx_open_client/models/string_list_open_ai_chat_completion_content_part_text_param2.py +266 -0
- ogx_open_client/models/string_list_open_ai_chat_completion_content_part_text_param3.py +266 -0
- ogx_open_client/models/string_list_open_ai_chat_completion_content_part_text_param4.py +272 -0
- ogx_open_client/models/string_list_open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param_open_ai_file.py +266 -0
- ogx_open_client/models/string_list_open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file.py +266 -0
- ogx_open_client/models/string_list_open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file_list_open_ai_response_output_message_content_output_text_input_open_ai_response_content_part_refusal.py +342 -0
- ogx_open_client/models/string_list_open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file_list_open_ai_response_output_message_content_output_text_open_ai_response_content_part_refusal.py +342 -0
- ogx_open_client/models/string_list_open_ai_response_input_message_content_text_open_ai_response_input_message_content_image_open_ai_response_input_message_content_file_list_open_ai_response_output_message_content_output_text_output_open_ai_response_content_part_refusal.py +342 -0
- ogx_open_client/models/string_list_open_ai_response_message_union_open_ai_response_input_function_tool_call_output.py +272 -0
- ogx_open_client/models/string_list_open_ai_response_message_union_open_ai_response_input_function_tool_call_output1.py +266 -0
- ogx_open_client/models/string_list_string.py +271 -0
- ogx_open_client/models/string_list_string1.py +265 -0
- ogx_open_client/models/string_list_string2.py +265 -0
- ogx_open_client/models/string_number_boolean.py +225 -0
- ogx_open_client/models/string_number_boolean1.py +224 -0
- ogx_open_client/models/string_object.py +271 -0
- ogx_open_client/models/string_object1.py +271 -0
- ogx_open_client/models/string_open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param.py +220 -0
- ogx_open_client/models/string_open_ai_chat_completion_content_part_text_param_open_ai_chat_completion_content_part_image_param1.py +220 -0
- ogx_open_client/models/string_type.py +129 -0
- ogx_open_client/models/system_message.py +144 -0
- ogx_open_client/models/text_content_item.py +131 -0
- ogx_open_client/models/text_delta.py +131 -0
- ogx_open_client/models/token_log_probs.py +119 -0
- ogx_open_client/models/tool_config.py +119 -0
- ogx_open_client/models/tool_def.py +154 -0
- ogx_open_client/models/tool_group.py +167 -0
- ogx_open_client/models/tool_group_input.py +148 -0
- ogx_open_client/models/tool_invocation_result.py +158 -0
- ogx_open_client/models/tool_response_message.py +146 -0
- ogx_open_client/models/top_k_sampling_strategy.py +132 -0
- ogx_open_client/models/top_p_sampling_strategy.py +134 -0
- ogx_open_client/models/union_type.py +129 -0
- ogx_open_client/models/unregister_model_request.py +119 -0
- ogx_open_client/models/update_conversation_request.py +119 -0
- ogx_open_client/models/update_prompt_body_request.py +130 -0
- ogx_open_client/models/update_prompt_request.py +132 -0
- ogx_open_client/models/upload_file_request.py +140 -0
- ogx_open_client/models/url.py +119 -0
- ogx_open_client/models/urlor_data.py +144 -0
- ogx_open_client/models/user_message.py +164 -0
- ogx_open_client/models/vector_store_chunking_strategy.py +453 -0
- ogx_open_client/models/vector_store_chunking_strategy_auto.py +129 -0
- ogx_open_client/models/vector_store_chunking_strategy_auto_vector_store_chunking_strategy_static_vector_store_chunking_strategy_contextual.py +453 -0
- ogx_open_client/models/vector_store_chunking_strategy_auto_vector_store_chunking_strategy_static_vector_store_chunking_strategy_contextual1.py +447 -0
- ogx_open_client/models/vector_store_chunking_strategy_contextual.py +144 -0
- ogx_open_client/models/vector_store_chunking_strategy_contextual_config.py +145 -0
- ogx_open_client/models/vector_store_chunking_strategy_static.py +144 -0
- ogx_open_client/models/vector_store_chunking_strategy_static_config.py +122 -0
- ogx_open_client/models/vector_store_content.py +162 -0
- ogx_open_client/models/vector_store_create_request.py +167 -0
- ogx_open_client/models/vector_store_delete_response.py +133 -0
- ogx_open_client/models/vector_store_expiration_after.py +129 -0
- ogx_open_client/models/vector_store_file_batch_file_entry.py +164 -0
- ogx_open_client/models/vector_store_file_batch_object.py +159 -0
- ogx_open_client/models/vector_store_file_content_response.py +151 -0
- ogx_open_client/models/vector_store_file_counts.py +127 -0
- ogx_open_client/models/vector_store_file_delete_response.py +133 -0
- ogx_open_client/models/vector_store_file_last_error.py +128 -0
- ogx_open_client/models/vector_store_file_object.py +206 -0
- ogx_open_client/models/vector_store_file_status.py +45 -0
- ogx_open_client/models/vector_store_files_list_in_batch_response.py +148 -0
- ogx_open_client/models/vector_store_list_files_response.py +148 -0
- ogx_open_client/models/vector_store_list_response.py +148 -0
- ogx_open_client/models/vector_store_modify_request.py +151 -0
- ogx_open_client/models/vector_store_object.py +202 -0
- ogx_open_client/models/vector_store_search_request.py +151 -0
- ogx_open_client/models/vector_store_search_response.py +161 -0
- ogx_open_client/models/vector_store_search_response_page.py +153 -0
- ogx_open_client/models/vector_store_status.py +44 -0
- ogx_open_client/models/version_info.py +119 -0
- ogx_open_client/models/web_search_action_find.py +133 -0
- ogx_open_client/models/web_search_action_open_page.py +136 -0
- ogx_open_client/models/web_search_action_search.py +156 -0
- ogx_open_client/models/web_search_action_search_web_search_action_open_page_web_search_action_find.py +224 -0
- ogx_open_client/models/web_search_action_search_web_search_action_open_page_web_search_action_find1.py +224 -0
- ogx_open_client/models/web_search_filters.py +141 -0
- ogx_open_client/models/web_search_source.py +131 -0
- ogx_open_client/models/web_search_user_location.py +157 -0
- ogx_open_client/ogx_client.py +309 -0
- ogx_open_client/py.typed +0 -0
- ogx_open_client/rest.py +255 -0
- ogx_open_client/stream.py +183 -0
- ogx_open_client-1.0.3.dev0.dist-info/METADATA +723 -0
- ogx_open_client-1.0.3.dev0.dist-info/RECORD +1199 -0
- ogx_open_client-1.0.3.dev0.dist-info/WHEEL +5 -0
- ogx_open_client-1.0.3.dev0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,855 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) The OGX Contributors.
|
|
4
|
+
# All rights reserved.
|
|
5
|
+
#
|
|
6
|
+
# This source code is licensed under the terms described in the LICENSE file in
|
|
7
|
+
# the root directory of this source tree.
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
OGX Specification - Stable & Experimental APIs
|
|
11
|
+
|
|
12
|
+
This is the specification of the OGX that provides a set of endpoints and their corresponding interfaces that are tailored to best leverage Llama Models. **🔗 COMBINED**: This specification includes both stable production-ready APIs and experimental pre-release APIs. Use stable APIs for production deployments and experimental APIs for testing new features.
|
|
13
|
+
|
|
14
|
+
The version of the OpenAPI document: v1
|
|
15
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
16
|
+
|
|
17
|
+
Do not edit the class manually.
|
|
18
|
+
""" # noqa: E501
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
import json
|
|
23
|
+
import pprint
|
|
24
|
+
import re
|
|
25
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
26
|
+
from typing import Any, List, Optional
|
|
27
|
+
from ogx_client.models.open_ai_response_compaction import OpenAIResponseCompaction
|
|
28
|
+
from ogx_client.models.open_ai_response_input_function_tool_call_output import OpenAIResponseInputFunctionToolCallOutput
|
|
29
|
+
from ogx_client.models.open_ai_response_mcp_approval_request import OpenAIResponseMCPApprovalRequest
|
|
30
|
+
from ogx_client.models.open_ai_response_mcp_approval_response import OpenAIResponseMCPApprovalResponse
|
|
31
|
+
from ogx_client.models.open_ai_response_message import OpenAIResponseMessage
|
|
32
|
+
from ogx_client.models.open_ai_response_output_message_file_search_tool_call import OpenAIResponseOutputMessageFileSearchToolCall
|
|
33
|
+
from ogx_client.models.open_ai_response_output_message_function_tool_call import OpenAIResponseOutputMessageFunctionToolCall
|
|
34
|
+
from ogx_client.models.open_ai_response_output_message_mcp_call import OpenAIResponseOutputMessageMCPCall
|
|
35
|
+
from ogx_client.models.open_ai_response_output_message_mcp_list_tools import OpenAIResponseOutputMessageMCPListTools
|
|
36
|
+
from ogx_client.models.open_ai_response_output_message_reasoning_item import OpenAIResponseOutputMessageReasoningItem
|
|
37
|
+
from ogx_client.models.open_ai_response_output_message_web_search_tool_call import OpenAIResponseOutputMessageWebSearchToolCall
|
|
38
|
+
from pydantic import StrictStr, Field, model_serializer
|
|
39
|
+
from typing import Any, ClassVar
|
|
40
|
+
from typing_extensions import Literal, Self
|
|
41
|
+
from ogx_client.lib._utils import pascal_to_snake_case
|
|
42
|
+
|
|
43
|
+
CONVERSATIONITEM_ONE_OF_SCHEMAS = ["OpenAIResponseCompaction", "OpenAIResponseInputFunctionToolCallOutput", "OpenAIResponseMCPApprovalRequest", "OpenAIResponseMCPApprovalResponse", "OpenAIResponseMessage", "OpenAIResponseOutputMessageFileSearchToolCall", "OpenAIResponseOutputMessageFunctionToolCall", "OpenAIResponseOutputMessageMCPCall", "OpenAIResponseOutputMessageMCPListTools", "OpenAIResponseOutputMessageReasoningItem", "OpenAIResponseOutputMessageWebSearchToolCall"]
|
|
44
|
+
|
|
45
|
+
class ConversationItem(BaseModel):
|
|
46
|
+
"""
|
|
47
|
+
ConversationItem
|
|
48
|
+
"""
|
|
49
|
+
# data type: OpenAIResponseMessage
|
|
50
|
+
oneof_schema_1_validator: Optional[OpenAIResponseMessage] = None
|
|
51
|
+
# data type: OpenAIResponseOutputMessageWebSearchToolCall
|
|
52
|
+
oneof_schema_2_validator: Optional[OpenAIResponseOutputMessageWebSearchToolCall] = None
|
|
53
|
+
# data type: OpenAIResponseOutputMessageFileSearchToolCall
|
|
54
|
+
oneof_schema_3_validator: Optional[OpenAIResponseOutputMessageFileSearchToolCall] = None
|
|
55
|
+
# data type: OpenAIResponseOutputMessageFunctionToolCall
|
|
56
|
+
oneof_schema_4_validator: Optional[OpenAIResponseOutputMessageFunctionToolCall] = None
|
|
57
|
+
# data type: OpenAIResponseInputFunctionToolCallOutput
|
|
58
|
+
oneof_schema_5_validator: Optional[OpenAIResponseInputFunctionToolCallOutput] = None
|
|
59
|
+
# data type: OpenAIResponseMCPApprovalRequest
|
|
60
|
+
oneof_schema_6_validator: Optional[OpenAIResponseMCPApprovalRequest] = None
|
|
61
|
+
# data type: OpenAIResponseMCPApprovalResponse
|
|
62
|
+
oneof_schema_7_validator: Optional[OpenAIResponseMCPApprovalResponse] = None
|
|
63
|
+
# data type: OpenAIResponseOutputMessageMCPCall
|
|
64
|
+
oneof_schema_8_validator: Optional[OpenAIResponseOutputMessageMCPCall] = None
|
|
65
|
+
# data type: OpenAIResponseOutputMessageMCPListTools
|
|
66
|
+
oneof_schema_9_validator: Optional[OpenAIResponseOutputMessageMCPListTools] = None
|
|
67
|
+
# data type: OpenAIResponseOutputMessageReasoningItem
|
|
68
|
+
oneof_schema_10_validator: Optional[OpenAIResponseOutputMessageReasoningItem] = None
|
|
69
|
+
# data type: OpenAIResponseCompaction
|
|
70
|
+
oneof_schema_11_validator: Optional[OpenAIResponseCompaction] = None
|
|
71
|
+
actual_instance: OpenAIResponseCompaction | OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalRequest | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage | OpenAIResponseOutputMessageFileSearchToolCall | OpenAIResponseOutputMessageFunctionToolCall | OpenAIResponseOutputMessageMCPCall | OpenAIResponseOutputMessageMCPListTools | OpenAIResponseOutputMessageReasoningItem | OpenAIResponseOutputMessageWebSearchToolCall | None = None
|
|
72
|
+
one_of_schemas: ClassVar[set[str]] = { "OpenAIResponseCompaction", "OpenAIResponseInputFunctionToolCallOutput", "OpenAIResponseMCPApprovalRequest", "OpenAIResponseMCPApprovalResponse", "OpenAIResponseMessage", "OpenAIResponseOutputMessageFileSearchToolCall", "OpenAIResponseOutputMessageFunctionToolCall", "OpenAIResponseOutputMessageMCPCall", "OpenAIResponseOutputMessageMCPListTools", "OpenAIResponseOutputMessageReasoningItem", "OpenAIResponseOutputMessageWebSearchToolCall" }
|
|
73
|
+
|
|
74
|
+
model_config = ConfigDict(
|
|
75
|
+
validate_assignment=True,
|
|
76
|
+
protected_namespaces=(),
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
discriminator_value_class_map: ClassVar[dict[str, str]] = {
|
|
81
|
+
'compaction': 'OpenAIResponseCompaction',
|
|
82
|
+
'file_search_call': 'OpenAIResponseOutputMessageFileSearchToolCall',
|
|
83
|
+
'function_call': 'OpenAIResponseOutputMessageFunctionToolCall',
|
|
84
|
+
'function_call_output': 'OpenAIResponseInputFunctionToolCallOutput',
|
|
85
|
+
'mcp_approval_request': 'OpenAIResponseMCPApprovalRequest',
|
|
86
|
+
'mcp_approval_response': 'OpenAIResponseMCPApprovalResponse',
|
|
87
|
+
'mcp_call': 'OpenAIResponseOutputMessageMCPCall',
|
|
88
|
+
'mcp_list_tools': 'OpenAIResponseOutputMessageMCPListTools',
|
|
89
|
+
'message': 'OpenAIResponseMessage',
|
|
90
|
+
'reasoning': 'OpenAIResponseOutputMessageReasoningItem',
|
|
91
|
+
'web_search_call': 'OpenAIResponseOutputMessageWebSearchToolCall',
|
|
92
|
+
'': 'ERRORUNKNOWN'
|
|
93
|
+
}
|
|
94
|
+
discriminator_property_name: ClassVar[str] = 'type'
|
|
95
|
+
|
|
96
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
97
|
+
if args:
|
|
98
|
+
if len(args) > 1:
|
|
99
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
100
|
+
if kwargs:
|
|
101
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
102
|
+
|
|
103
|
+
# Preprocess the value to handle lists of dicts
|
|
104
|
+
value = args[0]
|
|
105
|
+
if isinstance(value, list):
|
|
106
|
+
# Try to construct model instances from dicts in the list
|
|
107
|
+
# This ensures default values are applied
|
|
108
|
+
from pydantic import ValidationError as PydanticValidationError
|
|
109
|
+
validated = None
|
|
110
|
+
if validated is not None:
|
|
111
|
+
value = validated
|
|
112
|
+
|
|
113
|
+
super().__init__(actual_instance=value)
|
|
114
|
+
else:
|
|
115
|
+
super().__init__(**kwargs)
|
|
116
|
+
|
|
117
|
+
def __getattr__(self, name: str):
|
|
118
|
+
"""Proxy attribute access to actual_instance for transparency."""
|
|
119
|
+
# Avoid infinite recursion for private attributes and model fields
|
|
120
|
+
if name.startswith('_') or name in ('actual_instance', 'one_of_schemas', 'model_config', 'model_fields'):
|
|
121
|
+
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
|
|
122
|
+
|
|
123
|
+
actual = super().__getattribute__('actual_instance')
|
|
124
|
+
if actual is None:
|
|
125
|
+
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}' (actual_instance is None)")
|
|
126
|
+
|
|
127
|
+
return getattr(actual, name)
|
|
128
|
+
|
|
129
|
+
def __iter__(self):
|
|
130
|
+
"""Iterate over items if actual_instance is iterable."""
|
|
131
|
+
if hasattr(self.actual_instance, '__iter__'):
|
|
132
|
+
return iter(self.actual_instance)
|
|
133
|
+
raise TypeError(f"'{type(self.actual_instance).__name__}' object is not iterable")
|
|
134
|
+
|
|
135
|
+
def __getitem__(self, index):
|
|
136
|
+
"""Get item by index if actual_instance supports indexing."""
|
|
137
|
+
if hasattr(self.actual_instance, '__getitem__'):
|
|
138
|
+
return self.actual_instance[index]
|
|
139
|
+
raise TypeError(f"'{type(self.actual_instance).__name__}' object is not subscriptable")
|
|
140
|
+
|
|
141
|
+
def __len__(self):
|
|
142
|
+
"""Get length if actual_instance supports len()."""
|
|
143
|
+
if hasattr(self.actual_instance, '__len__'):
|
|
144
|
+
return len(self.actual_instance)
|
|
145
|
+
raise TypeError(f"object of type '{type(self.actual_instance).__name__}' has no len()")
|
|
146
|
+
|
|
147
|
+
def __bool__(self):
|
|
148
|
+
"""Handle truthiness checks - wrapper is truthy if actual_instance is not None."""
|
|
149
|
+
return self.actual_instance is not None
|
|
150
|
+
|
|
151
|
+
def __eq__(self, other):
|
|
152
|
+
"""Handle equality comparisons transparently."""
|
|
153
|
+
if hasattr(self, 'actual_instance') and self.actual_instance is not None:
|
|
154
|
+
other_value = other.actual_instance if hasattr(other, 'actual_instance') else other
|
|
155
|
+
return self.actual_instance == other_value
|
|
156
|
+
return super().__eq__(other)
|
|
157
|
+
|
|
158
|
+
def __hash__(self):
|
|
159
|
+
"""Handle hashing - use actual_instance's hash if available."""
|
|
160
|
+
if hasattr(self, 'actual_instance') and self.actual_instance is not None:
|
|
161
|
+
try:
|
|
162
|
+
return hash(self.actual_instance)
|
|
163
|
+
except TypeError:
|
|
164
|
+
return id(self)
|
|
165
|
+
return super().__hash__()
|
|
166
|
+
|
|
167
|
+
def __repr__(self):
|
|
168
|
+
"""Return repr of actual_instance for debugging."""
|
|
169
|
+
if hasattr(self, 'actual_instance') and self.actual_instance is not None:
|
|
170
|
+
return repr(self.actual_instance)
|
|
171
|
+
return super().__repr__()
|
|
172
|
+
|
|
173
|
+
def to_json(self) -> str:
|
|
174
|
+
"""Returns the JSON representation of the actual instance"""
|
|
175
|
+
if self.actual_instance is None:
|
|
176
|
+
return "null"
|
|
177
|
+
|
|
178
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
179
|
+
return self.actual_instance.to_json()
|
|
180
|
+
else:
|
|
181
|
+
return json.dumps(self.actual_instance)
|
|
182
|
+
|
|
183
|
+
def to_str(self) -> str:
|
|
184
|
+
"""Returns the string representation of the actual instance"""
|
|
185
|
+
return pprint.pformat(self.model_dump())
|
|
186
|
+
|
|
187
|
+
@model_serializer(mode='wrap')
|
|
188
|
+
def serialize_model(self, serializer):
|
|
189
|
+
"""Custom serializer that delegates to actual_instance for proper JSON serialization."""
|
|
190
|
+
# If actual_instance is None, serialize the wrapper normally
|
|
191
|
+
if not hasattr(self, 'actual_instance') or self.actual_instance is None:
|
|
192
|
+
return serializer(self)
|
|
193
|
+
|
|
194
|
+
# If actual_instance is a Pydantic model, serialize it using the default serializer
|
|
195
|
+
# This ensures nested models are also serialized correctly
|
|
196
|
+
if hasattr(self.actual_instance, '__pydantic_serializer__'):
|
|
197
|
+
# Use Pydantic's serializer infrastructure to ensure proper serialization
|
|
198
|
+
from pydantic_core import to_jsonable_python
|
|
199
|
+
return to_jsonable_python(
|
|
200
|
+
self.actual_instance,
|
|
201
|
+
by_alias=True,
|
|
202
|
+
exclude_none=True,
|
|
203
|
+
fallback=lambda x: x if isinstance(x, str | int | float | bool | type(None)) else str(x)
|
|
204
|
+
)
|
|
205
|
+
# If it's a list of Pydantic models, serialize each one
|
|
206
|
+
elif isinstance(self.actual_instance, list):
|
|
207
|
+
from pydantic_core import to_jsonable_python
|
|
208
|
+
return [
|
|
209
|
+
to_jsonable_python(
|
|
210
|
+
item,
|
|
211
|
+
by_alias=True,
|
|
212
|
+
exclude_none=True,
|
|
213
|
+
fallback=lambda x: x if isinstance(x, str | int | float | bool | type(None)) else str(x)
|
|
214
|
+
)
|
|
215
|
+
if hasattr(item, '__pydantic_serializer__')
|
|
216
|
+
else item
|
|
217
|
+
for item in self.actual_instance
|
|
218
|
+
]
|
|
219
|
+
# Otherwise return as-is (primitives, dicts, etc.)
|
|
220
|
+
else:
|
|
221
|
+
return self.actual_instance
|
|
222
|
+
|
|
223
|
+
@field_validator('actual_instance')
|
|
224
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
225
|
+
instance = ConversationItem.model_construct()
|
|
226
|
+
error_messages = []
|
|
227
|
+
match = 0
|
|
228
|
+
# validate data type: OpenAIResponseMessage
|
|
229
|
+
# Check if we should skip this variant based on discriminator
|
|
230
|
+
_should_skip_discriminator = False
|
|
231
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
232
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
233
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
234
|
+
_disc_value = v.get('type')
|
|
235
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
236
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
237
|
+
if _expected_class != 'OpenAIResponseMessage':
|
|
238
|
+
_should_skip_discriminator = True
|
|
239
|
+
|
|
240
|
+
if _should_skip_discriminator:
|
|
241
|
+
error_messages.append(f"Skipping OpenAIResponseMessage due to discriminator mismatch")
|
|
242
|
+
elif not isinstance(v, OpenAIResponseMessage):
|
|
243
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
244
|
+
if isinstance(v, dict):
|
|
245
|
+
try:
|
|
246
|
+
constructed = OpenAIResponseMessage.model_validate(v)
|
|
247
|
+
match += 1
|
|
248
|
+
# Return the constructed instance to use it instead of raw dict
|
|
249
|
+
return constructed
|
|
250
|
+
except (ValidationError, ValueError) as e:
|
|
251
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseMessage` from dict: {str(e)}")
|
|
252
|
+
else:
|
|
253
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseMessage`")
|
|
254
|
+
else:
|
|
255
|
+
match += 1
|
|
256
|
+
# validate data type: OpenAIResponseOutputMessageWebSearchToolCall
|
|
257
|
+
# Check if we should skip this variant based on discriminator
|
|
258
|
+
_should_skip_discriminator = False
|
|
259
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
260
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
261
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
262
|
+
_disc_value = v.get('type')
|
|
263
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
264
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
265
|
+
if _expected_class != 'OpenAIResponseOutputMessageWebSearchToolCall':
|
|
266
|
+
_should_skip_discriminator = True
|
|
267
|
+
|
|
268
|
+
if _should_skip_discriminator:
|
|
269
|
+
error_messages.append(f"Skipping OpenAIResponseOutputMessageWebSearchToolCall due to discriminator mismatch")
|
|
270
|
+
elif not isinstance(v, OpenAIResponseOutputMessageWebSearchToolCall):
|
|
271
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
272
|
+
if isinstance(v, dict):
|
|
273
|
+
try:
|
|
274
|
+
constructed = OpenAIResponseOutputMessageWebSearchToolCall.model_validate(v)
|
|
275
|
+
match += 1
|
|
276
|
+
# Return the constructed instance to use it instead of raw dict
|
|
277
|
+
return constructed
|
|
278
|
+
except (ValidationError, ValueError) as e:
|
|
279
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseOutputMessageWebSearchToolCall` from dict: {str(e)}")
|
|
280
|
+
else:
|
|
281
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseOutputMessageWebSearchToolCall`")
|
|
282
|
+
else:
|
|
283
|
+
match += 1
|
|
284
|
+
# validate data type: OpenAIResponseOutputMessageFileSearchToolCall
|
|
285
|
+
# Check if we should skip this variant based on discriminator
|
|
286
|
+
_should_skip_discriminator = False
|
|
287
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
288
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
289
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
290
|
+
_disc_value = v.get('type')
|
|
291
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
292
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
293
|
+
if _expected_class != 'OpenAIResponseOutputMessageFileSearchToolCall':
|
|
294
|
+
_should_skip_discriminator = True
|
|
295
|
+
|
|
296
|
+
if _should_skip_discriminator:
|
|
297
|
+
error_messages.append(f"Skipping OpenAIResponseOutputMessageFileSearchToolCall due to discriminator mismatch")
|
|
298
|
+
elif not isinstance(v, OpenAIResponseOutputMessageFileSearchToolCall):
|
|
299
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
300
|
+
if isinstance(v, dict):
|
|
301
|
+
try:
|
|
302
|
+
constructed = OpenAIResponseOutputMessageFileSearchToolCall.model_validate(v)
|
|
303
|
+
match += 1
|
|
304
|
+
# Return the constructed instance to use it instead of raw dict
|
|
305
|
+
return constructed
|
|
306
|
+
except (ValidationError, ValueError) as e:
|
|
307
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseOutputMessageFileSearchToolCall` from dict: {str(e)}")
|
|
308
|
+
else:
|
|
309
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseOutputMessageFileSearchToolCall`")
|
|
310
|
+
else:
|
|
311
|
+
match += 1
|
|
312
|
+
# validate data type: OpenAIResponseOutputMessageFunctionToolCall
|
|
313
|
+
# Check if we should skip this variant based on discriminator
|
|
314
|
+
_should_skip_discriminator = False
|
|
315
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
316
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
317
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
318
|
+
_disc_value = v.get('type')
|
|
319
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
320
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
321
|
+
if _expected_class != 'OpenAIResponseOutputMessageFunctionToolCall':
|
|
322
|
+
_should_skip_discriminator = True
|
|
323
|
+
|
|
324
|
+
if _should_skip_discriminator:
|
|
325
|
+
error_messages.append(f"Skipping OpenAIResponseOutputMessageFunctionToolCall due to discriminator mismatch")
|
|
326
|
+
elif not isinstance(v, OpenAIResponseOutputMessageFunctionToolCall):
|
|
327
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
328
|
+
if isinstance(v, dict):
|
|
329
|
+
try:
|
|
330
|
+
constructed = OpenAIResponseOutputMessageFunctionToolCall.model_validate(v)
|
|
331
|
+
match += 1
|
|
332
|
+
# Return the constructed instance to use it instead of raw dict
|
|
333
|
+
return constructed
|
|
334
|
+
except (ValidationError, ValueError) as e:
|
|
335
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseOutputMessageFunctionToolCall` from dict: {str(e)}")
|
|
336
|
+
else:
|
|
337
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseOutputMessageFunctionToolCall`")
|
|
338
|
+
else:
|
|
339
|
+
match += 1
|
|
340
|
+
# validate data type: OpenAIResponseInputFunctionToolCallOutput
|
|
341
|
+
# Check if we should skip this variant based on discriminator
|
|
342
|
+
_should_skip_discriminator = False
|
|
343
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
344
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
345
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
346
|
+
_disc_value = v.get('type')
|
|
347
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
348
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
349
|
+
if _expected_class != 'OpenAIResponseInputFunctionToolCallOutput':
|
|
350
|
+
_should_skip_discriminator = True
|
|
351
|
+
|
|
352
|
+
if _should_skip_discriminator:
|
|
353
|
+
error_messages.append(f"Skipping OpenAIResponseInputFunctionToolCallOutput due to discriminator mismatch")
|
|
354
|
+
elif not isinstance(v, OpenAIResponseInputFunctionToolCallOutput):
|
|
355
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
356
|
+
if isinstance(v, dict):
|
|
357
|
+
try:
|
|
358
|
+
constructed = OpenAIResponseInputFunctionToolCallOutput.model_validate(v)
|
|
359
|
+
match += 1
|
|
360
|
+
# Return the constructed instance to use it instead of raw dict
|
|
361
|
+
return constructed
|
|
362
|
+
except (ValidationError, ValueError) as e:
|
|
363
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseInputFunctionToolCallOutput` from dict: {str(e)}")
|
|
364
|
+
else:
|
|
365
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseInputFunctionToolCallOutput`")
|
|
366
|
+
else:
|
|
367
|
+
match += 1
|
|
368
|
+
# validate data type: OpenAIResponseMCPApprovalRequest
|
|
369
|
+
# Check if we should skip this variant based on discriminator
|
|
370
|
+
_should_skip_discriminator = False
|
|
371
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
372
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
373
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
374
|
+
_disc_value = v.get('type')
|
|
375
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
376
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
377
|
+
if _expected_class != 'OpenAIResponseMCPApprovalRequest':
|
|
378
|
+
_should_skip_discriminator = True
|
|
379
|
+
|
|
380
|
+
if _should_skip_discriminator:
|
|
381
|
+
error_messages.append(f"Skipping OpenAIResponseMCPApprovalRequest due to discriminator mismatch")
|
|
382
|
+
elif not isinstance(v, OpenAIResponseMCPApprovalRequest):
|
|
383
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
384
|
+
if isinstance(v, dict):
|
|
385
|
+
try:
|
|
386
|
+
constructed = OpenAIResponseMCPApprovalRequest.model_validate(v)
|
|
387
|
+
match += 1
|
|
388
|
+
# Return the constructed instance to use it instead of raw dict
|
|
389
|
+
return constructed
|
|
390
|
+
except (ValidationError, ValueError) as e:
|
|
391
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseMCPApprovalRequest` from dict: {str(e)}")
|
|
392
|
+
else:
|
|
393
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseMCPApprovalRequest`")
|
|
394
|
+
else:
|
|
395
|
+
match += 1
|
|
396
|
+
# validate data type: OpenAIResponseMCPApprovalResponse
|
|
397
|
+
# Check if we should skip this variant based on discriminator
|
|
398
|
+
_should_skip_discriminator = False
|
|
399
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
400
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
401
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
402
|
+
_disc_value = v.get('type')
|
|
403
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
404
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
405
|
+
if _expected_class != 'OpenAIResponseMCPApprovalResponse':
|
|
406
|
+
_should_skip_discriminator = True
|
|
407
|
+
|
|
408
|
+
if _should_skip_discriminator:
|
|
409
|
+
error_messages.append(f"Skipping OpenAIResponseMCPApprovalResponse due to discriminator mismatch")
|
|
410
|
+
elif not isinstance(v, OpenAIResponseMCPApprovalResponse):
|
|
411
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
412
|
+
if isinstance(v, dict):
|
|
413
|
+
try:
|
|
414
|
+
constructed = OpenAIResponseMCPApprovalResponse.model_validate(v)
|
|
415
|
+
match += 1
|
|
416
|
+
# Return the constructed instance to use it instead of raw dict
|
|
417
|
+
return constructed
|
|
418
|
+
except (ValidationError, ValueError) as e:
|
|
419
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseMCPApprovalResponse` from dict: {str(e)}")
|
|
420
|
+
else:
|
|
421
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseMCPApprovalResponse`")
|
|
422
|
+
else:
|
|
423
|
+
match += 1
|
|
424
|
+
# validate data type: OpenAIResponseOutputMessageMCPCall
|
|
425
|
+
# Check if we should skip this variant based on discriminator
|
|
426
|
+
_should_skip_discriminator = False
|
|
427
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
428
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
429
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
430
|
+
_disc_value = v.get('type')
|
|
431
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
432
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
433
|
+
if _expected_class != 'OpenAIResponseOutputMessageMCPCall':
|
|
434
|
+
_should_skip_discriminator = True
|
|
435
|
+
|
|
436
|
+
if _should_skip_discriminator:
|
|
437
|
+
error_messages.append(f"Skipping OpenAIResponseOutputMessageMCPCall due to discriminator mismatch")
|
|
438
|
+
elif not isinstance(v, OpenAIResponseOutputMessageMCPCall):
|
|
439
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
440
|
+
if isinstance(v, dict):
|
|
441
|
+
try:
|
|
442
|
+
constructed = OpenAIResponseOutputMessageMCPCall.model_validate(v)
|
|
443
|
+
match += 1
|
|
444
|
+
# Return the constructed instance to use it instead of raw dict
|
|
445
|
+
return constructed
|
|
446
|
+
except (ValidationError, ValueError) as e:
|
|
447
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseOutputMessageMCPCall` from dict: {str(e)}")
|
|
448
|
+
else:
|
|
449
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseOutputMessageMCPCall`")
|
|
450
|
+
else:
|
|
451
|
+
match += 1
|
|
452
|
+
# validate data type: OpenAIResponseOutputMessageMCPListTools
|
|
453
|
+
# Check if we should skip this variant based on discriminator
|
|
454
|
+
_should_skip_discriminator = False
|
|
455
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
456
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
457
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
458
|
+
_disc_value = v.get('type')
|
|
459
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
460
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
461
|
+
if _expected_class != 'OpenAIResponseOutputMessageMCPListTools':
|
|
462
|
+
_should_skip_discriminator = True
|
|
463
|
+
|
|
464
|
+
if _should_skip_discriminator:
|
|
465
|
+
error_messages.append(f"Skipping OpenAIResponseOutputMessageMCPListTools due to discriminator mismatch")
|
|
466
|
+
elif not isinstance(v, OpenAIResponseOutputMessageMCPListTools):
|
|
467
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
468
|
+
if isinstance(v, dict):
|
|
469
|
+
try:
|
|
470
|
+
constructed = OpenAIResponseOutputMessageMCPListTools.model_validate(v)
|
|
471
|
+
match += 1
|
|
472
|
+
# Return the constructed instance to use it instead of raw dict
|
|
473
|
+
return constructed
|
|
474
|
+
except (ValidationError, ValueError) as e:
|
|
475
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseOutputMessageMCPListTools` from dict: {str(e)}")
|
|
476
|
+
else:
|
|
477
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseOutputMessageMCPListTools`")
|
|
478
|
+
else:
|
|
479
|
+
match += 1
|
|
480
|
+
# validate data type: OpenAIResponseOutputMessageReasoningItem
|
|
481
|
+
# Check if we should skip this variant based on discriminator
|
|
482
|
+
_should_skip_discriminator = False
|
|
483
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
484
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
485
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
486
|
+
_disc_value = v.get('type')
|
|
487
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
488
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
489
|
+
if _expected_class != 'OpenAIResponseOutputMessageReasoningItem':
|
|
490
|
+
_should_skip_discriminator = True
|
|
491
|
+
|
|
492
|
+
if _should_skip_discriminator:
|
|
493
|
+
error_messages.append(f"Skipping OpenAIResponseOutputMessageReasoningItem due to discriminator mismatch")
|
|
494
|
+
elif not isinstance(v, OpenAIResponseOutputMessageReasoningItem):
|
|
495
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
496
|
+
if isinstance(v, dict):
|
|
497
|
+
try:
|
|
498
|
+
constructed = OpenAIResponseOutputMessageReasoningItem.model_validate(v)
|
|
499
|
+
match += 1
|
|
500
|
+
# Return the constructed instance to use it instead of raw dict
|
|
501
|
+
return constructed
|
|
502
|
+
except (ValidationError, ValueError) as e:
|
|
503
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseOutputMessageReasoningItem` from dict: {str(e)}")
|
|
504
|
+
else:
|
|
505
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseOutputMessageReasoningItem`")
|
|
506
|
+
else:
|
|
507
|
+
match += 1
|
|
508
|
+
# validate data type: OpenAIResponseCompaction
|
|
509
|
+
# Check if we should skip this variant based on discriminator
|
|
510
|
+
_should_skip_discriminator = False
|
|
511
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
512
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
513
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
514
|
+
_disc_value = v.get('type')
|
|
515
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
516
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
517
|
+
if _expected_class != 'OpenAIResponseCompaction':
|
|
518
|
+
_should_skip_discriminator = True
|
|
519
|
+
|
|
520
|
+
if _should_skip_discriminator:
|
|
521
|
+
error_messages.append(f"Skipping OpenAIResponseCompaction due to discriminator mismatch")
|
|
522
|
+
elif not isinstance(v, OpenAIResponseCompaction):
|
|
523
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
524
|
+
if isinstance(v, dict):
|
|
525
|
+
try:
|
|
526
|
+
constructed = OpenAIResponseCompaction.model_validate(v)
|
|
527
|
+
match += 1
|
|
528
|
+
# Return the constructed instance to use it instead of raw dict
|
|
529
|
+
return constructed
|
|
530
|
+
except (ValidationError, ValueError) as e:
|
|
531
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseCompaction` from dict: {str(e)}")
|
|
532
|
+
else:
|
|
533
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseCompaction`")
|
|
534
|
+
else:
|
|
535
|
+
match += 1
|
|
536
|
+
if match > 1:
|
|
537
|
+
# Special case: empty lists can match multiple List[...] schemas in oneOf
|
|
538
|
+
# This is common in streaming where content starts empty
|
|
539
|
+
# In this case, just accept the first match (they're functionally equivalent for empty lists)
|
|
540
|
+
if isinstance(v, list) and len(v) == 0:
|
|
541
|
+
return v
|
|
542
|
+
# more than 1 match
|
|
543
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in ConversationItem with oneOf schemas: OpenAIResponseCompaction, OpenAIResponseInputFunctionToolCallOutput, OpenAIResponseMCPApprovalRequest, OpenAIResponseMCPApprovalResponse, OpenAIResponseMessage, OpenAIResponseOutputMessageFileSearchToolCall, OpenAIResponseOutputMessageFunctionToolCall, OpenAIResponseOutputMessageMCPCall, OpenAIResponseOutputMessageMCPListTools, OpenAIResponseOutputMessageReasoningItem, OpenAIResponseOutputMessageWebSearchToolCall. Details: " + ", ".join(error_messages))
|
|
544
|
+
elif match == 0:
|
|
545
|
+
# no match
|
|
546
|
+
raise ValueError("No match found when setting `actual_instance` in ConversationItem with oneOf schemas: OpenAIResponseCompaction, OpenAIResponseInputFunctionToolCallOutput, OpenAIResponseMCPApprovalRequest, OpenAIResponseMCPApprovalResponse, OpenAIResponseMessage, OpenAIResponseOutputMessageFileSearchToolCall, OpenAIResponseOutputMessageFunctionToolCall, OpenAIResponseOutputMessageMCPCall, OpenAIResponseOutputMessageMCPListTools, OpenAIResponseOutputMessageReasoningItem, OpenAIResponseOutputMessageWebSearchToolCall. Details: " + ", ".join(error_messages))
|
|
547
|
+
else:
|
|
548
|
+
return v
|
|
549
|
+
|
|
550
|
+
@classmethod
|
|
551
|
+
def from_dict(cls, obj: str | dict[str, Any]) -> Self:
|
|
552
|
+
# Handle primitives and lists directly - don't double-serialize them
|
|
553
|
+
if isinstance(obj, (str, int, float, bool, type(None), list)):
|
|
554
|
+
# For non-dict content, bypass from_json and use actual_instance_must_validate_oneof
|
|
555
|
+
instance = cls.model_construct()
|
|
556
|
+
instance.actual_instance = cls.actual_instance_must_validate_oneof(obj)
|
|
557
|
+
return instance
|
|
558
|
+
return cls.from_json(json.dumps(obj))
|
|
559
|
+
|
|
560
|
+
@classmethod
|
|
561
|
+
def from_json(cls, json_str: str) -> Self:
|
|
562
|
+
"""Returns the object represented by the json string"""
|
|
563
|
+
instance = cls.model_construct()
|
|
564
|
+
error_messages = []
|
|
565
|
+
match = 0
|
|
566
|
+
|
|
567
|
+
# use oneOf discriminator to lookup the data type
|
|
568
|
+
_data_type = json.loads(json_str).get("type")
|
|
569
|
+
if not _data_type:
|
|
570
|
+
raise ValueError("Failed to lookup data type from the field `type` in the input.")
|
|
571
|
+
|
|
572
|
+
# check if data type is `OpenAIResponseCompaction`
|
|
573
|
+
if _data_type == "compaction":
|
|
574
|
+
instance.actual_instance = OpenAIResponseCompaction.from_json(json_str)
|
|
575
|
+
return instance
|
|
576
|
+
|
|
577
|
+
# check if data type is `OpenAIResponseOutputMessageFileSearchToolCall`
|
|
578
|
+
if _data_type == "file_search_call":
|
|
579
|
+
instance.actual_instance = OpenAIResponseOutputMessageFileSearchToolCall.from_json(json_str)
|
|
580
|
+
return instance
|
|
581
|
+
|
|
582
|
+
# check if data type is `OpenAIResponseOutputMessageFunctionToolCall`
|
|
583
|
+
if _data_type == "function_call":
|
|
584
|
+
instance.actual_instance = OpenAIResponseOutputMessageFunctionToolCall.from_json(json_str)
|
|
585
|
+
return instance
|
|
586
|
+
|
|
587
|
+
# check if data type is `OpenAIResponseInputFunctionToolCallOutput`
|
|
588
|
+
if _data_type == "function_call_output":
|
|
589
|
+
instance.actual_instance = OpenAIResponseInputFunctionToolCallOutput.from_json(json_str)
|
|
590
|
+
return instance
|
|
591
|
+
|
|
592
|
+
# check if data type is `OpenAIResponseMCPApprovalRequest`
|
|
593
|
+
if _data_type == "mcp_approval_request":
|
|
594
|
+
instance.actual_instance = OpenAIResponseMCPApprovalRequest.from_json(json_str)
|
|
595
|
+
return instance
|
|
596
|
+
|
|
597
|
+
# check if data type is `OpenAIResponseMCPApprovalResponse`
|
|
598
|
+
if _data_type == "mcp_approval_response":
|
|
599
|
+
instance.actual_instance = OpenAIResponseMCPApprovalResponse.from_json(json_str)
|
|
600
|
+
return instance
|
|
601
|
+
|
|
602
|
+
# check if data type is `OpenAIResponseOutputMessageMCPCall`
|
|
603
|
+
if _data_type == "mcp_call":
|
|
604
|
+
instance.actual_instance = OpenAIResponseOutputMessageMCPCall.from_json(json_str)
|
|
605
|
+
return instance
|
|
606
|
+
|
|
607
|
+
# check if data type is `OpenAIResponseOutputMessageMCPListTools`
|
|
608
|
+
if _data_type == "mcp_list_tools":
|
|
609
|
+
instance.actual_instance = OpenAIResponseOutputMessageMCPListTools.from_json(json_str)
|
|
610
|
+
return instance
|
|
611
|
+
|
|
612
|
+
# check if data type is `OpenAIResponseMessage`
|
|
613
|
+
if _data_type == "message":
|
|
614
|
+
instance.actual_instance = OpenAIResponseMessage.from_json(json_str)
|
|
615
|
+
return instance
|
|
616
|
+
|
|
617
|
+
# check if data type is `OpenAIResponseOutputMessageReasoningItem`
|
|
618
|
+
if _data_type == "reasoning":
|
|
619
|
+
instance.actual_instance = OpenAIResponseOutputMessageReasoningItem.from_json(json_str)
|
|
620
|
+
return instance
|
|
621
|
+
|
|
622
|
+
# check if data type is `OpenAIResponseOutputMessageWebSearchToolCall`
|
|
623
|
+
if _data_type == "web_search_call":
|
|
624
|
+
instance.actual_instance = OpenAIResponseOutputMessageWebSearchToolCall.from_json(json_str)
|
|
625
|
+
return instance
|
|
626
|
+
|
|
627
|
+
# check if data type is `ERRORUNKNOWN`
|
|
628
|
+
if _data_type == "":
|
|
629
|
+
instance.actual_instance = ERRORUNKNOWN.from_json(json_str)
|
|
630
|
+
return instance
|
|
631
|
+
|
|
632
|
+
# deserialize data into OpenAIResponseMessage
|
|
633
|
+
try:
|
|
634
|
+
instance.actual_instance = OpenAIResponseMessage.from_json(json_str)
|
|
635
|
+
match += 1
|
|
636
|
+
except (ValidationError, ValueError) as e:
|
|
637
|
+
error_messages.append(str(e))
|
|
638
|
+
# deserialize data into OpenAIResponseOutputMessageWebSearchToolCall
|
|
639
|
+
try:
|
|
640
|
+
instance.actual_instance = OpenAIResponseOutputMessageWebSearchToolCall.from_json(json_str)
|
|
641
|
+
match += 1
|
|
642
|
+
except (ValidationError, ValueError) as e:
|
|
643
|
+
error_messages.append(str(e))
|
|
644
|
+
# deserialize data into OpenAIResponseOutputMessageFileSearchToolCall
|
|
645
|
+
try:
|
|
646
|
+
instance.actual_instance = OpenAIResponseOutputMessageFileSearchToolCall.from_json(json_str)
|
|
647
|
+
match += 1
|
|
648
|
+
except (ValidationError, ValueError) as e:
|
|
649
|
+
error_messages.append(str(e))
|
|
650
|
+
# deserialize data into OpenAIResponseOutputMessageFunctionToolCall
|
|
651
|
+
try:
|
|
652
|
+
instance.actual_instance = OpenAIResponseOutputMessageFunctionToolCall.from_json(json_str)
|
|
653
|
+
match += 1
|
|
654
|
+
except (ValidationError, ValueError) as e:
|
|
655
|
+
error_messages.append(str(e))
|
|
656
|
+
# deserialize data into OpenAIResponseInputFunctionToolCallOutput
|
|
657
|
+
try:
|
|
658
|
+
instance.actual_instance = OpenAIResponseInputFunctionToolCallOutput.from_json(json_str)
|
|
659
|
+
match += 1
|
|
660
|
+
except (ValidationError, ValueError) as e:
|
|
661
|
+
error_messages.append(str(e))
|
|
662
|
+
# deserialize data into OpenAIResponseMCPApprovalRequest
|
|
663
|
+
try:
|
|
664
|
+
instance.actual_instance = OpenAIResponseMCPApprovalRequest.from_json(json_str)
|
|
665
|
+
match += 1
|
|
666
|
+
except (ValidationError, ValueError) as e:
|
|
667
|
+
error_messages.append(str(e))
|
|
668
|
+
# deserialize data into OpenAIResponseMCPApprovalResponse
|
|
669
|
+
try:
|
|
670
|
+
instance.actual_instance = OpenAIResponseMCPApprovalResponse.from_json(json_str)
|
|
671
|
+
match += 1
|
|
672
|
+
except (ValidationError, ValueError) as e:
|
|
673
|
+
error_messages.append(str(e))
|
|
674
|
+
# deserialize data into OpenAIResponseOutputMessageMCPCall
|
|
675
|
+
try:
|
|
676
|
+
instance.actual_instance = OpenAIResponseOutputMessageMCPCall.from_json(json_str)
|
|
677
|
+
match += 1
|
|
678
|
+
except (ValidationError, ValueError) as e:
|
|
679
|
+
error_messages.append(str(e))
|
|
680
|
+
# deserialize data into OpenAIResponseOutputMessageMCPListTools
|
|
681
|
+
try:
|
|
682
|
+
instance.actual_instance = OpenAIResponseOutputMessageMCPListTools.from_json(json_str)
|
|
683
|
+
match += 1
|
|
684
|
+
except (ValidationError, ValueError) as e:
|
|
685
|
+
error_messages.append(str(e))
|
|
686
|
+
# deserialize data into OpenAIResponseOutputMessageReasoningItem
|
|
687
|
+
try:
|
|
688
|
+
instance.actual_instance = OpenAIResponseOutputMessageReasoningItem.from_json(json_str)
|
|
689
|
+
match += 1
|
|
690
|
+
except (ValidationError, ValueError) as e:
|
|
691
|
+
error_messages.append(str(e))
|
|
692
|
+
# deserialize data into OpenAIResponseCompaction
|
|
693
|
+
try:
|
|
694
|
+
instance.actual_instance = OpenAIResponseCompaction.from_json(json_str)
|
|
695
|
+
match += 1
|
|
696
|
+
except (ValidationError, ValueError) as e:
|
|
697
|
+
error_messages.append(str(e))
|
|
698
|
+
|
|
699
|
+
if match > 1:
|
|
700
|
+
# Special case: empty lists can match multiple List[...] schemas in oneOf
|
|
701
|
+
# This is common in streaming where content starts empty
|
|
702
|
+
# In this case, just accept the first match (they're functionally equivalent for empty lists)
|
|
703
|
+
data = json.loads(json_str)
|
|
704
|
+
if isinstance(data, list) and len(data) == 0:
|
|
705
|
+
return instance # First match already set in instance
|
|
706
|
+
# more than 1 match
|
|
707
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into ConversationItem with oneOf schemas: OpenAIResponseCompaction, OpenAIResponseInputFunctionToolCallOutput, OpenAIResponseMCPApprovalRequest, OpenAIResponseMCPApprovalResponse, OpenAIResponseMessage, OpenAIResponseOutputMessageFileSearchToolCall, OpenAIResponseOutputMessageFunctionToolCall, OpenAIResponseOutputMessageMCPCall, OpenAIResponseOutputMessageMCPListTools, OpenAIResponseOutputMessageReasoningItem, OpenAIResponseOutputMessageWebSearchToolCall. Details: " + ", ".join(error_messages))
|
|
708
|
+
elif match == 0:
|
|
709
|
+
# no match - try lenient fallback for streaming chunks
|
|
710
|
+
data = json.loads(json_str)
|
|
711
|
+
|
|
712
|
+
# Helper to remove None values recursively for streaming chunks
|
|
713
|
+
def remove_none_values(obj):
|
|
714
|
+
if isinstance(obj, dict):
|
|
715
|
+
return {k: remove_none_values(v) for k, v in obj.items() if v is not None}
|
|
716
|
+
elif isinstance(obj, list):
|
|
717
|
+
return [remove_none_values(item) for item in obj if item is not None]
|
|
718
|
+
return obj
|
|
719
|
+
|
|
720
|
+
# Helper to add default values for commonly missing required fields in streaming
|
|
721
|
+
def add_streaming_defaults(obj):
|
|
722
|
+
if isinstance(obj, dict):
|
|
723
|
+
result = dict(obj)
|
|
724
|
+
# Add empty string for finish_reason if missing (common in streaming chunks)
|
|
725
|
+
if 'choices' in result and isinstance(result['choices'], list):
|
|
726
|
+
for choice in result['choices']:
|
|
727
|
+
if isinstance(choice, dict) and 'finish_reason' not in choice:
|
|
728
|
+
choice['finish_reason'] = ''
|
|
729
|
+
return result
|
|
730
|
+
return obj
|
|
731
|
+
|
|
732
|
+
# Try each variant with None values removed and defaults added
|
|
733
|
+
try:
|
|
734
|
+
cleaned_data = remove_none_values(data)
|
|
735
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
736
|
+
variant = OpenAIResponseMessage.model_validate(cleaned_data)
|
|
737
|
+
instance.actual_instance = variant
|
|
738
|
+
return instance
|
|
739
|
+
except Exception:
|
|
740
|
+
pass
|
|
741
|
+
try:
|
|
742
|
+
cleaned_data = remove_none_values(data)
|
|
743
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
744
|
+
variant = OpenAIResponseOutputMessageWebSearchToolCall.model_validate(cleaned_data)
|
|
745
|
+
instance.actual_instance = variant
|
|
746
|
+
return instance
|
|
747
|
+
except Exception:
|
|
748
|
+
pass
|
|
749
|
+
try:
|
|
750
|
+
cleaned_data = remove_none_values(data)
|
|
751
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
752
|
+
variant = OpenAIResponseOutputMessageFileSearchToolCall.model_validate(cleaned_data)
|
|
753
|
+
instance.actual_instance = variant
|
|
754
|
+
return instance
|
|
755
|
+
except Exception:
|
|
756
|
+
pass
|
|
757
|
+
try:
|
|
758
|
+
cleaned_data = remove_none_values(data)
|
|
759
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
760
|
+
variant = OpenAIResponseOutputMessageFunctionToolCall.model_validate(cleaned_data)
|
|
761
|
+
instance.actual_instance = variant
|
|
762
|
+
return instance
|
|
763
|
+
except Exception:
|
|
764
|
+
pass
|
|
765
|
+
try:
|
|
766
|
+
cleaned_data = remove_none_values(data)
|
|
767
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
768
|
+
variant = OpenAIResponseInputFunctionToolCallOutput.model_validate(cleaned_data)
|
|
769
|
+
instance.actual_instance = variant
|
|
770
|
+
return instance
|
|
771
|
+
except Exception:
|
|
772
|
+
pass
|
|
773
|
+
try:
|
|
774
|
+
cleaned_data = remove_none_values(data)
|
|
775
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
776
|
+
variant = OpenAIResponseMCPApprovalRequest.model_validate(cleaned_data)
|
|
777
|
+
instance.actual_instance = variant
|
|
778
|
+
return instance
|
|
779
|
+
except Exception:
|
|
780
|
+
pass
|
|
781
|
+
try:
|
|
782
|
+
cleaned_data = remove_none_values(data)
|
|
783
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
784
|
+
variant = OpenAIResponseMCPApprovalResponse.model_validate(cleaned_data)
|
|
785
|
+
instance.actual_instance = variant
|
|
786
|
+
return instance
|
|
787
|
+
except Exception:
|
|
788
|
+
pass
|
|
789
|
+
try:
|
|
790
|
+
cleaned_data = remove_none_values(data)
|
|
791
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
792
|
+
variant = OpenAIResponseOutputMessageMCPCall.model_validate(cleaned_data)
|
|
793
|
+
instance.actual_instance = variant
|
|
794
|
+
return instance
|
|
795
|
+
except Exception:
|
|
796
|
+
pass
|
|
797
|
+
try:
|
|
798
|
+
cleaned_data = remove_none_values(data)
|
|
799
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
800
|
+
variant = OpenAIResponseOutputMessageMCPListTools.model_validate(cleaned_data)
|
|
801
|
+
instance.actual_instance = variant
|
|
802
|
+
return instance
|
|
803
|
+
except Exception:
|
|
804
|
+
pass
|
|
805
|
+
try:
|
|
806
|
+
cleaned_data = remove_none_values(data)
|
|
807
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
808
|
+
variant = OpenAIResponseOutputMessageReasoningItem.model_validate(cleaned_data)
|
|
809
|
+
instance.actual_instance = variant
|
|
810
|
+
return instance
|
|
811
|
+
except Exception:
|
|
812
|
+
pass
|
|
813
|
+
try:
|
|
814
|
+
cleaned_data = remove_none_values(data)
|
|
815
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
816
|
+
variant = OpenAIResponseCompaction.model_validate(cleaned_data)
|
|
817
|
+
instance.actual_instance = variant
|
|
818
|
+
return instance
|
|
819
|
+
except Exception:
|
|
820
|
+
pass
|
|
821
|
+
|
|
822
|
+
# All variants failed
|
|
823
|
+
raise ValueError("No match found when deserializing the JSON string into ConversationItem with oneOf schemas: OpenAIResponseCompaction, OpenAIResponseInputFunctionToolCallOutput, OpenAIResponseMCPApprovalRequest, OpenAIResponseMCPApprovalResponse, OpenAIResponseMessage, OpenAIResponseOutputMessageFileSearchToolCall, OpenAIResponseOutputMessageFunctionToolCall, OpenAIResponseOutputMessageMCPCall, OpenAIResponseOutputMessageMCPListTools, OpenAIResponseOutputMessageReasoningItem, OpenAIResponseOutputMessageWebSearchToolCall. Details: " + ", ".join(error_messages))
|
|
824
|
+
else:
|
|
825
|
+
return instance
|
|
826
|
+
|
|
827
|
+
def to_dict(self) -> dict[str, Any] | OpenAIResponseCompaction | OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalRequest | OpenAIResponseMCPApprovalResponse | OpenAIResponseMessage | OpenAIResponseOutputMessageFileSearchToolCall | OpenAIResponseOutputMessageFunctionToolCall | OpenAIResponseOutputMessageMCPCall | OpenAIResponseOutputMessageMCPListTools | OpenAIResponseOutputMessageReasoningItem | OpenAIResponseOutputMessageWebSearchToolCall | None:
|
|
828
|
+
"""Returns the dict representation of the actual instance"""
|
|
829
|
+
if self.actual_instance is None:
|
|
830
|
+
return None
|
|
831
|
+
|
|
832
|
+
# Handle lists specially - call to_dict() on each item if it has the method
|
|
833
|
+
if isinstance(self.actual_instance, list):
|
|
834
|
+
return [
|
|
835
|
+
item.to_dict() if hasattr(item, 'to_dict') and callable(item.to_dict)
|
|
836
|
+
else item
|
|
837
|
+
for item in self.actual_instance
|
|
838
|
+
]
|
|
839
|
+
# Handle Pydantic models
|
|
840
|
+
elif hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
841
|
+
return self.actual_instance.to_dict()
|
|
842
|
+
# Handle other Pydantic models that don't have to_dict
|
|
843
|
+
elif hasattr(self.actual_instance, '__pydantic_serializer__'):
|
|
844
|
+
from pydantic_core import to_jsonable_python
|
|
845
|
+
return to_jsonable_python(
|
|
846
|
+
self.actual_instance,
|
|
847
|
+
by_alias=True,
|
|
848
|
+
exclude_none=True,
|
|
849
|
+
fallback=lambda x: x if isinstance(x, str | int | float | bool | type(None)) else str(x)
|
|
850
|
+
)
|
|
851
|
+
else:
|
|
852
|
+
# primitive type
|
|
853
|
+
return self.actual_instance
|
|
854
|
+
|
|
855
|
+
|