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,396 @@
|
|
|
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_open_client.models.open_ai_response_content_part_refusal import OpenAIResponseContentPartRefusal
|
|
28
|
+
from ogx_open_client.models.open_ai_response_output_message_content_output_text_output import OpenAIResponseOutputMessageContentOutputTextOutput
|
|
29
|
+
from pydantic import StrictStr, Field, model_serializer
|
|
30
|
+
from typing import Any, ClassVar
|
|
31
|
+
from typing_extensions import Literal, Self
|
|
32
|
+
from ogx_open_client.lib._utils import pascal_to_snake_case
|
|
33
|
+
|
|
34
|
+
OPENAIRESPONSEOUTPUTMESSAGECONTENTOUTPUTTEXTOUTPUTOPENAIRESPONSECONTENTPARTREFUSAL_ONE_OF_SCHEMAS = ["OpenAIResponseContentPartRefusal", "OpenAIResponseOutputMessageContentOutputTextOutput"]
|
|
35
|
+
|
|
36
|
+
class OpenAIResponseOutputMessageContentOutputTextOutputOpenAIResponseContentPartRefusal(BaseModel):
|
|
37
|
+
"""
|
|
38
|
+
OpenAIResponseOutputMessageContentOutputTextOutputOpenAIResponseContentPartRefusal
|
|
39
|
+
"""
|
|
40
|
+
# data type: OpenAIResponseOutputMessageContentOutputTextOutput
|
|
41
|
+
oneof_schema_1_validator: Optional[OpenAIResponseOutputMessageContentOutputTextOutput] = None
|
|
42
|
+
# data type: OpenAIResponseContentPartRefusal
|
|
43
|
+
oneof_schema_2_validator: Optional[OpenAIResponseContentPartRefusal] = None
|
|
44
|
+
actual_instance: OpenAIResponseContentPartRefusal | OpenAIResponseOutputMessageContentOutputTextOutput | None = None
|
|
45
|
+
one_of_schemas: ClassVar[set[str]] = { "OpenAIResponseContentPartRefusal", "OpenAIResponseOutputMessageContentOutputTextOutput" }
|
|
46
|
+
|
|
47
|
+
model_config = ConfigDict(
|
|
48
|
+
validate_assignment=True,
|
|
49
|
+
protected_namespaces=(),
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
discriminator_value_class_map: ClassVar[dict[str, str]] = {
|
|
54
|
+
'output_text': 'OpenAIResponseOutputMessageContentOutputTextOutput',
|
|
55
|
+
'refusal': 'OpenAIResponseContentPartRefusal',
|
|
56
|
+
'': 'ERRORUNKNOWN'
|
|
57
|
+
}
|
|
58
|
+
discriminator_property_name: ClassVar[str] = 'type'
|
|
59
|
+
|
|
60
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
61
|
+
if args:
|
|
62
|
+
if len(args) > 1:
|
|
63
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
64
|
+
if kwargs:
|
|
65
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
66
|
+
|
|
67
|
+
# Preprocess the value to handle lists of dicts
|
|
68
|
+
value = args[0]
|
|
69
|
+
if isinstance(value, list):
|
|
70
|
+
# Try to construct model instances from dicts in the list
|
|
71
|
+
# This ensures default values are applied
|
|
72
|
+
from pydantic import ValidationError as PydanticValidationError
|
|
73
|
+
validated = None
|
|
74
|
+
if validated is not None:
|
|
75
|
+
value = validated
|
|
76
|
+
|
|
77
|
+
super().__init__(actual_instance=value)
|
|
78
|
+
else:
|
|
79
|
+
super().__init__(**kwargs)
|
|
80
|
+
|
|
81
|
+
def __getattr__(self, name: str):
|
|
82
|
+
"""Proxy attribute access to actual_instance for transparency."""
|
|
83
|
+
# Avoid infinite recursion for private attributes and model fields
|
|
84
|
+
if name.startswith('_') or name in ('actual_instance', 'one_of_schemas', 'model_config', 'model_fields'):
|
|
85
|
+
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
|
|
86
|
+
|
|
87
|
+
actual = super().__getattribute__('actual_instance')
|
|
88
|
+
if actual is None:
|
|
89
|
+
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}' (actual_instance is None)")
|
|
90
|
+
|
|
91
|
+
return getattr(actual, name)
|
|
92
|
+
|
|
93
|
+
def __iter__(self):
|
|
94
|
+
"""Iterate over items if actual_instance is iterable."""
|
|
95
|
+
if hasattr(self.actual_instance, '__iter__'):
|
|
96
|
+
return iter(self.actual_instance)
|
|
97
|
+
raise TypeError(f"'{type(self.actual_instance).__name__}' object is not iterable")
|
|
98
|
+
|
|
99
|
+
def __getitem__(self, index):
|
|
100
|
+
"""Get item by index if actual_instance supports indexing."""
|
|
101
|
+
if hasattr(self.actual_instance, '__getitem__'):
|
|
102
|
+
return self.actual_instance[index]
|
|
103
|
+
raise TypeError(f"'{type(self.actual_instance).__name__}' object is not subscriptable")
|
|
104
|
+
|
|
105
|
+
def __len__(self):
|
|
106
|
+
"""Get length if actual_instance supports len()."""
|
|
107
|
+
if hasattr(self.actual_instance, '__len__'):
|
|
108
|
+
return len(self.actual_instance)
|
|
109
|
+
raise TypeError(f"object of type '{type(self.actual_instance).__name__}' has no len()")
|
|
110
|
+
|
|
111
|
+
def __bool__(self):
|
|
112
|
+
"""Handle truthiness checks - wrapper is truthy if actual_instance is not None."""
|
|
113
|
+
return self.actual_instance is not None
|
|
114
|
+
|
|
115
|
+
def __eq__(self, other):
|
|
116
|
+
"""Handle equality comparisons transparently."""
|
|
117
|
+
if hasattr(self, 'actual_instance') and self.actual_instance is not None:
|
|
118
|
+
other_value = other.actual_instance if hasattr(other, 'actual_instance') else other
|
|
119
|
+
return self.actual_instance == other_value
|
|
120
|
+
return super().__eq__(other)
|
|
121
|
+
|
|
122
|
+
def __hash__(self):
|
|
123
|
+
"""Handle hashing - use actual_instance's hash if available."""
|
|
124
|
+
if hasattr(self, 'actual_instance') and self.actual_instance is not None:
|
|
125
|
+
try:
|
|
126
|
+
return hash(self.actual_instance)
|
|
127
|
+
except TypeError:
|
|
128
|
+
return id(self)
|
|
129
|
+
return super().__hash__()
|
|
130
|
+
|
|
131
|
+
def __repr__(self):
|
|
132
|
+
"""Return repr of actual_instance for debugging."""
|
|
133
|
+
if hasattr(self, 'actual_instance') and self.actual_instance is not None:
|
|
134
|
+
return repr(self.actual_instance)
|
|
135
|
+
return super().__repr__()
|
|
136
|
+
|
|
137
|
+
def to_json(self) -> str:
|
|
138
|
+
"""Returns the JSON representation of the actual instance"""
|
|
139
|
+
if self.actual_instance is None:
|
|
140
|
+
return "null"
|
|
141
|
+
|
|
142
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
143
|
+
return self.actual_instance.to_json()
|
|
144
|
+
else:
|
|
145
|
+
return json.dumps(self.actual_instance)
|
|
146
|
+
|
|
147
|
+
def to_str(self) -> str:
|
|
148
|
+
"""Returns the string representation of the actual instance"""
|
|
149
|
+
return pprint.pformat(self.model_dump())
|
|
150
|
+
|
|
151
|
+
@model_serializer(mode='wrap')
|
|
152
|
+
def serialize_model(self, serializer):
|
|
153
|
+
"""Custom serializer that delegates to actual_instance for proper JSON serialization."""
|
|
154
|
+
# If actual_instance is None, serialize the wrapper normally
|
|
155
|
+
if not hasattr(self, 'actual_instance') or self.actual_instance is None:
|
|
156
|
+
return serializer(self)
|
|
157
|
+
|
|
158
|
+
# If actual_instance is a Pydantic model, serialize it using the default serializer
|
|
159
|
+
# This ensures nested models are also serialized correctly
|
|
160
|
+
if hasattr(self.actual_instance, '__pydantic_serializer__'):
|
|
161
|
+
# Use Pydantic's serializer infrastructure to ensure proper serialization
|
|
162
|
+
from pydantic_core import to_jsonable_python
|
|
163
|
+
return to_jsonable_python(
|
|
164
|
+
self.actual_instance,
|
|
165
|
+
by_alias=True,
|
|
166
|
+
exclude_none=True,
|
|
167
|
+
fallback=lambda x: x if isinstance(x, str | int | float | bool | type(None)) else str(x)
|
|
168
|
+
)
|
|
169
|
+
# If it's a list of Pydantic models, serialize each one
|
|
170
|
+
elif isinstance(self.actual_instance, list):
|
|
171
|
+
from pydantic_core import to_jsonable_python
|
|
172
|
+
return [
|
|
173
|
+
to_jsonable_python(
|
|
174
|
+
item,
|
|
175
|
+
by_alias=True,
|
|
176
|
+
exclude_none=True,
|
|
177
|
+
fallback=lambda x: x if isinstance(x, str | int | float | bool | type(None)) else str(x)
|
|
178
|
+
)
|
|
179
|
+
if hasattr(item, '__pydantic_serializer__')
|
|
180
|
+
else item
|
|
181
|
+
for item in self.actual_instance
|
|
182
|
+
]
|
|
183
|
+
# Otherwise return as-is (primitives, dicts, etc.)
|
|
184
|
+
else:
|
|
185
|
+
return self.actual_instance
|
|
186
|
+
|
|
187
|
+
@field_validator('actual_instance')
|
|
188
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
189
|
+
instance = OpenAIResponseOutputMessageContentOutputTextOutputOpenAIResponseContentPartRefusal.model_construct()
|
|
190
|
+
error_messages = []
|
|
191
|
+
match = 0
|
|
192
|
+
# validate data type: OpenAIResponseOutputMessageContentOutputTextOutput
|
|
193
|
+
# Check if we should skip this variant based on discriminator
|
|
194
|
+
_should_skip_discriminator = False
|
|
195
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
196
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
197
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
198
|
+
_disc_value = v.get('type')
|
|
199
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
200
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
201
|
+
if _expected_class != 'OpenAIResponseOutputMessageContentOutputTextOutput':
|
|
202
|
+
_should_skip_discriminator = True
|
|
203
|
+
|
|
204
|
+
if _should_skip_discriminator:
|
|
205
|
+
error_messages.append(f"Skipping OpenAIResponseOutputMessageContentOutputTextOutput due to discriminator mismatch")
|
|
206
|
+
elif not isinstance(v, OpenAIResponseOutputMessageContentOutputTextOutput):
|
|
207
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
208
|
+
if isinstance(v, dict):
|
|
209
|
+
try:
|
|
210
|
+
constructed = OpenAIResponseOutputMessageContentOutputTextOutput.model_validate(v)
|
|
211
|
+
match += 1
|
|
212
|
+
# Return the constructed instance to use it instead of raw dict
|
|
213
|
+
return constructed
|
|
214
|
+
except (ValidationError, ValueError) as e:
|
|
215
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseOutputMessageContentOutputTextOutput` from dict: {str(e)}")
|
|
216
|
+
else:
|
|
217
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseOutputMessageContentOutputTextOutput`")
|
|
218
|
+
else:
|
|
219
|
+
match += 1
|
|
220
|
+
# validate data type: OpenAIResponseContentPartRefusal
|
|
221
|
+
# Check if we should skip this variant based on discriminator
|
|
222
|
+
_should_skip_discriminator = False
|
|
223
|
+
if isinstance(v, dict) and hasattr(cls, 'discriminator_value_class_map'):
|
|
224
|
+
_disc_value = v.get(cls.discriminator_property_name)
|
|
225
|
+
if _disc_value is None and cls.discriminator_property_name != 'type':
|
|
226
|
+
_disc_value = v.get('type')
|
|
227
|
+
if _disc_value and _disc_value in cls.discriminator_value_class_map:
|
|
228
|
+
_expected_class = cls.discriminator_value_class_map[_disc_value]
|
|
229
|
+
if _expected_class != 'OpenAIResponseContentPartRefusal':
|
|
230
|
+
_should_skip_discriminator = True
|
|
231
|
+
|
|
232
|
+
if _should_skip_discriminator:
|
|
233
|
+
error_messages.append(f"Skipping OpenAIResponseContentPartRefusal due to discriminator mismatch")
|
|
234
|
+
elif not isinstance(v, OpenAIResponseContentPartRefusal):
|
|
235
|
+
# Try to construct from dict if it's a dict - this applies default values
|
|
236
|
+
if isinstance(v, dict):
|
|
237
|
+
try:
|
|
238
|
+
constructed = OpenAIResponseContentPartRefusal.model_validate(v)
|
|
239
|
+
match += 1
|
|
240
|
+
# Return the constructed instance to use it instead of raw dict
|
|
241
|
+
return constructed
|
|
242
|
+
except (ValidationError, ValueError) as e:
|
|
243
|
+
error_messages.append(f"Error! Cannot construct `OpenAIResponseContentPartRefusal` from dict: {str(e)}")
|
|
244
|
+
else:
|
|
245
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OpenAIResponseContentPartRefusal`")
|
|
246
|
+
else:
|
|
247
|
+
match += 1
|
|
248
|
+
if match > 1:
|
|
249
|
+
# Special case: empty lists can match multiple List[...] schemas in oneOf
|
|
250
|
+
# This is common in streaming where content starts empty
|
|
251
|
+
# In this case, just accept the first match (they're functionally equivalent for empty lists)
|
|
252
|
+
if isinstance(v, list) and len(v) == 0:
|
|
253
|
+
return v
|
|
254
|
+
# more than 1 match
|
|
255
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in OpenAIResponseOutputMessageContentOutputTextOutputOpenAIResponseContentPartRefusal with oneOf schemas: OpenAIResponseContentPartRefusal, OpenAIResponseOutputMessageContentOutputTextOutput. Details: " + ", ".join(error_messages))
|
|
256
|
+
elif match == 0:
|
|
257
|
+
# no match
|
|
258
|
+
raise ValueError("No match found when setting `actual_instance` in OpenAIResponseOutputMessageContentOutputTextOutputOpenAIResponseContentPartRefusal with oneOf schemas: OpenAIResponseContentPartRefusal, OpenAIResponseOutputMessageContentOutputTextOutput. Details: " + ", ".join(error_messages))
|
|
259
|
+
else:
|
|
260
|
+
return v
|
|
261
|
+
|
|
262
|
+
@classmethod
|
|
263
|
+
def from_dict(cls, obj: str | dict[str, Any]) -> Self:
|
|
264
|
+
# Handle primitives and lists directly - don't double-serialize them
|
|
265
|
+
if isinstance(obj, (str, int, float, bool, type(None), list)):
|
|
266
|
+
# For non-dict content, bypass from_json and use actual_instance_must_validate_oneof
|
|
267
|
+
instance = cls.model_construct()
|
|
268
|
+
instance.actual_instance = cls.actual_instance_must_validate_oneof(obj)
|
|
269
|
+
return instance
|
|
270
|
+
return cls.from_json(json.dumps(obj))
|
|
271
|
+
|
|
272
|
+
@classmethod
|
|
273
|
+
def from_json(cls, json_str: str) -> Self:
|
|
274
|
+
"""Returns the object represented by the json string"""
|
|
275
|
+
instance = cls.model_construct()
|
|
276
|
+
error_messages = []
|
|
277
|
+
match = 0
|
|
278
|
+
|
|
279
|
+
# use oneOf discriminator to lookup the data type
|
|
280
|
+
_data_type = json.loads(json_str).get("type")
|
|
281
|
+
if not _data_type:
|
|
282
|
+
raise ValueError("Failed to lookup data type from the field `type` in the input.")
|
|
283
|
+
|
|
284
|
+
# check if data type is `OpenAIResponseOutputMessageContentOutputTextOutput`
|
|
285
|
+
if _data_type == "output_text":
|
|
286
|
+
instance.actual_instance = OpenAIResponseOutputMessageContentOutputTextOutput.from_json(json_str)
|
|
287
|
+
return instance
|
|
288
|
+
|
|
289
|
+
# check if data type is `OpenAIResponseContentPartRefusal`
|
|
290
|
+
if _data_type == "refusal":
|
|
291
|
+
instance.actual_instance = OpenAIResponseContentPartRefusal.from_json(json_str)
|
|
292
|
+
return instance
|
|
293
|
+
|
|
294
|
+
# check if data type is `ERRORUNKNOWN`
|
|
295
|
+
if _data_type == "":
|
|
296
|
+
instance.actual_instance = ERRORUNKNOWN.from_json(json_str)
|
|
297
|
+
return instance
|
|
298
|
+
|
|
299
|
+
# deserialize data into OpenAIResponseOutputMessageContentOutputTextOutput
|
|
300
|
+
try:
|
|
301
|
+
instance.actual_instance = OpenAIResponseOutputMessageContentOutputTextOutput.from_json(json_str)
|
|
302
|
+
match += 1
|
|
303
|
+
except (ValidationError, ValueError) as e:
|
|
304
|
+
error_messages.append(str(e))
|
|
305
|
+
# deserialize data into OpenAIResponseContentPartRefusal
|
|
306
|
+
try:
|
|
307
|
+
instance.actual_instance = OpenAIResponseContentPartRefusal.from_json(json_str)
|
|
308
|
+
match += 1
|
|
309
|
+
except (ValidationError, ValueError) as e:
|
|
310
|
+
error_messages.append(str(e))
|
|
311
|
+
|
|
312
|
+
if match > 1:
|
|
313
|
+
# Special case: empty lists can match multiple List[...] schemas in oneOf
|
|
314
|
+
# This is common in streaming where content starts empty
|
|
315
|
+
# In this case, just accept the first match (they're functionally equivalent for empty lists)
|
|
316
|
+
data = json.loads(json_str)
|
|
317
|
+
if isinstance(data, list) and len(data) == 0:
|
|
318
|
+
return instance # First match already set in instance
|
|
319
|
+
# more than 1 match
|
|
320
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into OpenAIResponseOutputMessageContentOutputTextOutputOpenAIResponseContentPartRefusal with oneOf schemas: OpenAIResponseContentPartRefusal, OpenAIResponseOutputMessageContentOutputTextOutput. Details: " + ", ".join(error_messages))
|
|
321
|
+
elif match == 0:
|
|
322
|
+
# no match - try lenient fallback for streaming chunks
|
|
323
|
+
data = json.loads(json_str)
|
|
324
|
+
|
|
325
|
+
# Helper to remove None values recursively for streaming chunks
|
|
326
|
+
def remove_none_values(obj):
|
|
327
|
+
if isinstance(obj, dict):
|
|
328
|
+
return {k: remove_none_values(v) for k, v in obj.items() if v is not None}
|
|
329
|
+
elif isinstance(obj, list):
|
|
330
|
+
return [remove_none_values(item) for item in obj if item is not None]
|
|
331
|
+
return obj
|
|
332
|
+
|
|
333
|
+
# Helper to add default values for commonly missing required fields in streaming
|
|
334
|
+
def add_streaming_defaults(obj):
|
|
335
|
+
if isinstance(obj, dict):
|
|
336
|
+
result = dict(obj)
|
|
337
|
+
# Add empty string for finish_reason if missing (common in streaming chunks)
|
|
338
|
+
if 'choices' in result and isinstance(result['choices'], list):
|
|
339
|
+
for choice in result['choices']:
|
|
340
|
+
if isinstance(choice, dict) and 'finish_reason' not in choice:
|
|
341
|
+
choice['finish_reason'] = ''
|
|
342
|
+
return result
|
|
343
|
+
return obj
|
|
344
|
+
|
|
345
|
+
# Try each variant with None values removed and defaults added
|
|
346
|
+
try:
|
|
347
|
+
cleaned_data = remove_none_values(data)
|
|
348
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
349
|
+
variant = OpenAIResponseOutputMessageContentOutputTextOutput.model_validate(cleaned_data)
|
|
350
|
+
instance.actual_instance = variant
|
|
351
|
+
return instance
|
|
352
|
+
except Exception:
|
|
353
|
+
pass
|
|
354
|
+
try:
|
|
355
|
+
cleaned_data = remove_none_values(data)
|
|
356
|
+
cleaned_data = add_streaming_defaults(cleaned_data)
|
|
357
|
+
variant = OpenAIResponseContentPartRefusal.model_validate(cleaned_data)
|
|
358
|
+
instance.actual_instance = variant
|
|
359
|
+
return instance
|
|
360
|
+
except Exception:
|
|
361
|
+
pass
|
|
362
|
+
|
|
363
|
+
# All variants failed
|
|
364
|
+
raise ValueError("No match found when deserializing the JSON string into OpenAIResponseOutputMessageContentOutputTextOutputOpenAIResponseContentPartRefusal with oneOf schemas: OpenAIResponseContentPartRefusal, OpenAIResponseOutputMessageContentOutputTextOutput. Details: " + ", ".join(error_messages))
|
|
365
|
+
else:
|
|
366
|
+
return instance
|
|
367
|
+
|
|
368
|
+
def to_dict(self) -> dict[str, Any] | OpenAIResponseContentPartRefusal | OpenAIResponseOutputMessageContentOutputTextOutput | None:
|
|
369
|
+
"""Returns the dict representation of the actual instance"""
|
|
370
|
+
if self.actual_instance is None:
|
|
371
|
+
return None
|
|
372
|
+
|
|
373
|
+
# Handle lists specially - call to_dict() on each item if it has the method
|
|
374
|
+
if isinstance(self.actual_instance, list):
|
|
375
|
+
return [
|
|
376
|
+
item.to_dict() if hasattr(item, 'to_dict') and callable(item.to_dict)
|
|
377
|
+
else item
|
|
378
|
+
for item in self.actual_instance
|
|
379
|
+
]
|
|
380
|
+
# Handle Pydantic models
|
|
381
|
+
elif hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
382
|
+
return self.actual_instance.to_dict()
|
|
383
|
+
# Handle other Pydantic models that don't have to_dict
|
|
384
|
+
elif hasattr(self.actual_instance, '__pydantic_serializer__'):
|
|
385
|
+
from pydantic_core import to_jsonable_python
|
|
386
|
+
return to_jsonable_python(
|
|
387
|
+
self.actual_instance,
|
|
388
|
+
by_alias=True,
|
|
389
|
+
exclude_none=True,
|
|
390
|
+
fallback=lambda x: x if isinstance(x, str | int | float | bool | type(None)) else str(x)
|
|
391
|
+
)
|
|
392
|
+
else:
|
|
393
|
+
# primitive type
|
|
394
|
+
return self.actual_instance
|
|
395
|
+
|
|
396
|
+
|
|
@@ -0,0 +1,153 @@
|
|
|
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 pprint
|
|
23
|
+
import re # noqa: F401
|
|
24
|
+
import json
|
|
25
|
+
|
|
26
|
+
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
|
27
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
28
|
+
from ogx_open_client.models.open_ai_response_output_message_file_search_tool_call_results import OpenAIResponseOutputMessageFileSearchToolCallResults
|
|
29
|
+
from typing import Any, ClassVar
|
|
30
|
+
from typing_extensions import Self
|
|
31
|
+
|
|
32
|
+
class OpenAIResponseOutputMessageFileSearchToolCall(BaseModel):
|
|
33
|
+
"""
|
|
34
|
+
File search tool call output message for OpenAI responses.
|
|
35
|
+
""" # noqa: E501
|
|
36
|
+
id: StrictStr
|
|
37
|
+
queries: List[StrictStr]
|
|
38
|
+
status: StrictStr
|
|
39
|
+
type: Optional[StrictStr] = None
|
|
40
|
+
results: Optional[List[OpenAIResponseOutputMessageFileSearchToolCallResults]] = None
|
|
41
|
+
__properties: ClassVar[list[str]] = ["id", "queries", "status", "type", "results"]
|
|
42
|
+
|
|
43
|
+
@field_validator('type')
|
|
44
|
+
def type_validate_enum(cls, value):
|
|
45
|
+
"""Validates the enum"""
|
|
46
|
+
if value is None:
|
|
47
|
+
return value
|
|
48
|
+
|
|
49
|
+
if value not in set(['file_search_call']):
|
|
50
|
+
raise ValueError("must be one of enum values ('file_search_call')")
|
|
51
|
+
return value
|
|
52
|
+
|
|
53
|
+
model_config = ConfigDict(
|
|
54
|
+
populate_by_name=True,
|
|
55
|
+
validate_assignment=True,
|
|
56
|
+
protected_namespaces=(),
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def __getattribute__(self, name):
|
|
62
|
+
"""Override to automatically unwrap OneOf/AnyOf instances."""
|
|
63
|
+
value = super().__getattribute__(name)
|
|
64
|
+
|
|
65
|
+
# Unwrap OneOf/AnyOf wrappers directly
|
|
66
|
+
if hasattr(value, 'actual_instance') and value.actual_instance is not None:
|
|
67
|
+
return value.actual_instance
|
|
68
|
+
|
|
69
|
+
# If the value is a dict, unwrap any OneOf instances in its values
|
|
70
|
+
if isinstance(value, dict):
|
|
71
|
+
unwrapped = {}
|
|
72
|
+
for k, v in value.items():
|
|
73
|
+
# Check if this is a OneOf wrapper with actual_instance
|
|
74
|
+
if hasattr(v, 'actual_instance') and v.actual_instance is not None:
|
|
75
|
+
unwrapped[k] = v.actual_instance
|
|
76
|
+
else:
|
|
77
|
+
unwrapped[k] = v
|
|
78
|
+
return unwrapped
|
|
79
|
+
|
|
80
|
+
return value
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def to_str(self) -> str:
|
|
85
|
+
"""Returns the string representation of the model using alias"""
|
|
86
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
87
|
+
|
|
88
|
+
def to_json(self) -> str:
|
|
89
|
+
"""Returns the JSON representation of the model using alias"""
|
|
90
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
91
|
+
return json.dumps(self.to_dict())
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
95
|
+
"""Create an instance of OpenAIResponseOutputMessageFileSearchToolCall from a JSON string"""
|
|
96
|
+
return cls.from_dict(json.loads(json_str))
|
|
97
|
+
|
|
98
|
+
def to_dict(self) -> dict[str, Any]:
|
|
99
|
+
"""Return the dictionary representation of the model using alias.
|
|
100
|
+
|
|
101
|
+
This has the following differences from calling pydantic's
|
|
102
|
+
`self.model_dump(by_alias=True)`:
|
|
103
|
+
|
|
104
|
+
* `None` is only added to the output dict for nullable fields that
|
|
105
|
+
were set at model initialization. Other fields with value `None`
|
|
106
|
+
are ignored.
|
|
107
|
+
"""
|
|
108
|
+
excluded_fields: set[str] = set([
|
|
109
|
+
])
|
|
110
|
+
|
|
111
|
+
_dict = self.model_dump(
|
|
112
|
+
by_alias=True,
|
|
113
|
+
exclude=excluded_fields,
|
|
114
|
+
exclude_none=True,
|
|
115
|
+
)
|
|
116
|
+
# override the default output from pydantic by calling `to_dict()` of each item in results (list)
|
|
117
|
+
_items = []
|
|
118
|
+
if self.results:
|
|
119
|
+
for _item_results in self.results:
|
|
120
|
+
if _item_results:
|
|
121
|
+
if hasattr(_item_results, 'to_dict'):
|
|
122
|
+
_items.append(_item_results.to_dict())
|
|
123
|
+
else:
|
|
124
|
+
_items.append(_item_results)
|
|
125
|
+
_dict['results'] = _items
|
|
126
|
+
# set to None if results (nullable) is None
|
|
127
|
+
# and model_fields_set contains the field
|
|
128
|
+
if self.results is None and "results" in self.model_fields_set:
|
|
129
|
+
_dict['results'] = None
|
|
130
|
+
|
|
131
|
+
return _dict
|
|
132
|
+
|
|
133
|
+
@classmethod
|
|
134
|
+
def from_dict(cls, obj: dict[str, Any] | None) -> Self | None:
|
|
135
|
+
"""Create an instance of OpenAIResponseOutputMessageFileSearchToolCall from a dict"""
|
|
136
|
+
if obj is None:
|
|
137
|
+
return None
|
|
138
|
+
|
|
139
|
+
if not isinstance(obj, dict):
|
|
140
|
+
return cls.model_validate(obj)
|
|
141
|
+
|
|
142
|
+
_obj = cls.model_validate({
|
|
143
|
+
k: v for k, v in {
|
|
144
|
+
"id": obj.get("id"),
|
|
145
|
+
"queries": obj.get("queries"),
|
|
146
|
+
"status": obj.get("status"),
|
|
147
|
+
"type": obj.get("type"),
|
|
148
|
+
"results": [OpenAIResponseOutputMessageFileSearchToolCallResults.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None,
|
|
149
|
+
}.items() if k in obj
|
|
150
|
+
})
|
|
151
|
+
return _obj
|
|
152
|
+
|
|
153
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
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 pprint
|
|
23
|
+
import re # noqa: F401
|
|
24
|
+
import json
|
|
25
|
+
|
|
26
|
+
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr
|
|
27
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
28
|
+
from typing import Any, ClassVar
|
|
29
|
+
from typing_extensions import Self
|
|
30
|
+
|
|
31
|
+
class OpenAIResponseOutputMessageFileSearchToolCallResults(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
Search results returned by the file search operation.
|
|
34
|
+
""" # noqa: E501
|
|
35
|
+
attributes: Dict[str, Any]
|
|
36
|
+
file_id: StrictStr
|
|
37
|
+
filename: StrictStr
|
|
38
|
+
score: Union[StrictFloat, StrictInt]
|
|
39
|
+
text: StrictStr
|
|
40
|
+
__properties: ClassVar[list[str]] = ["attributes", "file_id", "filename", "score", "text"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def __getattribute__(self, name):
|
|
51
|
+
"""Override to automatically unwrap OneOf/AnyOf instances."""
|
|
52
|
+
value = super().__getattribute__(name)
|
|
53
|
+
|
|
54
|
+
# Unwrap OneOf/AnyOf wrappers directly
|
|
55
|
+
if hasattr(value, 'actual_instance') and value.actual_instance is not None:
|
|
56
|
+
return value.actual_instance
|
|
57
|
+
|
|
58
|
+
# If the value is a dict, unwrap any OneOf instances in its values
|
|
59
|
+
if isinstance(value, dict):
|
|
60
|
+
unwrapped = {}
|
|
61
|
+
for k, v in value.items():
|
|
62
|
+
# Check if this is a OneOf wrapper with actual_instance
|
|
63
|
+
if hasattr(v, 'actual_instance') and v.actual_instance is not None:
|
|
64
|
+
unwrapped[k] = v.actual_instance
|
|
65
|
+
else:
|
|
66
|
+
unwrapped[k] = v
|
|
67
|
+
return unwrapped
|
|
68
|
+
|
|
69
|
+
return value
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def to_str(self) -> str:
|
|
74
|
+
"""Returns the string representation of the model using alias"""
|
|
75
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
76
|
+
|
|
77
|
+
def to_json(self) -> str:
|
|
78
|
+
"""Returns the JSON representation of the model using alias"""
|
|
79
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
80
|
+
return json.dumps(self.to_dict())
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
84
|
+
"""Create an instance of OpenAIResponseOutputMessageFileSearchToolCallResults from a JSON string"""
|
|
85
|
+
return cls.from_dict(json.loads(json_str))
|
|
86
|
+
|
|
87
|
+
def to_dict(self) -> dict[str, Any]:
|
|
88
|
+
"""Return the dictionary representation of the model using alias.
|
|
89
|
+
|
|
90
|
+
This has the following differences from calling pydantic's
|
|
91
|
+
`self.model_dump(by_alias=True)`:
|
|
92
|
+
|
|
93
|
+
* `None` is only added to the output dict for nullable fields that
|
|
94
|
+
were set at model initialization. Other fields with value `None`
|
|
95
|
+
are ignored.
|
|
96
|
+
"""
|
|
97
|
+
excluded_fields: set[str] = set([
|
|
98
|
+
])
|
|
99
|
+
|
|
100
|
+
_dict = self.model_dump(
|
|
101
|
+
by_alias=True,
|
|
102
|
+
exclude=excluded_fields,
|
|
103
|
+
exclude_none=True,
|
|
104
|
+
)
|
|
105
|
+
return _dict
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
def from_dict(cls, obj: dict[str, Any] | None) -> Self | None:
|
|
109
|
+
"""Create an instance of OpenAIResponseOutputMessageFileSearchToolCallResults from a dict"""
|
|
110
|
+
if obj is None:
|
|
111
|
+
return None
|
|
112
|
+
|
|
113
|
+
if not isinstance(obj, dict):
|
|
114
|
+
return cls.model_validate(obj)
|
|
115
|
+
|
|
116
|
+
_obj = cls.model_validate({
|
|
117
|
+
k: v for k, v in {
|
|
118
|
+
"attributes": obj.get("attributes"),
|
|
119
|
+
"file_id": obj.get("file_id"),
|
|
120
|
+
"filename": obj.get("filename"),
|
|
121
|
+
"score": obj.get("score"),
|
|
122
|
+
"text": obj.get("text"),
|
|
123
|
+
}.items() if k in obj
|
|
124
|
+
})
|
|
125
|
+
return _obj
|
|
126
|
+
|
|
127
|
+
|