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,1359 @@
|
|
|
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
|
+
import importlib
|
|
21
|
+
import json
|
|
22
|
+
import logging
|
|
23
|
+
import re
|
|
24
|
+
import sys
|
|
25
|
+
import warnings
|
|
26
|
+
|
|
27
|
+
from pydantic import validate_call, Field, SkipValidation, StrictFloat, StrictStr, StrictInt
|
|
28
|
+
from typing import Any
|
|
29
|
+
from typing_extensions import Annotated
|
|
30
|
+
|
|
31
|
+
from pydantic import Field, StrictInt, StrictStr, field_validator
|
|
32
|
+
from typing import List, Optional
|
|
33
|
+
from typing_extensions import Annotated
|
|
34
|
+
from ogx_client.models.add_items_request import AddItemsRequest
|
|
35
|
+
from ogx_client.models.conversation import Conversation
|
|
36
|
+
from ogx_client.models.conversation_item_include import ConversationItemInclude
|
|
37
|
+
from ogx_client.models.conversation_item_list import ConversationItemList
|
|
38
|
+
from ogx_client.models.response_retrieve_item_v1_conversations_conversation_id_items_item_id_get import ResponseRetrieveItemV1ConversationsConversationIdItemsItemIdGet
|
|
39
|
+
|
|
40
|
+
from ogx_client.api_client import ApiClient, RequestSerialized
|
|
41
|
+
from ogx_client.api_response import ApiResponse
|
|
42
|
+
from ogx_client.rest import RESTResponseType
|
|
43
|
+
from ogx_client.stream import Stream
|
|
44
|
+
from ogx_client.lib._utils import pascal_to_snake_case
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class ItemsApi:
|
|
48
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
49
|
+
Ref: https://openapi-generator.tech
|
|
50
|
+
|
|
51
|
+
Do not edit the class manually.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
def __init__(self, api_client=None) -> None:
|
|
55
|
+
if api_client is None:
|
|
56
|
+
api_client = ApiClient.get_default()
|
|
57
|
+
self.api_client = api_client
|
|
58
|
+
self.logger = logging.getLogger(ItemsApi.__name__)
|
|
59
|
+
|
|
60
|
+
# Child API attributes (set by OgxClient based on x-nesting-path)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _create_event_stream(self, response_data: RESTResponseType, stream_type_name: str) -> Stream[Any]:
|
|
64
|
+
"""Create a typed event stream from an SSE response.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
response_data: The raw HTTP response containing the SSE stream.
|
|
68
|
+
stream_type_name: The schema name for the streaming response type
|
|
69
|
+
(e.g., 'OpenAIChatCompletionChunk', 'OpenAIResponseObjectStream').
|
|
70
|
+
"""
|
|
71
|
+
# Import the stream type class once
|
|
72
|
+
stream_class = None
|
|
73
|
+
discriminator_map = None
|
|
74
|
+
discriminator_property = None
|
|
75
|
+
try:
|
|
76
|
+
module_name = pascal_to_snake_case(stream_type_name)
|
|
77
|
+
model_module = importlib.import_module('ogx_client.models.' + module_name)
|
|
78
|
+
stream_class = getattr(model_module, stream_type_name)
|
|
79
|
+
# Check if the stream type has a discriminator (e.g., oneOf with propertyName)
|
|
80
|
+
discriminator_map = getattr(stream_class, 'discriminator_value_class_map', None)
|
|
81
|
+
discriminator_property = getattr(stream_class, 'discriminator_property_name', None)
|
|
82
|
+
except (ImportError, ModuleNotFoundError, AttributeError) as e:
|
|
83
|
+
self.logger.debug(f"Could not import stream type {stream_type_name}: {e}")
|
|
84
|
+
|
|
85
|
+
def stream_decoder(data_str: str) -> Any:
|
|
86
|
+
if not data_str:
|
|
87
|
+
return None
|
|
88
|
+
try:
|
|
89
|
+
data = json.loads(data_str)
|
|
90
|
+
except json.JSONDecodeError:
|
|
91
|
+
return data_str
|
|
92
|
+
|
|
93
|
+
# If we have a discriminator, resolve the specific variant class
|
|
94
|
+
if discriminator_map and discriminator_property:
|
|
95
|
+
disc_value = data.get(discriminator_property, '')
|
|
96
|
+
variant_class_name = discriminator_map.get(disc_value)
|
|
97
|
+
if variant_class_name:
|
|
98
|
+
try:
|
|
99
|
+
variant_module_name = pascal_to_snake_case(variant_class_name)
|
|
100
|
+
variant_module = importlib.import_module('ogx_client.models.' + variant_module_name)
|
|
101
|
+
variant_class = getattr(variant_module, variant_class_name)
|
|
102
|
+
return variant_class.from_dict(data)
|
|
103
|
+
except Exception as e:
|
|
104
|
+
self.logger.debug(f"Failed to deserialize as {variant_class_name}: {e}")
|
|
105
|
+
|
|
106
|
+
# Non-discriminated: deserialize as stream type directly
|
|
107
|
+
if stream_class is not None:
|
|
108
|
+
try:
|
|
109
|
+
result = stream_class.from_dict(data)
|
|
110
|
+
# Unwrap oneOf/anyOf wrappers
|
|
111
|
+
if hasattr(result, 'actual_instance') and result.actual_instance is not None:
|
|
112
|
+
return result.actual_instance
|
|
113
|
+
return result
|
|
114
|
+
except Exception as e:
|
|
115
|
+
self.logger.debug(f"Failed to deserialize as {stream_type_name}: {e}")
|
|
116
|
+
|
|
117
|
+
# Final fallback: return raw dict
|
|
118
|
+
return data
|
|
119
|
+
|
|
120
|
+
return Stream(
|
|
121
|
+
response=response_data.response,
|
|
122
|
+
client=self.api_client,
|
|
123
|
+
decoder=stream_decoder,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
@validate_call
|
|
128
|
+
def delete(
|
|
129
|
+
self,
|
|
130
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
131
|
+
item_id: Annotated[StrictStr, Field(description="The item identifier.")],
|
|
132
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
133
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
135
|
+
] | None = None,
|
|
136
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
137
|
+
_content_type: StrictStr | None = None,
|
|
138
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
139
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
140
|
+
) -> Conversation:
|
|
141
|
+
"""Delete an item.
|
|
142
|
+
|
|
143
|
+
Delete a conversation item.
|
|
144
|
+
|
|
145
|
+
:param conversation_id: The conversation identifier. (required)
|
|
146
|
+
:type conversation_id: str
|
|
147
|
+
:param item_id: The item identifier. (required)
|
|
148
|
+
:type item_id: str
|
|
149
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
150
|
+
number provided, it will be total request
|
|
151
|
+
timeout. It can also be a pair (tuple) of
|
|
152
|
+
(connection, read) timeouts.
|
|
153
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
154
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
155
|
+
request; this effectively ignores the
|
|
156
|
+
authentication in the spec for a single request.
|
|
157
|
+
:type _request_auth: dict, optional
|
|
158
|
+
:param _content_type: force content-type for the request.
|
|
159
|
+
:type _content_type: str, Optional
|
|
160
|
+
:param _headers: set to override the headers for a single
|
|
161
|
+
request; this effectively ignores the headers
|
|
162
|
+
in the spec for a single request.
|
|
163
|
+
:type _headers: dict, optional
|
|
164
|
+
:param _host_index: set to override the host_index for a single
|
|
165
|
+
request; this effectively ignores the host_index
|
|
166
|
+
in the spec for a single request.
|
|
167
|
+
:type _host_index: int, optional
|
|
168
|
+
:return: Returns the result object.
|
|
169
|
+
""" # noqa: E501
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
_param = self._delete_serialize(
|
|
173
|
+
conversation_id=conversation_id,
|
|
174
|
+
item_id=item_id,
|
|
175
|
+
_request_auth=_request_auth,
|
|
176
|
+
_content_type=_content_type,
|
|
177
|
+
_headers=_headers,
|
|
178
|
+
_host_index=_host_index
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
_response_types_map: dict[str, str | None] = {
|
|
182
|
+
'200': "Conversation",
|
|
183
|
+
'400': "Error",
|
|
184
|
+
'429': "Error",
|
|
185
|
+
'500': "Error",
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
response_data = self.api_client.call_api(
|
|
189
|
+
*_param,
|
|
190
|
+
_request_timeout=_request_timeout
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
response_data.read()
|
|
194
|
+
_deserialized = self.api_client.response_deserialize(
|
|
195
|
+
response_data=response_data,
|
|
196
|
+
response_types_map=_response_types_map,
|
|
197
|
+
).data
|
|
198
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
199
|
+
return _deserialized
|
|
200
|
+
|
|
201
|
+
@validate_call
|
|
202
|
+
def delete_with_http_info(
|
|
203
|
+
self,
|
|
204
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
205
|
+
item_id: Annotated[StrictStr, Field(description="The item identifier.")],
|
|
206
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
207
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
208
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
209
|
+
] | None = None,
|
|
210
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
211
|
+
_content_type: StrictStr | None = None,
|
|
212
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
213
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
214
|
+
) -> ApiResponse[Conversation]:
|
|
215
|
+
"""Delete an item.
|
|
216
|
+
|
|
217
|
+
Delete a conversation item.
|
|
218
|
+
|
|
219
|
+
:param conversation_id: The conversation identifier. (required)
|
|
220
|
+
:type conversation_id: str
|
|
221
|
+
:param item_id: The item identifier. (required)
|
|
222
|
+
:type item_id: str
|
|
223
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
224
|
+
number provided, it will be total request
|
|
225
|
+
timeout. It can also be a pair (tuple) of
|
|
226
|
+
(connection, read) timeouts.
|
|
227
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
228
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
229
|
+
request; this effectively ignores the
|
|
230
|
+
authentication in the spec for a single request.
|
|
231
|
+
:type _request_auth: dict, optional
|
|
232
|
+
:param _content_type: force content-type for the request.
|
|
233
|
+
:type _content_type: str, Optional
|
|
234
|
+
:param _headers: set to override the headers for a single
|
|
235
|
+
request; this effectively ignores the headers
|
|
236
|
+
in the spec for a single request.
|
|
237
|
+
:type _headers: dict, optional
|
|
238
|
+
:param _host_index: set to override the host_index for a single
|
|
239
|
+
request; this effectively ignores the host_index
|
|
240
|
+
in the spec for a single request.
|
|
241
|
+
:type _host_index: int, optional
|
|
242
|
+
:return: Returns the result object.
|
|
243
|
+
""" # noqa: E501
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
_param = self._delete_serialize(
|
|
247
|
+
conversation_id=conversation_id,
|
|
248
|
+
item_id=item_id,
|
|
249
|
+
_request_auth=_request_auth,
|
|
250
|
+
_content_type=_content_type,
|
|
251
|
+
_headers=_headers,
|
|
252
|
+
_host_index=_host_index
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
_response_types_map: dict[str, str | None] = {
|
|
256
|
+
'200': "Conversation",
|
|
257
|
+
'400': "Error",
|
|
258
|
+
'429': "Error",
|
|
259
|
+
'500': "Error",
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
response_data = self.api_client.call_api(
|
|
263
|
+
*_param,
|
|
264
|
+
_request_timeout=_request_timeout
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
response_data.read()
|
|
268
|
+
return self.api_client.response_deserialize(
|
|
269
|
+
response_data=response_data,
|
|
270
|
+
response_types_map=_response_types_map,
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
@validate_call
|
|
274
|
+
def delete_without_preload_content(
|
|
275
|
+
self,
|
|
276
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
277
|
+
item_id: Annotated[StrictStr, Field(description="The item identifier.")],
|
|
278
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
279
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
280
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
281
|
+
] | None = None,
|
|
282
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
283
|
+
_content_type: StrictStr | None = None,
|
|
284
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
285
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
286
|
+
) -> RESTResponseType:
|
|
287
|
+
"""Delete an item.
|
|
288
|
+
|
|
289
|
+
Delete a conversation item.
|
|
290
|
+
|
|
291
|
+
:param conversation_id: The conversation identifier. (required)
|
|
292
|
+
:type conversation_id: str
|
|
293
|
+
:param item_id: The item identifier. (required)
|
|
294
|
+
:type item_id: str
|
|
295
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
296
|
+
number provided, it will be total request
|
|
297
|
+
timeout. It can also be a pair (tuple) of
|
|
298
|
+
(connection, read) timeouts.
|
|
299
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
300
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
301
|
+
request; this effectively ignores the
|
|
302
|
+
authentication in the spec for a single request.
|
|
303
|
+
:type _request_auth: dict, optional
|
|
304
|
+
:param _content_type: force content-type for the request.
|
|
305
|
+
:type _content_type: str, Optional
|
|
306
|
+
:param _headers: set to override the headers for a single
|
|
307
|
+
request; this effectively ignores the headers
|
|
308
|
+
in the spec for a single request.
|
|
309
|
+
:type _headers: dict, optional
|
|
310
|
+
:param _host_index: set to override the host_index for a single
|
|
311
|
+
request; this effectively ignores the host_index
|
|
312
|
+
in the spec for a single request.
|
|
313
|
+
:type _host_index: int, optional
|
|
314
|
+
:return: Returns the result object.
|
|
315
|
+
""" # noqa: E501
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
_param = self._delete_serialize(
|
|
319
|
+
conversation_id=conversation_id,
|
|
320
|
+
item_id=item_id,
|
|
321
|
+
_request_auth=_request_auth,
|
|
322
|
+
_content_type=_content_type,
|
|
323
|
+
_headers=_headers,
|
|
324
|
+
_host_index=_host_index
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
_response_types_map: dict[str, str | None] = {
|
|
328
|
+
'200': "Conversation",
|
|
329
|
+
'400': "Error",
|
|
330
|
+
'429': "Error",
|
|
331
|
+
'500': "Error",
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
response_data = self.api_client.call_api(
|
|
335
|
+
*_param,
|
|
336
|
+
_request_timeout=_request_timeout
|
|
337
|
+
)
|
|
338
|
+
return response_data.response
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
def _delete_serialize(
|
|
342
|
+
self,
|
|
343
|
+
conversation_id,
|
|
344
|
+
item_id,
|
|
345
|
+
_request_auth,
|
|
346
|
+
_content_type,
|
|
347
|
+
_headers,
|
|
348
|
+
_host_index,
|
|
349
|
+
) -> RequestSerialized:
|
|
350
|
+
|
|
351
|
+
_host = None
|
|
352
|
+
|
|
353
|
+
_collection_formats: dict[str, str] = {
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
_path_params: dict[str, str] = {}
|
|
357
|
+
_query_params: list[tuple[str, str]] = []
|
|
358
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
359
|
+
_form_params: list[tuple[str, str]] = []
|
|
360
|
+
_files: dict[
|
|
361
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
362
|
+
] = {}
|
|
363
|
+
_body_params: bytes | None = None
|
|
364
|
+
|
|
365
|
+
# process the path parameters
|
|
366
|
+
if conversation_id is not None:
|
|
367
|
+
_path_params['conversation_id'] = conversation_id
|
|
368
|
+
if item_id is not None:
|
|
369
|
+
_path_params['item_id'] = item_id
|
|
370
|
+
# process the query parameters
|
|
371
|
+
# process the header parameters
|
|
372
|
+
# process the form parameters
|
|
373
|
+
# process the body parameter
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
# set the HTTP header `Accept`
|
|
377
|
+
if 'Accept' not in _header_params:
|
|
378
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
379
|
+
[
|
|
380
|
+
'application/json'
|
|
381
|
+
]
|
|
382
|
+
)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
# authentication setting
|
|
386
|
+
_auth_settings: list[str] = [
|
|
387
|
+
]
|
|
388
|
+
|
|
389
|
+
return self.api_client.param_serialize(
|
|
390
|
+
method='DELETE',
|
|
391
|
+
resource_path='/v1/conversations/{conversation_id}/items/{item_id}',
|
|
392
|
+
path_params=_path_params,
|
|
393
|
+
query_params=_query_params,
|
|
394
|
+
header_params=_header_params,
|
|
395
|
+
body=_body_params,
|
|
396
|
+
post_params=_form_params,
|
|
397
|
+
files=_files,
|
|
398
|
+
auth_settings=_auth_settings,
|
|
399
|
+
collection_formats=_collection_formats,
|
|
400
|
+
_host=_host,
|
|
401
|
+
_request_auth=_request_auth
|
|
402
|
+
)
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
@validate_call
|
|
407
|
+
def get(
|
|
408
|
+
self,
|
|
409
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
410
|
+
item_id: Annotated[StrictStr, Field(description="The item identifier.")],
|
|
411
|
+
include: Optional[List[ConversationItemInclude]] = None,
|
|
412
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
413
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
414
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
415
|
+
] | None = None,
|
|
416
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
417
|
+
_content_type: StrictStr | None = None,
|
|
418
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
419
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
420
|
+
) -> ResponseRetrieveItemV1ConversationsConversationIdItemsItemIdGet:
|
|
421
|
+
"""Retrieve an item.
|
|
422
|
+
|
|
423
|
+
Retrieve a conversation item.
|
|
424
|
+
|
|
425
|
+
:param conversation_id: The conversation identifier. (required)
|
|
426
|
+
:type conversation_id: str
|
|
427
|
+
:param item_id: The item identifier. (required)
|
|
428
|
+
:type item_id: str
|
|
429
|
+
:param include:
|
|
430
|
+
:type include: List[ConversationItemInclude]
|
|
431
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
432
|
+
number provided, it will be total request
|
|
433
|
+
timeout. It can also be a pair (tuple) of
|
|
434
|
+
(connection, read) timeouts.
|
|
435
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
436
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
437
|
+
request; this effectively ignores the
|
|
438
|
+
authentication in the spec for a single request.
|
|
439
|
+
:type _request_auth: dict, optional
|
|
440
|
+
:param _content_type: force content-type for the request.
|
|
441
|
+
:type _content_type: str, Optional
|
|
442
|
+
:param _headers: set to override the headers for a single
|
|
443
|
+
request; this effectively ignores the headers
|
|
444
|
+
in the spec for a single request.
|
|
445
|
+
:type _headers: dict, optional
|
|
446
|
+
:param _host_index: set to override the host_index for a single
|
|
447
|
+
request; this effectively ignores the host_index
|
|
448
|
+
in the spec for a single request.
|
|
449
|
+
:type _host_index: int, optional
|
|
450
|
+
:return: Returns the result object.
|
|
451
|
+
""" # noqa: E501
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
_param = self._get_serialize(
|
|
455
|
+
conversation_id=conversation_id,
|
|
456
|
+
item_id=item_id,
|
|
457
|
+
include=include,
|
|
458
|
+
_request_auth=_request_auth,
|
|
459
|
+
_content_type=_content_type,
|
|
460
|
+
_headers=_headers,
|
|
461
|
+
_host_index=_host_index
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
_response_types_map: dict[str, str | None] = {
|
|
465
|
+
'200': "ResponseRetrieveItemV1ConversationsConversationIdItemsItemIdGet",
|
|
466
|
+
'400': "Error",
|
|
467
|
+
'429': "Error",
|
|
468
|
+
'500': "Error",
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
response_data = self.api_client.call_api(
|
|
472
|
+
*_param,
|
|
473
|
+
_request_timeout=_request_timeout
|
|
474
|
+
)
|
|
475
|
+
|
|
476
|
+
response_data.read()
|
|
477
|
+
_deserialized = self.api_client.response_deserialize(
|
|
478
|
+
response_data=response_data,
|
|
479
|
+
response_types_map=_response_types_map,
|
|
480
|
+
).data
|
|
481
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
482
|
+
return _deserialized
|
|
483
|
+
|
|
484
|
+
@validate_call
|
|
485
|
+
def get_with_http_info(
|
|
486
|
+
self,
|
|
487
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
488
|
+
item_id: Annotated[StrictStr, Field(description="The item identifier.")],
|
|
489
|
+
include: Optional[List[ConversationItemInclude]] = None,
|
|
490
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
491
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
492
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
493
|
+
] | None = None,
|
|
494
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
495
|
+
_content_type: StrictStr | None = None,
|
|
496
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
497
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
498
|
+
) -> ApiResponse[ResponseRetrieveItemV1ConversationsConversationIdItemsItemIdGet]:
|
|
499
|
+
"""Retrieve an item.
|
|
500
|
+
|
|
501
|
+
Retrieve a conversation item.
|
|
502
|
+
|
|
503
|
+
:param conversation_id: The conversation identifier. (required)
|
|
504
|
+
:type conversation_id: str
|
|
505
|
+
:param item_id: The item identifier. (required)
|
|
506
|
+
:type item_id: str
|
|
507
|
+
:param include:
|
|
508
|
+
:type include: List[ConversationItemInclude]
|
|
509
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
510
|
+
number provided, it will be total request
|
|
511
|
+
timeout. It can also be a pair (tuple) of
|
|
512
|
+
(connection, read) timeouts.
|
|
513
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
514
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
515
|
+
request; this effectively ignores the
|
|
516
|
+
authentication in the spec for a single request.
|
|
517
|
+
:type _request_auth: dict, optional
|
|
518
|
+
:param _content_type: force content-type for the request.
|
|
519
|
+
:type _content_type: str, Optional
|
|
520
|
+
:param _headers: set to override the headers for a single
|
|
521
|
+
request; this effectively ignores the headers
|
|
522
|
+
in the spec for a single request.
|
|
523
|
+
:type _headers: dict, optional
|
|
524
|
+
:param _host_index: set to override the host_index for a single
|
|
525
|
+
request; this effectively ignores the host_index
|
|
526
|
+
in the spec for a single request.
|
|
527
|
+
:type _host_index: int, optional
|
|
528
|
+
:return: Returns the result object.
|
|
529
|
+
""" # noqa: E501
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
_param = self._get_serialize(
|
|
533
|
+
conversation_id=conversation_id,
|
|
534
|
+
item_id=item_id,
|
|
535
|
+
include=include,
|
|
536
|
+
_request_auth=_request_auth,
|
|
537
|
+
_content_type=_content_type,
|
|
538
|
+
_headers=_headers,
|
|
539
|
+
_host_index=_host_index
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
_response_types_map: dict[str, str | None] = {
|
|
543
|
+
'200': "ResponseRetrieveItemV1ConversationsConversationIdItemsItemIdGet",
|
|
544
|
+
'400': "Error",
|
|
545
|
+
'429': "Error",
|
|
546
|
+
'500': "Error",
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
response_data = self.api_client.call_api(
|
|
550
|
+
*_param,
|
|
551
|
+
_request_timeout=_request_timeout
|
|
552
|
+
)
|
|
553
|
+
|
|
554
|
+
response_data.read()
|
|
555
|
+
return self.api_client.response_deserialize(
|
|
556
|
+
response_data=response_data,
|
|
557
|
+
response_types_map=_response_types_map,
|
|
558
|
+
)
|
|
559
|
+
|
|
560
|
+
@validate_call
|
|
561
|
+
def get_without_preload_content(
|
|
562
|
+
self,
|
|
563
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
564
|
+
item_id: Annotated[StrictStr, Field(description="The item identifier.")],
|
|
565
|
+
include: Optional[List[ConversationItemInclude]] = None,
|
|
566
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
567
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
568
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
569
|
+
] | None = None,
|
|
570
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
571
|
+
_content_type: StrictStr | None = None,
|
|
572
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
573
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
574
|
+
) -> RESTResponseType:
|
|
575
|
+
"""Retrieve an item.
|
|
576
|
+
|
|
577
|
+
Retrieve a conversation item.
|
|
578
|
+
|
|
579
|
+
:param conversation_id: The conversation identifier. (required)
|
|
580
|
+
:type conversation_id: str
|
|
581
|
+
:param item_id: The item identifier. (required)
|
|
582
|
+
:type item_id: str
|
|
583
|
+
:param include:
|
|
584
|
+
:type include: List[ConversationItemInclude]
|
|
585
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
586
|
+
number provided, it will be total request
|
|
587
|
+
timeout. It can also be a pair (tuple) of
|
|
588
|
+
(connection, read) timeouts.
|
|
589
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
590
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
591
|
+
request; this effectively ignores the
|
|
592
|
+
authentication in the spec for a single request.
|
|
593
|
+
:type _request_auth: dict, optional
|
|
594
|
+
:param _content_type: force content-type for the request.
|
|
595
|
+
:type _content_type: str, Optional
|
|
596
|
+
:param _headers: set to override the headers for a single
|
|
597
|
+
request; this effectively ignores the headers
|
|
598
|
+
in the spec for a single request.
|
|
599
|
+
:type _headers: dict, optional
|
|
600
|
+
:param _host_index: set to override the host_index for a single
|
|
601
|
+
request; this effectively ignores the host_index
|
|
602
|
+
in the spec for a single request.
|
|
603
|
+
:type _host_index: int, optional
|
|
604
|
+
:return: Returns the result object.
|
|
605
|
+
""" # noqa: E501
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
_param = self._get_serialize(
|
|
609
|
+
conversation_id=conversation_id,
|
|
610
|
+
item_id=item_id,
|
|
611
|
+
include=include,
|
|
612
|
+
_request_auth=_request_auth,
|
|
613
|
+
_content_type=_content_type,
|
|
614
|
+
_headers=_headers,
|
|
615
|
+
_host_index=_host_index
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
_response_types_map: dict[str, str | None] = {
|
|
619
|
+
'200': "ResponseRetrieveItemV1ConversationsConversationIdItemsItemIdGet",
|
|
620
|
+
'400': "Error",
|
|
621
|
+
'429': "Error",
|
|
622
|
+
'500': "Error",
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
response_data = self.api_client.call_api(
|
|
626
|
+
*_param,
|
|
627
|
+
_request_timeout=_request_timeout
|
|
628
|
+
)
|
|
629
|
+
return response_data.response
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
def _get_serialize(
|
|
633
|
+
self,
|
|
634
|
+
conversation_id,
|
|
635
|
+
item_id,
|
|
636
|
+
include,
|
|
637
|
+
_request_auth,
|
|
638
|
+
_content_type,
|
|
639
|
+
_headers,
|
|
640
|
+
_host_index,
|
|
641
|
+
) -> RequestSerialized:
|
|
642
|
+
|
|
643
|
+
_host = None
|
|
644
|
+
|
|
645
|
+
_collection_formats: dict[str, str] = {
|
|
646
|
+
'include': 'multi',
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
_path_params: dict[str, str] = {}
|
|
650
|
+
_query_params: list[tuple[str, str]] = []
|
|
651
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
652
|
+
_form_params: list[tuple[str, str]] = []
|
|
653
|
+
_files: dict[
|
|
654
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
655
|
+
] = {}
|
|
656
|
+
_body_params: bytes | None = None
|
|
657
|
+
|
|
658
|
+
# process the path parameters
|
|
659
|
+
if conversation_id is not None:
|
|
660
|
+
_path_params['conversation_id'] = conversation_id
|
|
661
|
+
if item_id is not None:
|
|
662
|
+
_path_params['item_id'] = item_id
|
|
663
|
+
# process the query parameters
|
|
664
|
+
if include is not None:
|
|
665
|
+
|
|
666
|
+
_query_params.append(('include', include))
|
|
667
|
+
|
|
668
|
+
# process the header parameters
|
|
669
|
+
# process the form parameters
|
|
670
|
+
# process the body parameter
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
# set the HTTP header `Accept`
|
|
674
|
+
if 'Accept' not in _header_params:
|
|
675
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
676
|
+
[
|
|
677
|
+
'application/json'
|
|
678
|
+
]
|
|
679
|
+
)
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
# authentication setting
|
|
683
|
+
_auth_settings: list[str] = [
|
|
684
|
+
]
|
|
685
|
+
|
|
686
|
+
return self.api_client.param_serialize(
|
|
687
|
+
method='GET',
|
|
688
|
+
resource_path='/v1/conversations/{conversation_id}/items/{item_id}',
|
|
689
|
+
path_params=_path_params,
|
|
690
|
+
query_params=_query_params,
|
|
691
|
+
header_params=_header_params,
|
|
692
|
+
body=_body_params,
|
|
693
|
+
post_params=_form_params,
|
|
694
|
+
files=_files,
|
|
695
|
+
auth_settings=_auth_settings,
|
|
696
|
+
collection_formats=_collection_formats,
|
|
697
|
+
_host=_host,
|
|
698
|
+
_request_auth=_request_auth
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
@validate_call
|
|
704
|
+
def list(
|
|
705
|
+
self,
|
|
706
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
707
|
+
after: Optional[StrictStr] = None,
|
|
708
|
+
include: Optional[List[ConversationItemInclude]] = None,
|
|
709
|
+
limit: Optional[StrictInt] = None,
|
|
710
|
+
order: Optional[StrictStr] = None,
|
|
711
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
712
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
713
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
714
|
+
] | None = None,
|
|
715
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
716
|
+
_content_type: StrictStr | None = None,
|
|
717
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
718
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
719
|
+
) -> ConversationItemList:
|
|
720
|
+
"""List items.
|
|
721
|
+
|
|
722
|
+
List items in the conversation.
|
|
723
|
+
|
|
724
|
+
:param conversation_id: The conversation identifier. (required)
|
|
725
|
+
:type conversation_id: str
|
|
726
|
+
:param after:
|
|
727
|
+
:type after: str
|
|
728
|
+
:param include:
|
|
729
|
+
:type include: List[ConversationItemInclude]
|
|
730
|
+
:param limit:
|
|
731
|
+
:type limit: int
|
|
732
|
+
:param order:
|
|
733
|
+
:type order: str
|
|
734
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
735
|
+
number provided, it will be total request
|
|
736
|
+
timeout. It can also be a pair (tuple) of
|
|
737
|
+
(connection, read) timeouts.
|
|
738
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
739
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
740
|
+
request; this effectively ignores the
|
|
741
|
+
authentication in the spec for a single request.
|
|
742
|
+
:type _request_auth: dict, optional
|
|
743
|
+
:param _content_type: force content-type for the request.
|
|
744
|
+
:type _content_type: str, Optional
|
|
745
|
+
:param _headers: set to override the headers for a single
|
|
746
|
+
request; this effectively ignores the headers
|
|
747
|
+
in the spec for a single request.
|
|
748
|
+
:type _headers: dict, optional
|
|
749
|
+
:param _host_index: set to override the host_index for a single
|
|
750
|
+
request; this effectively ignores the host_index
|
|
751
|
+
in the spec for a single request.
|
|
752
|
+
:type _host_index: int, optional
|
|
753
|
+
:return: Returns the result object.
|
|
754
|
+
""" # noqa: E501
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
_param = self._list_serialize(
|
|
758
|
+
conversation_id=conversation_id,
|
|
759
|
+
after=after,
|
|
760
|
+
include=include,
|
|
761
|
+
limit=limit,
|
|
762
|
+
order=order,
|
|
763
|
+
_request_auth=_request_auth,
|
|
764
|
+
_content_type=_content_type,
|
|
765
|
+
_headers=_headers,
|
|
766
|
+
_host_index=_host_index
|
|
767
|
+
)
|
|
768
|
+
|
|
769
|
+
_response_types_map: dict[str, str | None] = {
|
|
770
|
+
'200': "ConversationItemList",
|
|
771
|
+
'400': "Error",
|
|
772
|
+
'429': "Error",
|
|
773
|
+
'500': "Error",
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
response_data = self.api_client.call_api(
|
|
777
|
+
*_param,
|
|
778
|
+
_request_timeout=_request_timeout
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
response_data.read()
|
|
782
|
+
_deserialized = self.api_client.response_deserialize(
|
|
783
|
+
response_data=response_data,
|
|
784
|
+
response_types_map=_response_types_map,
|
|
785
|
+
).data
|
|
786
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
787
|
+
return _deserialized
|
|
788
|
+
|
|
789
|
+
@validate_call
|
|
790
|
+
def list_with_http_info(
|
|
791
|
+
self,
|
|
792
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
793
|
+
after: Optional[StrictStr] = None,
|
|
794
|
+
include: Optional[List[ConversationItemInclude]] = None,
|
|
795
|
+
limit: Optional[StrictInt] = None,
|
|
796
|
+
order: Optional[StrictStr] = None,
|
|
797
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
798
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
799
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
800
|
+
] | None = None,
|
|
801
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
802
|
+
_content_type: StrictStr | None = None,
|
|
803
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
804
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
805
|
+
) -> ApiResponse[ConversationItemList]:
|
|
806
|
+
"""List items.
|
|
807
|
+
|
|
808
|
+
List items in the conversation.
|
|
809
|
+
|
|
810
|
+
:param conversation_id: The conversation identifier. (required)
|
|
811
|
+
:type conversation_id: str
|
|
812
|
+
:param after:
|
|
813
|
+
:type after: str
|
|
814
|
+
:param include:
|
|
815
|
+
:type include: List[ConversationItemInclude]
|
|
816
|
+
:param limit:
|
|
817
|
+
:type limit: int
|
|
818
|
+
:param order:
|
|
819
|
+
:type order: str
|
|
820
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
821
|
+
number provided, it will be total request
|
|
822
|
+
timeout. It can also be a pair (tuple) of
|
|
823
|
+
(connection, read) timeouts.
|
|
824
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
825
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
826
|
+
request; this effectively ignores the
|
|
827
|
+
authentication in the spec for a single request.
|
|
828
|
+
:type _request_auth: dict, optional
|
|
829
|
+
:param _content_type: force content-type for the request.
|
|
830
|
+
:type _content_type: str, Optional
|
|
831
|
+
:param _headers: set to override the headers for a single
|
|
832
|
+
request; this effectively ignores the headers
|
|
833
|
+
in the spec for a single request.
|
|
834
|
+
:type _headers: dict, optional
|
|
835
|
+
:param _host_index: set to override the host_index for a single
|
|
836
|
+
request; this effectively ignores the host_index
|
|
837
|
+
in the spec for a single request.
|
|
838
|
+
:type _host_index: int, optional
|
|
839
|
+
:return: Returns the result object.
|
|
840
|
+
""" # noqa: E501
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
_param = self._list_serialize(
|
|
844
|
+
conversation_id=conversation_id,
|
|
845
|
+
after=after,
|
|
846
|
+
include=include,
|
|
847
|
+
limit=limit,
|
|
848
|
+
order=order,
|
|
849
|
+
_request_auth=_request_auth,
|
|
850
|
+
_content_type=_content_type,
|
|
851
|
+
_headers=_headers,
|
|
852
|
+
_host_index=_host_index
|
|
853
|
+
)
|
|
854
|
+
|
|
855
|
+
_response_types_map: dict[str, str | None] = {
|
|
856
|
+
'200': "ConversationItemList",
|
|
857
|
+
'400': "Error",
|
|
858
|
+
'429': "Error",
|
|
859
|
+
'500': "Error",
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
response_data = self.api_client.call_api(
|
|
863
|
+
*_param,
|
|
864
|
+
_request_timeout=_request_timeout
|
|
865
|
+
)
|
|
866
|
+
|
|
867
|
+
response_data.read()
|
|
868
|
+
return self.api_client.response_deserialize(
|
|
869
|
+
response_data=response_data,
|
|
870
|
+
response_types_map=_response_types_map,
|
|
871
|
+
)
|
|
872
|
+
|
|
873
|
+
@validate_call
|
|
874
|
+
def list_without_preload_content(
|
|
875
|
+
self,
|
|
876
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
877
|
+
after: Optional[StrictStr] = None,
|
|
878
|
+
include: Optional[List[ConversationItemInclude]] = None,
|
|
879
|
+
limit: Optional[StrictInt] = None,
|
|
880
|
+
order: Optional[StrictStr] = None,
|
|
881
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
882
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
883
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
884
|
+
] | None = None,
|
|
885
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
886
|
+
_content_type: StrictStr | None = None,
|
|
887
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
888
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
889
|
+
) -> RESTResponseType:
|
|
890
|
+
"""List items.
|
|
891
|
+
|
|
892
|
+
List items in the conversation.
|
|
893
|
+
|
|
894
|
+
:param conversation_id: The conversation identifier. (required)
|
|
895
|
+
:type conversation_id: str
|
|
896
|
+
:param after:
|
|
897
|
+
:type after: str
|
|
898
|
+
:param include:
|
|
899
|
+
:type include: List[ConversationItemInclude]
|
|
900
|
+
:param limit:
|
|
901
|
+
:type limit: int
|
|
902
|
+
:param order:
|
|
903
|
+
:type order: str
|
|
904
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
905
|
+
number provided, it will be total request
|
|
906
|
+
timeout. It can also be a pair (tuple) of
|
|
907
|
+
(connection, read) timeouts.
|
|
908
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
909
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
910
|
+
request; this effectively ignores the
|
|
911
|
+
authentication in the spec for a single request.
|
|
912
|
+
:type _request_auth: dict, optional
|
|
913
|
+
:param _content_type: force content-type for the request.
|
|
914
|
+
:type _content_type: str, Optional
|
|
915
|
+
:param _headers: set to override the headers for a single
|
|
916
|
+
request; this effectively ignores the headers
|
|
917
|
+
in the spec for a single request.
|
|
918
|
+
:type _headers: dict, optional
|
|
919
|
+
:param _host_index: set to override the host_index for a single
|
|
920
|
+
request; this effectively ignores the host_index
|
|
921
|
+
in the spec for a single request.
|
|
922
|
+
:type _host_index: int, optional
|
|
923
|
+
:return: Returns the result object.
|
|
924
|
+
""" # noqa: E501
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
_param = self._list_serialize(
|
|
928
|
+
conversation_id=conversation_id,
|
|
929
|
+
after=after,
|
|
930
|
+
include=include,
|
|
931
|
+
limit=limit,
|
|
932
|
+
order=order,
|
|
933
|
+
_request_auth=_request_auth,
|
|
934
|
+
_content_type=_content_type,
|
|
935
|
+
_headers=_headers,
|
|
936
|
+
_host_index=_host_index
|
|
937
|
+
)
|
|
938
|
+
|
|
939
|
+
_response_types_map: dict[str, str | None] = {
|
|
940
|
+
'200': "ConversationItemList",
|
|
941
|
+
'400': "Error",
|
|
942
|
+
'429': "Error",
|
|
943
|
+
'500': "Error",
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
response_data = self.api_client.call_api(
|
|
947
|
+
*_param,
|
|
948
|
+
_request_timeout=_request_timeout
|
|
949
|
+
)
|
|
950
|
+
return response_data.response
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
def _list_serialize(
|
|
954
|
+
self,
|
|
955
|
+
conversation_id,
|
|
956
|
+
after,
|
|
957
|
+
include,
|
|
958
|
+
limit,
|
|
959
|
+
order,
|
|
960
|
+
_request_auth,
|
|
961
|
+
_content_type,
|
|
962
|
+
_headers,
|
|
963
|
+
_host_index,
|
|
964
|
+
) -> RequestSerialized:
|
|
965
|
+
|
|
966
|
+
_host = None
|
|
967
|
+
|
|
968
|
+
_collection_formats: dict[str, str] = {
|
|
969
|
+
'include': 'multi',
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
_path_params: dict[str, str] = {}
|
|
973
|
+
_query_params: list[tuple[str, str]] = []
|
|
974
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
975
|
+
_form_params: list[tuple[str, str]] = []
|
|
976
|
+
_files: dict[
|
|
977
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
978
|
+
] = {}
|
|
979
|
+
_body_params: bytes | None = None
|
|
980
|
+
|
|
981
|
+
# process the path parameters
|
|
982
|
+
if conversation_id is not None:
|
|
983
|
+
_path_params['conversation_id'] = conversation_id
|
|
984
|
+
# process the query parameters
|
|
985
|
+
if after is not None:
|
|
986
|
+
|
|
987
|
+
_query_params.append(('after', after))
|
|
988
|
+
|
|
989
|
+
if include is not None:
|
|
990
|
+
|
|
991
|
+
_query_params.append(('include', include))
|
|
992
|
+
|
|
993
|
+
if limit is not None:
|
|
994
|
+
|
|
995
|
+
_query_params.append(('limit', limit))
|
|
996
|
+
|
|
997
|
+
if order is not None:
|
|
998
|
+
|
|
999
|
+
_query_params.append(('order', order))
|
|
1000
|
+
|
|
1001
|
+
# process the header parameters
|
|
1002
|
+
# process the form parameters
|
|
1003
|
+
# process the body parameter
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
# set the HTTP header `Accept`
|
|
1007
|
+
if 'Accept' not in _header_params:
|
|
1008
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1009
|
+
[
|
|
1010
|
+
'application/json'
|
|
1011
|
+
]
|
|
1012
|
+
)
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
# authentication setting
|
|
1016
|
+
_auth_settings: list[str] = [
|
|
1017
|
+
]
|
|
1018
|
+
|
|
1019
|
+
return self.api_client.param_serialize(
|
|
1020
|
+
method='GET',
|
|
1021
|
+
resource_path='/v1/conversations/{conversation_id}/items',
|
|
1022
|
+
path_params=_path_params,
|
|
1023
|
+
query_params=_query_params,
|
|
1024
|
+
header_params=_header_params,
|
|
1025
|
+
body=_body_params,
|
|
1026
|
+
post_params=_form_params,
|
|
1027
|
+
files=_files,
|
|
1028
|
+
auth_settings=_auth_settings,
|
|
1029
|
+
collection_formats=_collection_formats,
|
|
1030
|
+
_host=_host,
|
|
1031
|
+
_request_auth=_request_auth
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
@validate_call
|
|
1037
|
+
def create(
|
|
1038
|
+
self,
|
|
1039
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
1040
|
+
add_items_request: AddItemsRequest | None = None,
|
|
1041
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1042
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1043
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1044
|
+
] | None = None,
|
|
1045
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1046
|
+
_content_type: StrictStr | None = None,
|
|
1047
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1048
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1049
|
+
**kwargs: Any
|
|
1050
|
+
) -> ConversationItemList:
|
|
1051
|
+
"""Create items.
|
|
1052
|
+
|
|
1053
|
+
Create items in the conversation.
|
|
1054
|
+
|
|
1055
|
+
:param conversation_id: The conversation identifier. (required)
|
|
1056
|
+
:type conversation_id: str
|
|
1057
|
+
:param add_items_request: (required)
|
|
1058
|
+
:type add_items_request: AddItemsRequest
|
|
1059
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1060
|
+
number provided, it will be total request
|
|
1061
|
+
timeout. It can also be a pair (tuple) of
|
|
1062
|
+
(connection, read) timeouts.
|
|
1063
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1064
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1065
|
+
request; this effectively ignores the
|
|
1066
|
+
authentication in the spec for a single request.
|
|
1067
|
+
:type _request_auth: dict, optional
|
|
1068
|
+
:param _content_type: force content-type for the request.
|
|
1069
|
+
:type _content_type: str, Optional
|
|
1070
|
+
:param _headers: set to override the headers for a single
|
|
1071
|
+
request; this effectively ignores the headers
|
|
1072
|
+
in the spec for a single request.
|
|
1073
|
+
:type _headers: dict, optional
|
|
1074
|
+
:param _host_index: set to override the host_index for a single
|
|
1075
|
+
request; this effectively ignores the host_index
|
|
1076
|
+
in the spec for a single request.
|
|
1077
|
+
:type _host_index: int, optional
|
|
1078
|
+
:return: Returns the result object.
|
|
1079
|
+
""" # noqa: E501
|
|
1080
|
+
|
|
1081
|
+
# If body param not provided, construct from kwargs
|
|
1082
|
+
if add_items_request is None and kwargs:
|
|
1083
|
+
try:
|
|
1084
|
+
# Try proper type conversion via from_json
|
|
1085
|
+
add_items_request = AddItemsRequest.from_json(json.dumps(kwargs))
|
|
1086
|
+
except Exception:
|
|
1087
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1088
|
+
# Server will still validate the final request
|
|
1089
|
+
add_items_request = AddItemsRequest.model_construct(**kwargs)
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
_param = self._create_serialize(
|
|
1093
|
+
conversation_id=conversation_id,
|
|
1094
|
+
add_items_request=add_items_request,
|
|
1095
|
+
_request_auth=_request_auth,
|
|
1096
|
+
_content_type=_content_type,
|
|
1097
|
+
_headers=_headers,
|
|
1098
|
+
_host_index=_host_index
|
|
1099
|
+
)
|
|
1100
|
+
|
|
1101
|
+
_response_types_map: dict[str, str | None] = {
|
|
1102
|
+
'200': "ConversationItemList",
|
|
1103
|
+
'400': "Error",
|
|
1104
|
+
'429': "Error",
|
|
1105
|
+
'500': "Error",
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
response_data = self.api_client.call_api(
|
|
1109
|
+
*_param,
|
|
1110
|
+
_request_timeout=_request_timeout
|
|
1111
|
+
)
|
|
1112
|
+
|
|
1113
|
+
response_data.read()
|
|
1114
|
+
_deserialized = self.api_client.response_deserialize(
|
|
1115
|
+
response_data=response_data,
|
|
1116
|
+
response_types_map=_response_types_map,
|
|
1117
|
+
).data
|
|
1118
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
1119
|
+
return _deserialized
|
|
1120
|
+
|
|
1121
|
+
@validate_call
|
|
1122
|
+
def create_with_http_info(
|
|
1123
|
+
self,
|
|
1124
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
1125
|
+
add_items_request: AddItemsRequest | None = None,
|
|
1126
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1128
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1129
|
+
] | None = None,
|
|
1130
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1131
|
+
_content_type: StrictStr | None = None,
|
|
1132
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1133
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1134
|
+
**kwargs: Any
|
|
1135
|
+
) -> ApiResponse[ConversationItemList]:
|
|
1136
|
+
"""Create items.
|
|
1137
|
+
|
|
1138
|
+
Create items in the conversation.
|
|
1139
|
+
|
|
1140
|
+
:param conversation_id: The conversation identifier. (required)
|
|
1141
|
+
:type conversation_id: str
|
|
1142
|
+
:param add_items_request: (required)
|
|
1143
|
+
:type add_items_request: AddItemsRequest
|
|
1144
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1145
|
+
number provided, it will be total request
|
|
1146
|
+
timeout. It can also be a pair (tuple) of
|
|
1147
|
+
(connection, read) timeouts.
|
|
1148
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1149
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1150
|
+
request; this effectively ignores the
|
|
1151
|
+
authentication in the spec for a single request.
|
|
1152
|
+
:type _request_auth: dict, optional
|
|
1153
|
+
:param _content_type: force content-type for the request.
|
|
1154
|
+
:type _content_type: str, Optional
|
|
1155
|
+
:param _headers: set to override the headers for a single
|
|
1156
|
+
request; this effectively ignores the headers
|
|
1157
|
+
in the spec for a single request.
|
|
1158
|
+
:type _headers: dict, optional
|
|
1159
|
+
:param _host_index: set to override the host_index for a single
|
|
1160
|
+
request; this effectively ignores the host_index
|
|
1161
|
+
in the spec for a single request.
|
|
1162
|
+
:type _host_index: int, optional
|
|
1163
|
+
:return: Returns the result object.
|
|
1164
|
+
""" # noqa: E501
|
|
1165
|
+
|
|
1166
|
+
# If body param not provided, construct from kwargs
|
|
1167
|
+
if add_items_request is None and kwargs:
|
|
1168
|
+
try:
|
|
1169
|
+
# Try proper type conversion via from_json
|
|
1170
|
+
add_items_request = AddItemsRequest.from_json(json.dumps(kwargs))
|
|
1171
|
+
except Exception:
|
|
1172
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1173
|
+
# Server will still validate the final request
|
|
1174
|
+
add_items_request = AddItemsRequest.model_construct(**kwargs)
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
_param = self._create_serialize(
|
|
1178
|
+
conversation_id=conversation_id,
|
|
1179
|
+
add_items_request=add_items_request,
|
|
1180
|
+
_request_auth=_request_auth,
|
|
1181
|
+
_content_type=_content_type,
|
|
1182
|
+
_headers=_headers,
|
|
1183
|
+
_host_index=_host_index
|
|
1184
|
+
)
|
|
1185
|
+
|
|
1186
|
+
_response_types_map: dict[str, str | None] = {
|
|
1187
|
+
'200': "ConversationItemList",
|
|
1188
|
+
'400': "Error",
|
|
1189
|
+
'429': "Error",
|
|
1190
|
+
'500': "Error",
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
response_data = self.api_client.call_api(
|
|
1194
|
+
*_param,
|
|
1195
|
+
_request_timeout=_request_timeout
|
|
1196
|
+
)
|
|
1197
|
+
|
|
1198
|
+
response_data.read()
|
|
1199
|
+
return self.api_client.response_deserialize(
|
|
1200
|
+
response_data=response_data,
|
|
1201
|
+
response_types_map=_response_types_map,
|
|
1202
|
+
)
|
|
1203
|
+
|
|
1204
|
+
@validate_call
|
|
1205
|
+
def create_without_preload_content(
|
|
1206
|
+
self,
|
|
1207
|
+
conversation_id: Annotated[StrictStr, Field(description="The conversation identifier.")],
|
|
1208
|
+
add_items_request: AddItemsRequest | None = None,
|
|
1209
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1211
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1212
|
+
] | None = None,
|
|
1213
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1214
|
+
_content_type: StrictStr | None = None,
|
|
1215
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1216
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1217
|
+
**kwargs: Any
|
|
1218
|
+
) -> RESTResponseType:
|
|
1219
|
+
"""Create items.
|
|
1220
|
+
|
|
1221
|
+
Create items in the conversation.
|
|
1222
|
+
|
|
1223
|
+
:param conversation_id: The conversation identifier. (required)
|
|
1224
|
+
:type conversation_id: str
|
|
1225
|
+
:param add_items_request: (required)
|
|
1226
|
+
:type add_items_request: AddItemsRequest
|
|
1227
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1228
|
+
number provided, it will be total request
|
|
1229
|
+
timeout. It can also be a pair (tuple) of
|
|
1230
|
+
(connection, read) timeouts.
|
|
1231
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1232
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1233
|
+
request; this effectively ignores the
|
|
1234
|
+
authentication in the spec for a single request.
|
|
1235
|
+
:type _request_auth: dict, optional
|
|
1236
|
+
:param _content_type: force content-type for the request.
|
|
1237
|
+
:type _content_type: str, Optional
|
|
1238
|
+
:param _headers: set to override the headers for a single
|
|
1239
|
+
request; this effectively ignores the headers
|
|
1240
|
+
in the spec for a single request.
|
|
1241
|
+
:type _headers: dict, optional
|
|
1242
|
+
:param _host_index: set to override the host_index for a single
|
|
1243
|
+
request; this effectively ignores the host_index
|
|
1244
|
+
in the spec for a single request.
|
|
1245
|
+
:type _host_index: int, optional
|
|
1246
|
+
:return: Returns the result object.
|
|
1247
|
+
""" # noqa: E501
|
|
1248
|
+
|
|
1249
|
+
# If body param not provided, construct from kwargs
|
|
1250
|
+
if add_items_request is None and kwargs:
|
|
1251
|
+
try:
|
|
1252
|
+
# Try proper type conversion via from_json
|
|
1253
|
+
add_items_request = AddItemsRequest.from_json(json.dumps(kwargs))
|
|
1254
|
+
except Exception:
|
|
1255
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1256
|
+
# Server will still validate the final request
|
|
1257
|
+
add_items_request = AddItemsRequest.model_construct(**kwargs)
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
_param = self._create_serialize(
|
|
1261
|
+
conversation_id=conversation_id,
|
|
1262
|
+
add_items_request=add_items_request,
|
|
1263
|
+
_request_auth=_request_auth,
|
|
1264
|
+
_content_type=_content_type,
|
|
1265
|
+
_headers=_headers,
|
|
1266
|
+
_host_index=_host_index
|
|
1267
|
+
)
|
|
1268
|
+
|
|
1269
|
+
_response_types_map: dict[str, str | None] = {
|
|
1270
|
+
'200': "ConversationItemList",
|
|
1271
|
+
'400': "Error",
|
|
1272
|
+
'429': "Error",
|
|
1273
|
+
'500': "Error",
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
response_data = self.api_client.call_api(
|
|
1277
|
+
*_param,
|
|
1278
|
+
_request_timeout=_request_timeout
|
|
1279
|
+
)
|
|
1280
|
+
return response_data.response
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
def _create_serialize(
|
|
1284
|
+
self,
|
|
1285
|
+
conversation_id,
|
|
1286
|
+
add_items_request,
|
|
1287
|
+
_request_auth,
|
|
1288
|
+
_content_type,
|
|
1289
|
+
_headers,
|
|
1290
|
+
_host_index,
|
|
1291
|
+
) -> RequestSerialized:
|
|
1292
|
+
|
|
1293
|
+
_host = None
|
|
1294
|
+
|
|
1295
|
+
_collection_formats: dict[str, str] = {
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
_path_params: dict[str, str] = {}
|
|
1299
|
+
_query_params: list[tuple[str, str]] = []
|
|
1300
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
1301
|
+
_form_params: list[tuple[str, str]] = []
|
|
1302
|
+
_files: dict[
|
|
1303
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
1304
|
+
] = {}
|
|
1305
|
+
_body_params: bytes | None = None
|
|
1306
|
+
|
|
1307
|
+
# process the path parameters
|
|
1308
|
+
if conversation_id is not None:
|
|
1309
|
+
_path_params['conversation_id'] = conversation_id
|
|
1310
|
+
# process the query parameters
|
|
1311
|
+
# process the header parameters
|
|
1312
|
+
# process the form parameters
|
|
1313
|
+
# process the body parameter
|
|
1314
|
+
if add_items_request is not None:
|
|
1315
|
+
_body_params = add_items_request
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
# set the HTTP header `Accept`
|
|
1319
|
+
if 'Accept' not in _header_params:
|
|
1320
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1321
|
+
[
|
|
1322
|
+
'application/json'
|
|
1323
|
+
]
|
|
1324
|
+
)
|
|
1325
|
+
|
|
1326
|
+
# set the HTTP header `Content-Type`
|
|
1327
|
+
if _content_type:
|
|
1328
|
+
_header_params['Content-Type'] = _content_type
|
|
1329
|
+
else:
|
|
1330
|
+
_default_content_type = (
|
|
1331
|
+
self.api_client.select_header_content_type(
|
|
1332
|
+
[
|
|
1333
|
+
'application/json'
|
|
1334
|
+
]
|
|
1335
|
+
)
|
|
1336
|
+
)
|
|
1337
|
+
if _default_content_type is not None:
|
|
1338
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1339
|
+
|
|
1340
|
+
# authentication setting
|
|
1341
|
+
_auth_settings: list[str] = [
|
|
1342
|
+
]
|
|
1343
|
+
|
|
1344
|
+
return self.api_client.param_serialize(
|
|
1345
|
+
method='POST',
|
|
1346
|
+
resource_path='/v1/conversations/{conversation_id}/items',
|
|
1347
|
+
path_params=_path_params,
|
|
1348
|
+
query_params=_query_params,
|
|
1349
|
+
header_params=_header_params,
|
|
1350
|
+
body=_body_params,
|
|
1351
|
+
post_params=_form_params,
|
|
1352
|
+
files=_files,
|
|
1353
|
+
auth_settings=_auth_settings,
|
|
1354
|
+
collection_formats=_collection_formats,
|
|
1355
|
+
_host=_host,
|
|
1356
|
+
_request_auth=_request_auth
|
|
1357
|
+
)
|
|
1358
|
+
|
|
1359
|
+
|