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,1936 @@
|
|
|
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, StrictStr
|
|
32
|
+
from typing import Optional
|
|
33
|
+
from typing_extensions import Annotated
|
|
34
|
+
from ogx_open_client.models.open_ai_create_vector_store_request_with_extra_body import OpenAICreateVectorStoreRequestWithExtraBody
|
|
35
|
+
from ogx_open_client.models.open_ai_search_vector_store_request import OpenAISearchVectorStoreRequest
|
|
36
|
+
from ogx_open_client.models.open_ai_update_vector_store_request import OpenAIUpdateVectorStoreRequest
|
|
37
|
+
from ogx_open_client.models.vector_store_delete_response import VectorStoreDeleteResponse
|
|
38
|
+
from ogx_open_client.models.vector_store_list_response import VectorStoreListResponse
|
|
39
|
+
from ogx_open_client.models.vector_store_object import VectorStoreObject
|
|
40
|
+
from ogx_open_client.models.vector_store_search_response_page import VectorStoreSearchResponsePage
|
|
41
|
+
|
|
42
|
+
from ogx_open_client.api_client import ApiClient, RequestSerialized
|
|
43
|
+
from ogx_open_client.api_response import ApiResponse
|
|
44
|
+
from ogx_open_client.rest import RESTResponseType
|
|
45
|
+
from ogx_open_client.stream import Stream
|
|
46
|
+
from ogx_open_client.lib._utils import pascal_to_snake_case
|
|
47
|
+
from ogx_open_client.api.file_batches_api import FileBatchesApi
|
|
48
|
+
from ogx_open_client.api.vector_stores_files_api import VectorStoresFilesApi
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class VectorStoresApi:
|
|
52
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
53
|
+
Ref: https://openapi-generator.tech
|
|
54
|
+
|
|
55
|
+
Do not edit the class manually.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
def __init__(self, api_client=None) -> None:
|
|
59
|
+
if api_client is None:
|
|
60
|
+
api_client = ApiClient.get_default()
|
|
61
|
+
self.api_client = api_client
|
|
62
|
+
self.vector_stores_files: Optional[VectorStoresFilesApi] = None
|
|
63
|
+
self.file_batches: Optional[FileBatchesApi] = None
|
|
64
|
+
self.logger = logging.getLogger(VectorStoresApi.__name__)
|
|
65
|
+
|
|
66
|
+
# Child API attributes (set by OgxClient based on x-nesting-path)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _create_event_stream(self, response_data: RESTResponseType, stream_type_name: str) -> Stream[Any]:
|
|
70
|
+
"""Create a typed event stream from an SSE response.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
response_data: The raw HTTP response containing the SSE stream.
|
|
74
|
+
stream_type_name: The schema name for the streaming response type
|
|
75
|
+
(e.g., 'OpenAIChatCompletionChunk', 'OpenAIResponseObjectStream').
|
|
76
|
+
"""
|
|
77
|
+
# Import the stream type class once
|
|
78
|
+
stream_class = None
|
|
79
|
+
discriminator_map = None
|
|
80
|
+
discriminator_property = None
|
|
81
|
+
try:
|
|
82
|
+
module_name = pascal_to_snake_case(stream_type_name)
|
|
83
|
+
model_module = importlib.import_module('ogx_open_client.models.' + module_name)
|
|
84
|
+
stream_class = getattr(model_module, stream_type_name)
|
|
85
|
+
# Check if the stream type has a discriminator (e.g., oneOf with propertyName)
|
|
86
|
+
discriminator_map = getattr(stream_class, 'discriminator_value_class_map', None)
|
|
87
|
+
discriminator_property = getattr(stream_class, 'discriminator_property_name', None)
|
|
88
|
+
except (ImportError, ModuleNotFoundError, AttributeError) as e:
|
|
89
|
+
self.logger.debug(f"Could not import stream type {stream_type_name}: {e}")
|
|
90
|
+
|
|
91
|
+
def stream_decoder(data_str: str) -> Any:
|
|
92
|
+
if not data_str:
|
|
93
|
+
return None
|
|
94
|
+
try:
|
|
95
|
+
data = json.loads(data_str)
|
|
96
|
+
except json.JSONDecodeError:
|
|
97
|
+
return data_str
|
|
98
|
+
|
|
99
|
+
# If we have a discriminator, resolve the specific variant class
|
|
100
|
+
if discriminator_map and discriminator_property:
|
|
101
|
+
disc_value = data.get(discriminator_property, '')
|
|
102
|
+
variant_class_name = discriminator_map.get(disc_value)
|
|
103
|
+
if variant_class_name:
|
|
104
|
+
try:
|
|
105
|
+
variant_module_name = pascal_to_snake_case(variant_class_name)
|
|
106
|
+
variant_module = importlib.import_module('ogx_open_client.models.' + variant_module_name)
|
|
107
|
+
variant_class = getattr(variant_module, variant_class_name)
|
|
108
|
+
return variant_class.from_dict(data)
|
|
109
|
+
except Exception as e:
|
|
110
|
+
self.logger.debug(f"Failed to deserialize as {variant_class_name}: {e}")
|
|
111
|
+
|
|
112
|
+
# Non-discriminated: deserialize as stream type directly
|
|
113
|
+
if stream_class is not None:
|
|
114
|
+
try:
|
|
115
|
+
result = stream_class.from_dict(data)
|
|
116
|
+
# Unwrap oneOf/anyOf wrappers
|
|
117
|
+
if hasattr(result, 'actual_instance') and result.actual_instance is not None:
|
|
118
|
+
return result.actual_instance
|
|
119
|
+
return result
|
|
120
|
+
except Exception as e:
|
|
121
|
+
self.logger.debug(f"Failed to deserialize as {stream_type_name}: {e}")
|
|
122
|
+
|
|
123
|
+
# Final fallback: return raw dict
|
|
124
|
+
return data
|
|
125
|
+
|
|
126
|
+
return Stream(
|
|
127
|
+
response=response_data.response,
|
|
128
|
+
client=self.api_client,
|
|
129
|
+
decoder=stream_decoder,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
@validate_call
|
|
134
|
+
def create(
|
|
135
|
+
self,
|
|
136
|
+
open_ai_create_vector_store_request_with_extra_body: OpenAICreateVectorStoreRequestWithExtraBody | None = None,
|
|
137
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
138
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
139
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
140
|
+
] | None = None,
|
|
141
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
142
|
+
_content_type: StrictStr | None = None,
|
|
143
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
144
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
145
|
+
**kwargs: Any
|
|
146
|
+
) -> VectorStoreObject:
|
|
147
|
+
"""Create a vector store (OpenAI-compatible).
|
|
148
|
+
|
|
149
|
+
Create a vector store (OpenAI-compatible).
|
|
150
|
+
|
|
151
|
+
:param open_ai_create_vector_store_request_with_extra_body: (required)
|
|
152
|
+
:type open_ai_create_vector_store_request_with_extra_body: OpenAICreateVectorStoreRequestWithExtraBody
|
|
153
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
154
|
+
number provided, it will be total request
|
|
155
|
+
timeout. It can also be a pair (tuple) of
|
|
156
|
+
(connection, read) timeouts.
|
|
157
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
158
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
159
|
+
request; this effectively ignores the
|
|
160
|
+
authentication in the spec for a single request.
|
|
161
|
+
:type _request_auth: dict, optional
|
|
162
|
+
:param _content_type: force content-type for the request.
|
|
163
|
+
:type _content_type: str, Optional
|
|
164
|
+
:param _headers: set to override the headers for a single
|
|
165
|
+
request; this effectively ignores the headers
|
|
166
|
+
in the spec for a single request.
|
|
167
|
+
:type _headers: dict, optional
|
|
168
|
+
:param _host_index: set to override the host_index for a single
|
|
169
|
+
request; this effectively ignores the host_index
|
|
170
|
+
in the spec for a single request.
|
|
171
|
+
:type _host_index: int, optional
|
|
172
|
+
:return: Returns the result object.
|
|
173
|
+
""" # noqa: E501
|
|
174
|
+
|
|
175
|
+
# If body param not provided, construct from kwargs
|
|
176
|
+
if open_ai_create_vector_store_request_with_extra_body is None and kwargs:
|
|
177
|
+
try:
|
|
178
|
+
# Try proper type conversion via from_json
|
|
179
|
+
open_ai_create_vector_store_request_with_extra_body = OpenAICreateVectorStoreRequestWithExtraBody.from_json(json.dumps(kwargs))
|
|
180
|
+
except Exception:
|
|
181
|
+
# Fall back to lenient construction for complex/flexible types
|
|
182
|
+
# Server will still validate the final request
|
|
183
|
+
open_ai_create_vector_store_request_with_extra_body = OpenAICreateVectorStoreRequestWithExtraBody.model_construct(**kwargs)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
_param = self._create_serialize(
|
|
187
|
+
open_ai_create_vector_store_request_with_extra_body=open_ai_create_vector_store_request_with_extra_body,
|
|
188
|
+
_request_auth=_request_auth,
|
|
189
|
+
_content_type=_content_type,
|
|
190
|
+
_headers=_headers,
|
|
191
|
+
_host_index=_host_index
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
_response_types_map: dict[str, str | None] = {
|
|
195
|
+
'200': "VectorStoreObject",
|
|
196
|
+
'400': "Error",
|
|
197
|
+
'429': "Error",
|
|
198
|
+
'500': "Error",
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
response_data = self.api_client.call_api(
|
|
202
|
+
*_param,
|
|
203
|
+
_request_timeout=_request_timeout
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
response_data.read()
|
|
207
|
+
_deserialized = self.api_client.response_deserialize(
|
|
208
|
+
response_data=response_data,
|
|
209
|
+
response_types_map=_response_types_map,
|
|
210
|
+
).data
|
|
211
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
212
|
+
return _deserialized
|
|
213
|
+
|
|
214
|
+
@validate_call
|
|
215
|
+
def create_with_http_info(
|
|
216
|
+
self,
|
|
217
|
+
open_ai_create_vector_store_request_with_extra_body: OpenAICreateVectorStoreRequestWithExtraBody | None = None,
|
|
218
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
219
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
220
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
221
|
+
] | None = None,
|
|
222
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
223
|
+
_content_type: StrictStr | None = None,
|
|
224
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
225
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
226
|
+
**kwargs: Any
|
|
227
|
+
) -> ApiResponse[VectorStoreObject]:
|
|
228
|
+
"""Create a vector store (OpenAI-compatible).
|
|
229
|
+
|
|
230
|
+
Create a vector store (OpenAI-compatible).
|
|
231
|
+
|
|
232
|
+
:param open_ai_create_vector_store_request_with_extra_body: (required)
|
|
233
|
+
:type open_ai_create_vector_store_request_with_extra_body: OpenAICreateVectorStoreRequestWithExtraBody
|
|
234
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
235
|
+
number provided, it will be total request
|
|
236
|
+
timeout. It can also be a pair (tuple) of
|
|
237
|
+
(connection, read) timeouts.
|
|
238
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
239
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
240
|
+
request; this effectively ignores the
|
|
241
|
+
authentication in the spec for a single request.
|
|
242
|
+
:type _request_auth: dict, optional
|
|
243
|
+
:param _content_type: force content-type for the request.
|
|
244
|
+
:type _content_type: str, Optional
|
|
245
|
+
:param _headers: set to override the headers for a single
|
|
246
|
+
request; this effectively ignores the headers
|
|
247
|
+
in the spec for a single request.
|
|
248
|
+
:type _headers: dict, optional
|
|
249
|
+
:param _host_index: set to override the host_index for a single
|
|
250
|
+
request; this effectively ignores the host_index
|
|
251
|
+
in the spec for a single request.
|
|
252
|
+
:type _host_index: int, optional
|
|
253
|
+
:return: Returns the result object.
|
|
254
|
+
""" # noqa: E501
|
|
255
|
+
|
|
256
|
+
# If body param not provided, construct from kwargs
|
|
257
|
+
if open_ai_create_vector_store_request_with_extra_body is None and kwargs:
|
|
258
|
+
try:
|
|
259
|
+
# Try proper type conversion via from_json
|
|
260
|
+
open_ai_create_vector_store_request_with_extra_body = OpenAICreateVectorStoreRequestWithExtraBody.from_json(json.dumps(kwargs))
|
|
261
|
+
except Exception:
|
|
262
|
+
# Fall back to lenient construction for complex/flexible types
|
|
263
|
+
# Server will still validate the final request
|
|
264
|
+
open_ai_create_vector_store_request_with_extra_body = OpenAICreateVectorStoreRequestWithExtraBody.model_construct(**kwargs)
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
_param = self._create_serialize(
|
|
268
|
+
open_ai_create_vector_store_request_with_extra_body=open_ai_create_vector_store_request_with_extra_body,
|
|
269
|
+
_request_auth=_request_auth,
|
|
270
|
+
_content_type=_content_type,
|
|
271
|
+
_headers=_headers,
|
|
272
|
+
_host_index=_host_index
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
_response_types_map: dict[str, str | None] = {
|
|
276
|
+
'200': "VectorStoreObject",
|
|
277
|
+
'400': "Error",
|
|
278
|
+
'429': "Error",
|
|
279
|
+
'500': "Error",
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
response_data = self.api_client.call_api(
|
|
283
|
+
*_param,
|
|
284
|
+
_request_timeout=_request_timeout
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
response_data.read()
|
|
288
|
+
return self.api_client.response_deserialize(
|
|
289
|
+
response_data=response_data,
|
|
290
|
+
response_types_map=_response_types_map,
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
@validate_call
|
|
294
|
+
def create_without_preload_content(
|
|
295
|
+
self,
|
|
296
|
+
open_ai_create_vector_store_request_with_extra_body: OpenAICreateVectorStoreRequestWithExtraBody | None = None,
|
|
297
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
298
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
299
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
300
|
+
] | None = None,
|
|
301
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
302
|
+
_content_type: StrictStr | None = None,
|
|
303
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
304
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
305
|
+
**kwargs: Any
|
|
306
|
+
) -> RESTResponseType:
|
|
307
|
+
"""Create a vector store (OpenAI-compatible).
|
|
308
|
+
|
|
309
|
+
Create a vector store (OpenAI-compatible).
|
|
310
|
+
|
|
311
|
+
:param open_ai_create_vector_store_request_with_extra_body: (required)
|
|
312
|
+
:type open_ai_create_vector_store_request_with_extra_body: OpenAICreateVectorStoreRequestWithExtraBody
|
|
313
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
314
|
+
number provided, it will be total request
|
|
315
|
+
timeout. It can also be a pair (tuple) of
|
|
316
|
+
(connection, read) timeouts.
|
|
317
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
318
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
319
|
+
request; this effectively ignores the
|
|
320
|
+
authentication in the spec for a single request.
|
|
321
|
+
:type _request_auth: dict, optional
|
|
322
|
+
:param _content_type: force content-type for the request.
|
|
323
|
+
:type _content_type: str, Optional
|
|
324
|
+
:param _headers: set to override the headers for a single
|
|
325
|
+
request; this effectively ignores the headers
|
|
326
|
+
in the spec for a single request.
|
|
327
|
+
:type _headers: dict, optional
|
|
328
|
+
:param _host_index: set to override the host_index for a single
|
|
329
|
+
request; this effectively ignores the host_index
|
|
330
|
+
in the spec for a single request.
|
|
331
|
+
:type _host_index: int, optional
|
|
332
|
+
:return: Returns the result object.
|
|
333
|
+
""" # noqa: E501
|
|
334
|
+
|
|
335
|
+
# If body param not provided, construct from kwargs
|
|
336
|
+
if open_ai_create_vector_store_request_with_extra_body is None and kwargs:
|
|
337
|
+
try:
|
|
338
|
+
# Try proper type conversion via from_json
|
|
339
|
+
open_ai_create_vector_store_request_with_extra_body = OpenAICreateVectorStoreRequestWithExtraBody.from_json(json.dumps(kwargs))
|
|
340
|
+
except Exception:
|
|
341
|
+
# Fall back to lenient construction for complex/flexible types
|
|
342
|
+
# Server will still validate the final request
|
|
343
|
+
open_ai_create_vector_store_request_with_extra_body = OpenAICreateVectorStoreRequestWithExtraBody.model_construct(**kwargs)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
_param = self._create_serialize(
|
|
347
|
+
open_ai_create_vector_store_request_with_extra_body=open_ai_create_vector_store_request_with_extra_body,
|
|
348
|
+
_request_auth=_request_auth,
|
|
349
|
+
_content_type=_content_type,
|
|
350
|
+
_headers=_headers,
|
|
351
|
+
_host_index=_host_index
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
_response_types_map: dict[str, str | None] = {
|
|
355
|
+
'200': "VectorStoreObject",
|
|
356
|
+
'400': "Error",
|
|
357
|
+
'429': "Error",
|
|
358
|
+
'500': "Error",
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
response_data = self.api_client.call_api(
|
|
362
|
+
*_param,
|
|
363
|
+
_request_timeout=_request_timeout
|
|
364
|
+
)
|
|
365
|
+
return response_data.response
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
def _create_serialize(
|
|
369
|
+
self,
|
|
370
|
+
open_ai_create_vector_store_request_with_extra_body,
|
|
371
|
+
_request_auth,
|
|
372
|
+
_content_type,
|
|
373
|
+
_headers,
|
|
374
|
+
_host_index,
|
|
375
|
+
) -> RequestSerialized:
|
|
376
|
+
|
|
377
|
+
_host = None
|
|
378
|
+
|
|
379
|
+
_collection_formats: dict[str, str] = {
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
_path_params: dict[str, str] = {}
|
|
383
|
+
_query_params: list[tuple[str, str]] = []
|
|
384
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
385
|
+
_form_params: list[tuple[str, str]] = []
|
|
386
|
+
_files: dict[
|
|
387
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
388
|
+
] = {}
|
|
389
|
+
_body_params: bytes | None = None
|
|
390
|
+
|
|
391
|
+
# process the path parameters
|
|
392
|
+
# process the query parameters
|
|
393
|
+
# process the header parameters
|
|
394
|
+
# process the form parameters
|
|
395
|
+
# process the body parameter
|
|
396
|
+
if open_ai_create_vector_store_request_with_extra_body is not None:
|
|
397
|
+
_body_params = open_ai_create_vector_store_request_with_extra_body
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
# set the HTTP header `Accept`
|
|
401
|
+
if 'Accept' not in _header_params:
|
|
402
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
403
|
+
[
|
|
404
|
+
'application/json'
|
|
405
|
+
]
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
# set the HTTP header `Content-Type`
|
|
409
|
+
if _content_type:
|
|
410
|
+
_header_params['Content-Type'] = _content_type
|
|
411
|
+
else:
|
|
412
|
+
_default_content_type = (
|
|
413
|
+
self.api_client.select_header_content_type(
|
|
414
|
+
[
|
|
415
|
+
'application/json'
|
|
416
|
+
]
|
|
417
|
+
)
|
|
418
|
+
)
|
|
419
|
+
if _default_content_type is not None:
|
|
420
|
+
_header_params['Content-Type'] = _default_content_type
|
|
421
|
+
|
|
422
|
+
# authentication setting
|
|
423
|
+
_auth_settings: list[str] = [
|
|
424
|
+
]
|
|
425
|
+
|
|
426
|
+
return self.api_client.param_serialize(
|
|
427
|
+
method='POST',
|
|
428
|
+
resource_path='/v1/vector_stores',
|
|
429
|
+
path_params=_path_params,
|
|
430
|
+
query_params=_query_params,
|
|
431
|
+
header_params=_header_params,
|
|
432
|
+
body=_body_params,
|
|
433
|
+
post_params=_form_params,
|
|
434
|
+
files=_files,
|
|
435
|
+
auth_settings=_auth_settings,
|
|
436
|
+
collection_formats=_collection_formats,
|
|
437
|
+
_host=_host,
|
|
438
|
+
_request_auth=_request_auth
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
@validate_call
|
|
444
|
+
def delete(
|
|
445
|
+
self,
|
|
446
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
447
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
448
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
449
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
450
|
+
] | None = None,
|
|
451
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
452
|
+
_content_type: StrictStr | None = None,
|
|
453
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
454
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
455
|
+
) -> VectorStoreDeleteResponse:
|
|
456
|
+
"""Delete a vector store (OpenAI-compatible).
|
|
457
|
+
|
|
458
|
+
Delete a vector store (OpenAI-compatible).
|
|
459
|
+
|
|
460
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
461
|
+
:type vector_store_id: str
|
|
462
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
463
|
+
number provided, it will be total request
|
|
464
|
+
timeout. It can also be a pair (tuple) of
|
|
465
|
+
(connection, read) timeouts.
|
|
466
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
467
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
468
|
+
request; this effectively ignores the
|
|
469
|
+
authentication in the spec for a single request.
|
|
470
|
+
:type _request_auth: dict, optional
|
|
471
|
+
:param _content_type: force content-type for the request.
|
|
472
|
+
:type _content_type: str, Optional
|
|
473
|
+
:param _headers: set to override the headers for a single
|
|
474
|
+
request; this effectively ignores the headers
|
|
475
|
+
in the spec for a single request.
|
|
476
|
+
:type _headers: dict, optional
|
|
477
|
+
:param _host_index: set to override the host_index for a single
|
|
478
|
+
request; this effectively ignores the host_index
|
|
479
|
+
in the spec for a single request.
|
|
480
|
+
:type _host_index: int, optional
|
|
481
|
+
:return: Returns the result object.
|
|
482
|
+
""" # noqa: E501
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
_param = self._delete_serialize(
|
|
486
|
+
vector_store_id=vector_store_id,
|
|
487
|
+
_request_auth=_request_auth,
|
|
488
|
+
_content_type=_content_type,
|
|
489
|
+
_headers=_headers,
|
|
490
|
+
_host_index=_host_index
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
_response_types_map: dict[str, str | None] = {
|
|
494
|
+
'200': "VectorStoreDeleteResponse",
|
|
495
|
+
'400': "Error",
|
|
496
|
+
'429': "Error",
|
|
497
|
+
'500': "Error",
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
response_data = self.api_client.call_api(
|
|
501
|
+
*_param,
|
|
502
|
+
_request_timeout=_request_timeout
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
response_data.read()
|
|
506
|
+
_deserialized = self.api_client.response_deserialize(
|
|
507
|
+
response_data=response_data,
|
|
508
|
+
response_types_map=_response_types_map,
|
|
509
|
+
).data
|
|
510
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
511
|
+
return _deserialized
|
|
512
|
+
|
|
513
|
+
@validate_call
|
|
514
|
+
def delete_with_http_info(
|
|
515
|
+
self,
|
|
516
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
517
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
518
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
519
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
520
|
+
] | None = None,
|
|
521
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
522
|
+
_content_type: StrictStr | None = None,
|
|
523
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
524
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
525
|
+
) -> ApiResponse[VectorStoreDeleteResponse]:
|
|
526
|
+
"""Delete a vector store (OpenAI-compatible).
|
|
527
|
+
|
|
528
|
+
Delete a vector store (OpenAI-compatible).
|
|
529
|
+
|
|
530
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
531
|
+
:type vector_store_id: str
|
|
532
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
533
|
+
number provided, it will be total request
|
|
534
|
+
timeout. It can also be a pair (tuple) of
|
|
535
|
+
(connection, read) timeouts.
|
|
536
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
537
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
538
|
+
request; this effectively ignores the
|
|
539
|
+
authentication in the spec for a single request.
|
|
540
|
+
:type _request_auth: dict, optional
|
|
541
|
+
:param _content_type: force content-type for the request.
|
|
542
|
+
:type _content_type: str, Optional
|
|
543
|
+
:param _headers: set to override the headers for a single
|
|
544
|
+
request; this effectively ignores the headers
|
|
545
|
+
in the spec for a single request.
|
|
546
|
+
:type _headers: dict, optional
|
|
547
|
+
:param _host_index: set to override the host_index for a single
|
|
548
|
+
request; this effectively ignores the host_index
|
|
549
|
+
in the spec for a single request.
|
|
550
|
+
:type _host_index: int, optional
|
|
551
|
+
:return: Returns the result object.
|
|
552
|
+
""" # noqa: E501
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
_param = self._delete_serialize(
|
|
556
|
+
vector_store_id=vector_store_id,
|
|
557
|
+
_request_auth=_request_auth,
|
|
558
|
+
_content_type=_content_type,
|
|
559
|
+
_headers=_headers,
|
|
560
|
+
_host_index=_host_index
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
_response_types_map: dict[str, str | None] = {
|
|
564
|
+
'200': "VectorStoreDeleteResponse",
|
|
565
|
+
'400': "Error",
|
|
566
|
+
'429': "Error",
|
|
567
|
+
'500': "Error",
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
response_data = self.api_client.call_api(
|
|
571
|
+
*_param,
|
|
572
|
+
_request_timeout=_request_timeout
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
response_data.read()
|
|
576
|
+
return self.api_client.response_deserialize(
|
|
577
|
+
response_data=response_data,
|
|
578
|
+
response_types_map=_response_types_map,
|
|
579
|
+
)
|
|
580
|
+
|
|
581
|
+
@validate_call
|
|
582
|
+
def delete_without_preload_content(
|
|
583
|
+
self,
|
|
584
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
585
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
586
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
587
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
588
|
+
] | None = None,
|
|
589
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
590
|
+
_content_type: StrictStr | None = None,
|
|
591
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
592
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
593
|
+
) -> RESTResponseType:
|
|
594
|
+
"""Delete a vector store (OpenAI-compatible).
|
|
595
|
+
|
|
596
|
+
Delete a vector store (OpenAI-compatible).
|
|
597
|
+
|
|
598
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
599
|
+
:type vector_store_id: str
|
|
600
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
601
|
+
number provided, it will be total request
|
|
602
|
+
timeout. It can also be a pair (tuple) of
|
|
603
|
+
(connection, read) timeouts.
|
|
604
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
605
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
606
|
+
request; this effectively ignores the
|
|
607
|
+
authentication in the spec for a single request.
|
|
608
|
+
:type _request_auth: dict, optional
|
|
609
|
+
:param _content_type: force content-type for the request.
|
|
610
|
+
:type _content_type: str, Optional
|
|
611
|
+
:param _headers: set to override the headers for a single
|
|
612
|
+
request; this effectively ignores the headers
|
|
613
|
+
in the spec for a single request.
|
|
614
|
+
:type _headers: dict, optional
|
|
615
|
+
:param _host_index: set to override the host_index for a single
|
|
616
|
+
request; this effectively ignores the host_index
|
|
617
|
+
in the spec for a single request.
|
|
618
|
+
:type _host_index: int, optional
|
|
619
|
+
:return: Returns the result object.
|
|
620
|
+
""" # noqa: E501
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
_param = self._delete_serialize(
|
|
624
|
+
vector_store_id=vector_store_id,
|
|
625
|
+
_request_auth=_request_auth,
|
|
626
|
+
_content_type=_content_type,
|
|
627
|
+
_headers=_headers,
|
|
628
|
+
_host_index=_host_index
|
|
629
|
+
)
|
|
630
|
+
|
|
631
|
+
_response_types_map: dict[str, str | None] = {
|
|
632
|
+
'200': "VectorStoreDeleteResponse",
|
|
633
|
+
'400': "Error",
|
|
634
|
+
'429': "Error",
|
|
635
|
+
'500': "Error",
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
response_data = self.api_client.call_api(
|
|
639
|
+
*_param,
|
|
640
|
+
_request_timeout=_request_timeout
|
|
641
|
+
)
|
|
642
|
+
return response_data.response
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
def _delete_serialize(
|
|
646
|
+
self,
|
|
647
|
+
vector_store_id,
|
|
648
|
+
_request_auth,
|
|
649
|
+
_content_type,
|
|
650
|
+
_headers,
|
|
651
|
+
_host_index,
|
|
652
|
+
) -> RequestSerialized:
|
|
653
|
+
|
|
654
|
+
_host = None
|
|
655
|
+
|
|
656
|
+
_collection_formats: dict[str, str] = {
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
_path_params: dict[str, str] = {}
|
|
660
|
+
_query_params: list[tuple[str, str]] = []
|
|
661
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
662
|
+
_form_params: list[tuple[str, str]] = []
|
|
663
|
+
_files: dict[
|
|
664
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
665
|
+
] = {}
|
|
666
|
+
_body_params: bytes | None = None
|
|
667
|
+
|
|
668
|
+
# process the path parameters
|
|
669
|
+
if vector_store_id is not None:
|
|
670
|
+
_path_params['vector_store_id'] = vector_store_id
|
|
671
|
+
# process the query parameters
|
|
672
|
+
# process the header parameters
|
|
673
|
+
# process the form parameters
|
|
674
|
+
# process the body parameter
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
# set the HTTP header `Accept`
|
|
678
|
+
if 'Accept' not in _header_params:
|
|
679
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
680
|
+
[
|
|
681
|
+
'application/json'
|
|
682
|
+
]
|
|
683
|
+
)
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
# authentication setting
|
|
687
|
+
_auth_settings: list[str] = [
|
|
688
|
+
]
|
|
689
|
+
|
|
690
|
+
return self.api_client.param_serialize(
|
|
691
|
+
method='DELETE',
|
|
692
|
+
resource_path='/v1/vector_stores/{vector_store_id}',
|
|
693
|
+
path_params=_path_params,
|
|
694
|
+
query_params=_query_params,
|
|
695
|
+
header_params=_header_params,
|
|
696
|
+
body=_body_params,
|
|
697
|
+
post_params=_form_params,
|
|
698
|
+
files=_files,
|
|
699
|
+
auth_settings=_auth_settings,
|
|
700
|
+
collection_formats=_collection_formats,
|
|
701
|
+
_host=_host,
|
|
702
|
+
_request_auth=_request_auth
|
|
703
|
+
)
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
@validate_call
|
|
708
|
+
def list(
|
|
709
|
+
self,
|
|
710
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of vector stores to return.")] = None,
|
|
711
|
+
order: Annotated[Optional[StrictStr], Field(description="Sort order by created_at: asc or desc.")] = None,
|
|
712
|
+
after: Annotated[Optional[StrictStr], Field(description="Pagination cursor (after).")] = None,
|
|
713
|
+
before: Annotated[Optional[StrictStr], Field(description="Pagination cursor (before).")] = None,
|
|
714
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
715
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
716
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
717
|
+
] | None = None,
|
|
718
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
719
|
+
_content_type: StrictStr | None = None,
|
|
720
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
721
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
722
|
+
) -> VectorStoreListResponse:
|
|
723
|
+
"""List vector stores (OpenAI-compatible).
|
|
724
|
+
|
|
725
|
+
List vector stores (OpenAI-compatible).
|
|
726
|
+
|
|
727
|
+
:param limit: Maximum number of vector stores to return.
|
|
728
|
+
:type limit: int
|
|
729
|
+
:param order: Sort order by created_at: asc or desc.
|
|
730
|
+
:type order: str
|
|
731
|
+
:param after: Pagination cursor (after).
|
|
732
|
+
:type after: str
|
|
733
|
+
:param before: Pagination cursor (before).
|
|
734
|
+
:type before: str
|
|
735
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
736
|
+
number provided, it will be total request
|
|
737
|
+
timeout. It can also be a pair (tuple) of
|
|
738
|
+
(connection, read) timeouts.
|
|
739
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
740
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
741
|
+
request; this effectively ignores the
|
|
742
|
+
authentication in the spec for a single request.
|
|
743
|
+
:type _request_auth: dict, optional
|
|
744
|
+
:param _content_type: force content-type for the request.
|
|
745
|
+
:type _content_type: str, Optional
|
|
746
|
+
:param _headers: set to override the headers for a single
|
|
747
|
+
request; this effectively ignores the headers
|
|
748
|
+
in the spec for a single request.
|
|
749
|
+
:type _headers: dict, optional
|
|
750
|
+
:param _host_index: set to override the host_index for a single
|
|
751
|
+
request; this effectively ignores the host_index
|
|
752
|
+
in the spec for a single request.
|
|
753
|
+
:type _host_index: int, optional
|
|
754
|
+
:return: Returns the result object.
|
|
755
|
+
""" # noqa: E501
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
_param = self._list_serialize(
|
|
759
|
+
limit=limit,
|
|
760
|
+
order=order,
|
|
761
|
+
after=after,
|
|
762
|
+
before=before,
|
|
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': "VectorStoreListResponse",
|
|
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
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of vector stores to return.")] = None,
|
|
793
|
+
order: Annotated[Optional[StrictStr], Field(description="Sort order by created_at: asc or desc.")] = None,
|
|
794
|
+
after: Annotated[Optional[StrictStr], Field(description="Pagination cursor (after).")] = None,
|
|
795
|
+
before: Annotated[Optional[StrictStr], Field(description="Pagination cursor (before).")] = None,
|
|
796
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
797
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
798
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
799
|
+
] | None = None,
|
|
800
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
801
|
+
_content_type: StrictStr | None = None,
|
|
802
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
803
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
804
|
+
) -> ApiResponse[VectorStoreListResponse]:
|
|
805
|
+
"""List vector stores (OpenAI-compatible).
|
|
806
|
+
|
|
807
|
+
List vector stores (OpenAI-compatible).
|
|
808
|
+
|
|
809
|
+
:param limit: Maximum number of vector stores to return.
|
|
810
|
+
:type limit: int
|
|
811
|
+
:param order: Sort order by created_at: asc or desc.
|
|
812
|
+
:type order: str
|
|
813
|
+
:param after: Pagination cursor (after).
|
|
814
|
+
:type after: str
|
|
815
|
+
:param before: Pagination cursor (before).
|
|
816
|
+
:type before: str
|
|
817
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
818
|
+
number provided, it will be total request
|
|
819
|
+
timeout. It can also be a pair (tuple) of
|
|
820
|
+
(connection, read) timeouts.
|
|
821
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
822
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
823
|
+
request; this effectively ignores the
|
|
824
|
+
authentication in the spec for a single request.
|
|
825
|
+
:type _request_auth: dict, optional
|
|
826
|
+
:param _content_type: force content-type for the request.
|
|
827
|
+
:type _content_type: str, Optional
|
|
828
|
+
:param _headers: set to override the headers for a single
|
|
829
|
+
request; this effectively ignores the headers
|
|
830
|
+
in the spec for a single request.
|
|
831
|
+
:type _headers: dict, optional
|
|
832
|
+
:param _host_index: set to override the host_index for a single
|
|
833
|
+
request; this effectively ignores the host_index
|
|
834
|
+
in the spec for a single request.
|
|
835
|
+
:type _host_index: int, optional
|
|
836
|
+
:return: Returns the result object.
|
|
837
|
+
""" # noqa: E501
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
_param = self._list_serialize(
|
|
841
|
+
limit=limit,
|
|
842
|
+
order=order,
|
|
843
|
+
after=after,
|
|
844
|
+
before=before,
|
|
845
|
+
_request_auth=_request_auth,
|
|
846
|
+
_content_type=_content_type,
|
|
847
|
+
_headers=_headers,
|
|
848
|
+
_host_index=_host_index
|
|
849
|
+
)
|
|
850
|
+
|
|
851
|
+
_response_types_map: dict[str, str | None] = {
|
|
852
|
+
'200': "VectorStoreListResponse",
|
|
853
|
+
'400': "Error",
|
|
854
|
+
'429': "Error",
|
|
855
|
+
'500': "Error",
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
response_data = self.api_client.call_api(
|
|
859
|
+
*_param,
|
|
860
|
+
_request_timeout=_request_timeout
|
|
861
|
+
)
|
|
862
|
+
|
|
863
|
+
response_data.read()
|
|
864
|
+
return self.api_client.response_deserialize(
|
|
865
|
+
response_data=response_data,
|
|
866
|
+
response_types_map=_response_types_map,
|
|
867
|
+
)
|
|
868
|
+
|
|
869
|
+
@validate_call
|
|
870
|
+
def list_without_preload_content(
|
|
871
|
+
self,
|
|
872
|
+
limit: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Maximum number of vector stores to return.")] = None,
|
|
873
|
+
order: Annotated[Optional[StrictStr], Field(description="Sort order by created_at: asc or desc.")] = None,
|
|
874
|
+
after: Annotated[Optional[StrictStr], Field(description="Pagination cursor (after).")] = None,
|
|
875
|
+
before: Annotated[Optional[StrictStr], Field(description="Pagination cursor (before).")] = None,
|
|
876
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
877
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
878
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
879
|
+
] | None = None,
|
|
880
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
881
|
+
_content_type: StrictStr | None = None,
|
|
882
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
883
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
884
|
+
) -> RESTResponseType:
|
|
885
|
+
"""List vector stores (OpenAI-compatible).
|
|
886
|
+
|
|
887
|
+
List vector stores (OpenAI-compatible).
|
|
888
|
+
|
|
889
|
+
:param limit: Maximum number of vector stores to return.
|
|
890
|
+
:type limit: int
|
|
891
|
+
:param order: Sort order by created_at: asc or desc.
|
|
892
|
+
:type order: str
|
|
893
|
+
:param after: Pagination cursor (after).
|
|
894
|
+
:type after: str
|
|
895
|
+
:param before: Pagination cursor (before).
|
|
896
|
+
:type before: str
|
|
897
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
898
|
+
number provided, it will be total request
|
|
899
|
+
timeout. It can also be a pair (tuple) of
|
|
900
|
+
(connection, read) timeouts.
|
|
901
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
902
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
903
|
+
request; this effectively ignores the
|
|
904
|
+
authentication in the spec for a single request.
|
|
905
|
+
:type _request_auth: dict, optional
|
|
906
|
+
:param _content_type: force content-type for the request.
|
|
907
|
+
:type _content_type: str, Optional
|
|
908
|
+
:param _headers: set to override the headers for a single
|
|
909
|
+
request; this effectively ignores the headers
|
|
910
|
+
in the spec for a single request.
|
|
911
|
+
:type _headers: dict, optional
|
|
912
|
+
:param _host_index: set to override the host_index for a single
|
|
913
|
+
request; this effectively ignores the host_index
|
|
914
|
+
in the spec for a single request.
|
|
915
|
+
:type _host_index: int, optional
|
|
916
|
+
:return: Returns the result object.
|
|
917
|
+
""" # noqa: E501
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
_param = self._list_serialize(
|
|
921
|
+
limit=limit,
|
|
922
|
+
order=order,
|
|
923
|
+
after=after,
|
|
924
|
+
before=before,
|
|
925
|
+
_request_auth=_request_auth,
|
|
926
|
+
_content_type=_content_type,
|
|
927
|
+
_headers=_headers,
|
|
928
|
+
_host_index=_host_index
|
|
929
|
+
)
|
|
930
|
+
|
|
931
|
+
_response_types_map: dict[str, str | None] = {
|
|
932
|
+
'200': "VectorStoreListResponse",
|
|
933
|
+
'400': "Error",
|
|
934
|
+
'429': "Error",
|
|
935
|
+
'500': "Error",
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
response_data = self.api_client.call_api(
|
|
939
|
+
*_param,
|
|
940
|
+
_request_timeout=_request_timeout
|
|
941
|
+
)
|
|
942
|
+
return response_data.response
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
def _list_serialize(
|
|
946
|
+
self,
|
|
947
|
+
limit,
|
|
948
|
+
order,
|
|
949
|
+
after,
|
|
950
|
+
before,
|
|
951
|
+
_request_auth,
|
|
952
|
+
_content_type,
|
|
953
|
+
_headers,
|
|
954
|
+
_host_index,
|
|
955
|
+
) -> RequestSerialized:
|
|
956
|
+
|
|
957
|
+
_host = None
|
|
958
|
+
|
|
959
|
+
_collection_formats: dict[str, str] = {
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
_path_params: dict[str, str] = {}
|
|
963
|
+
_query_params: list[tuple[str, str]] = []
|
|
964
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
965
|
+
_form_params: list[tuple[str, str]] = []
|
|
966
|
+
_files: dict[
|
|
967
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
968
|
+
] = {}
|
|
969
|
+
_body_params: bytes | None = None
|
|
970
|
+
|
|
971
|
+
# process the path parameters
|
|
972
|
+
# process the query parameters
|
|
973
|
+
if limit is not None:
|
|
974
|
+
|
|
975
|
+
_query_params.append(('limit', limit))
|
|
976
|
+
|
|
977
|
+
if order is not None:
|
|
978
|
+
|
|
979
|
+
_query_params.append(('order', order))
|
|
980
|
+
|
|
981
|
+
if after is not None:
|
|
982
|
+
|
|
983
|
+
_query_params.append(('after', after))
|
|
984
|
+
|
|
985
|
+
if before is not None:
|
|
986
|
+
|
|
987
|
+
_query_params.append(('before', before))
|
|
988
|
+
|
|
989
|
+
# process the header parameters
|
|
990
|
+
# process the form parameters
|
|
991
|
+
# process the body parameter
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
# set the HTTP header `Accept`
|
|
995
|
+
if 'Accept' not in _header_params:
|
|
996
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
997
|
+
[
|
|
998
|
+
'application/json'
|
|
999
|
+
]
|
|
1000
|
+
)
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
# authentication setting
|
|
1004
|
+
_auth_settings: list[str] = [
|
|
1005
|
+
]
|
|
1006
|
+
|
|
1007
|
+
return self.api_client.param_serialize(
|
|
1008
|
+
method='GET',
|
|
1009
|
+
resource_path='/v1/vector_stores',
|
|
1010
|
+
path_params=_path_params,
|
|
1011
|
+
query_params=_query_params,
|
|
1012
|
+
header_params=_header_params,
|
|
1013
|
+
body=_body_params,
|
|
1014
|
+
post_params=_form_params,
|
|
1015
|
+
files=_files,
|
|
1016
|
+
auth_settings=_auth_settings,
|
|
1017
|
+
collection_formats=_collection_formats,
|
|
1018
|
+
_host=_host,
|
|
1019
|
+
_request_auth=_request_auth
|
|
1020
|
+
)
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
@validate_call
|
|
1025
|
+
def retrieve(
|
|
1026
|
+
self,
|
|
1027
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
1028
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1029
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1030
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1031
|
+
] | None = None,
|
|
1032
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1033
|
+
_content_type: StrictStr | None = None,
|
|
1034
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1035
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
1036
|
+
) -> VectorStoreObject:
|
|
1037
|
+
"""Retrieve a vector store (OpenAI-compatible).
|
|
1038
|
+
|
|
1039
|
+
Retrieve a vector store (OpenAI-compatible).
|
|
1040
|
+
|
|
1041
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
1042
|
+
:type vector_store_id: str
|
|
1043
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1044
|
+
number provided, it will be total request
|
|
1045
|
+
timeout. It can also be a pair (tuple) of
|
|
1046
|
+
(connection, read) timeouts.
|
|
1047
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1048
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1049
|
+
request; this effectively ignores the
|
|
1050
|
+
authentication in the spec for a single request.
|
|
1051
|
+
:type _request_auth: dict, optional
|
|
1052
|
+
:param _content_type: force content-type for the request.
|
|
1053
|
+
:type _content_type: str, Optional
|
|
1054
|
+
:param _headers: set to override the headers for a single
|
|
1055
|
+
request; this effectively ignores the headers
|
|
1056
|
+
in the spec for a single request.
|
|
1057
|
+
:type _headers: dict, optional
|
|
1058
|
+
:param _host_index: set to override the host_index for a single
|
|
1059
|
+
request; this effectively ignores the host_index
|
|
1060
|
+
in the spec for a single request.
|
|
1061
|
+
:type _host_index: int, optional
|
|
1062
|
+
:return: Returns the result object.
|
|
1063
|
+
""" # noqa: E501
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
_param = self._retrieve_serialize(
|
|
1067
|
+
vector_store_id=vector_store_id,
|
|
1068
|
+
_request_auth=_request_auth,
|
|
1069
|
+
_content_type=_content_type,
|
|
1070
|
+
_headers=_headers,
|
|
1071
|
+
_host_index=_host_index
|
|
1072
|
+
)
|
|
1073
|
+
|
|
1074
|
+
_response_types_map: dict[str, str | None] = {
|
|
1075
|
+
'200': "VectorStoreObject",
|
|
1076
|
+
'400': "Error",
|
|
1077
|
+
'429': "Error",
|
|
1078
|
+
'500': "Error",
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
response_data = self.api_client.call_api(
|
|
1082
|
+
*_param,
|
|
1083
|
+
_request_timeout=_request_timeout
|
|
1084
|
+
)
|
|
1085
|
+
|
|
1086
|
+
response_data.read()
|
|
1087
|
+
_deserialized = self.api_client.response_deserialize(
|
|
1088
|
+
response_data=response_data,
|
|
1089
|
+
response_types_map=_response_types_map,
|
|
1090
|
+
).data
|
|
1091
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
1092
|
+
return _deserialized
|
|
1093
|
+
|
|
1094
|
+
@validate_call
|
|
1095
|
+
def retrieve_with_http_info(
|
|
1096
|
+
self,
|
|
1097
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
1098
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1099
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1100
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1101
|
+
] | None = None,
|
|
1102
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1103
|
+
_content_type: StrictStr | None = None,
|
|
1104
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1105
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
1106
|
+
) -> ApiResponse[VectorStoreObject]:
|
|
1107
|
+
"""Retrieve a vector store (OpenAI-compatible).
|
|
1108
|
+
|
|
1109
|
+
Retrieve a vector store (OpenAI-compatible).
|
|
1110
|
+
|
|
1111
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
1112
|
+
:type vector_store_id: str
|
|
1113
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1114
|
+
number provided, it will be total request
|
|
1115
|
+
timeout. It can also be a pair (tuple) of
|
|
1116
|
+
(connection, read) timeouts.
|
|
1117
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1118
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1119
|
+
request; this effectively ignores the
|
|
1120
|
+
authentication in the spec for a single request.
|
|
1121
|
+
:type _request_auth: dict, optional
|
|
1122
|
+
:param _content_type: force content-type for the request.
|
|
1123
|
+
:type _content_type: str, Optional
|
|
1124
|
+
:param _headers: set to override the headers for a single
|
|
1125
|
+
request; this effectively ignores the headers
|
|
1126
|
+
in the spec for a single request.
|
|
1127
|
+
:type _headers: dict, optional
|
|
1128
|
+
:param _host_index: set to override the host_index for a single
|
|
1129
|
+
request; this effectively ignores the host_index
|
|
1130
|
+
in the spec for a single request.
|
|
1131
|
+
:type _host_index: int, optional
|
|
1132
|
+
:return: Returns the result object.
|
|
1133
|
+
""" # noqa: E501
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
_param = self._retrieve_serialize(
|
|
1137
|
+
vector_store_id=vector_store_id,
|
|
1138
|
+
_request_auth=_request_auth,
|
|
1139
|
+
_content_type=_content_type,
|
|
1140
|
+
_headers=_headers,
|
|
1141
|
+
_host_index=_host_index
|
|
1142
|
+
)
|
|
1143
|
+
|
|
1144
|
+
_response_types_map: dict[str, str | None] = {
|
|
1145
|
+
'200': "VectorStoreObject",
|
|
1146
|
+
'400': "Error",
|
|
1147
|
+
'429': "Error",
|
|
1148
|
+
'500': "Error",
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
response_data = self.api_client.call_api(
|
|
1152
|
+
*_param,
|
|
1153
|
+
_request_timeout=_request_timeout
|
|
1154
|
+
)
|
|
1155
|
+
|
|
1156
|
+
response_data.read()
|
|
1157
|
+
return self.api_client.response_deserialize(
|
|
1158
|
+
response_data=response_data,
|
|
1159
|
+
response_types_map=_response_types_map,
|
|
1160
|
+
)
|
|
1161
|
+
|
|
1162
|
+
@validate_call
|
|
1163
|
+
def retrieve_without_preload_content(
|
|
1164
|
+
self,
|
|
1165
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
1166
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1167
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1168
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1169
|
+
] | None = None,
|
|
1170
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1171
|
+
_content_type: StrictStr | None = None,
|
|
1172
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1173
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
1174
|
+
) -> RESTResponseType:
|
|
1175
|
+
"""Retrieve a vector store (OpenAI-compatible).
|
|
1176
|
+
|
|
1177
|
+
Retrieve a vector store (OpenAI-compatible).
|
|
1178
|
+
|
|
1179
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
1180
|
+
:type vector_store_id: str
|
|
1181
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1182
|
+
number provided, it will be total request
|
|
1183
|
+
timeout. It can also be a pair (tuple) of
|
|
1184
|
+
(connection, read) timeouts.
|
|
1185
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1186
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1187
|
+
request; this effectively ignores the
|
|
1188
|
+
authentication in the spec for a single request.
|
|
1189
|
+
:type _request_auth: dict, optional
|
|
1190
|
+
:param _content_type: force content-type for the request.
|
|
1191
|
+
:type _content_type: str, Optional
|
|
1192
|
+
:param _headers: set to override the headers for a single
|
|
1193
|
+
request; this effectively ignores the headers
|
|
1194
|
+
in the spec for a single request.
|
|
1195
|
+
:type _headers: dict, optional
|
|
1196
|
+
:param _host_index: set to override the host_index for a single
|
|
1197
|
+
request; this effectively ignores the host_index
|
|
1198
|
+
in the spec for a single request.
|
|
1199
|
+
:type _host_index: int, optional
|
|
1200
|
+
:return: Returns the result object.
|
|
1201
|
+
""" # noqa: E501
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
_param = self._retrieve_serialize(
|
|
1205
|
+
vector_store_id=vector_store_id,
|
|
1206
|
+
_request_auth=_request_auth,
|
|
1207
|
+
_content_type=_content_type,
|
|
1208
|
+
_headers=_headers,
|
|
1209
|
+
_host_index=_host_index
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
_response_types_map: dict[str, str | None] = {
|
|
1213
|
+
'200': "VectorStoreObject",
|
|
1214
|
+
'400': "Error",
|
|
1215
|
+
'429': "Error",
|
|
1216
|
+
'500': "Error",
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
response_data = self.api_client.call_api(
|
|
1220
|
+
*_param,
|
|
1221
|
+
_request_timeout=_request_timeout
|
|
1222
|
+
)
|
|
1223
|
+
return response_data.response
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
def _retrieve_serialize(
|
|
1227
|
+
self,
|
|
1228
|
+
vector_store_id,
|
|
1229
|
+
_request_auth,
|
|
1230
|
+
_content_type,
|
|
1231
|
+
_headers,
|
|
1232
|
+
_host_index,
|
|
1233
|
+
) -> RequestSerialized:
|
|
1234
|
+
|
|
1235
|
+
_host = None
|
|
1236
|
+
|
|
1237
|
+
_collection_formats: dict[str, str] = {
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
_path_params: dict[str, str] = {}
|
|
1241
|
+
_query_params: list[tuple[str, str]] = []
|
|
1242
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
1243
|
+
_form_params: list[tuple[str, str]] = []
|
|
1244
|
+
_files: dict[
|
|
1245
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
1246
|
+
] = {}
|
|
1247
|
+
_body_params: bytes | None = None
|
|
1248
|
+
|
|
1249
|
+
# process the path parameters
|
|
1250
|
+
if vector_store_id is not None:
|
|
1251
|
+
_path_params['vector_store_id'] = vector_store_id
|
|
1252
|
+
# process the query parameters
|
|
1253
|
+
# process the header parameters
|
|
1254
|
+
# process the form parameters
|
|
1255
|
+
# process the body parameter
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
# set the HTTP header `Accept`
|
|
1259
|
+
if 'Accept' not in _header_params:
|
|
1260
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1261
|
+
[
|
|
1262
|
+
'application/json'
|
|
1263
|
+
]
|
|
1264
|
+
)
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
# authentication setting
|
|
1268
|
+
_auth_settings: list[str] = [
|
|
1269
|
+
]
|
|
1270
|
+
|
|
1271
|
+
return self.api_client.param_serialize(
|
|
1272
|
+
method='GET',
|
|
1273
|
+
resource_path='/v1/vector_stores/{vector_store_id}',
|
|
1274
|
+
path_params=_path_params,
|
|
1275
|
+
query_params=_query_params,
|
|
1276
|
+
header_params=_header_params,
|
|
1277
|
+
body=_body_params,
|
|
1278
|
+
post_params=_form_params,
|
|
1279
|
+
files=_files,
|
|
1280
|
+
auth_settings=_auth_settings,
|
|
1281
|
+
collection_formats=_collection_formats,
|
|
1282
|
+
_host=_host,
|
|
1283
|
+
_request_auth=_request_auth
|
|
1284
|
+
)
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
@validate_call
|
|
1289
|
+
def search(
|
|
1290
|
+
self,
|
|
1291
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
1292
|
+
open_ai_search_vector_store_request: OpenAISearchVectorStoreRequest | None = None,
|
|
1293
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1294
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1295
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1296
|
+
] | None = None,
|
|
1297
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1298
|
+
_content_type: StrictStr | None = None,
|
|
1299
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1300
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1301
|
+
**kwargs: Any
|
|
1302
|
+
) -> VectorStoreSearchResponsePage:
|
|
1303
|
+
"""Search a vector store (OpenAI-compatible).
|
|
1304
|
+
|
|
1305
|
+
Search a vector store (OpenAI-compatible).
|
|
1306
|
+
|
|
1307
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
1308
|
+
:type vector_store_id: str
|
|
1309
|
+
:param open_ai_search_vector_store_request: (required)
|
|
1310
|
+
:type open_ai_search_vector_store_request: OpenAISearchVectorStoreRequest
|
|
1311
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1312
|
+
number provided, it will be total request
|
|
1313
|
+
timeout. It can also be a pair (tuple) of
|
|
1314
|
+
(connection, read) timeouts.
|
|
1315
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1316
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1317
|
+
request; this effectively ignores the
|
|
1318
|
+
authentication in the spec for a single request.
|
|
1319
|
+
:type _request_auth: dict, optional
|
|
1320
|
+
:param _content_type: force content-type for the request.
|
|
1321
|
+
:type _content_type: str, Optional
|
|
1322
|
+
:param _headers: set to override the headers for a single
|
|
1323
|
+
request; this effectively ignores the headers
|
|
1324
|
+
in the spec for a single request.
|
|
1325
|
+
:type _headers: dict, optional
|
|
1326
|
+
:param _host_index: set to override the host_index for a single
|
|
1327
|
+
request; this effectively ignores the host_index
|
|
1328
|
+
in the spec for a single request.
|
|
1329
|
+
:type _host_index: int, optional
|
|
1330
|
+
:return: Returns the result object.
|
|
1331
|
+
""" # noqa: E501
|
|
1332
|
+
|
|
1333
|
+
# If body param not provided, construct from kwargs
|
|
1334
|
+
if open_ai_search_vector_store_request is None and kwargs:
|
|
1335
|
+
try:
|
|
1336
|
+
# Try proper type conversion via from_json
|
|
1337
|
+
open_ai_search_vector_store_request = OpenAISearchVectorStoreRequest.from_json(json.dumps(kwargs))
|
|
1338
|
+
except Exception:
|
|
1339
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1340
|
+
# Server will still validate the final request
|
|
1341
|
+
open_ai_search_vector_store_request = OpenAISearchVectorStoreRequest.model_construct(**kwargs)
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
_param = self._search_serialize(
|
|
1345
|
+
vector_store_id=vector_store_id,
|
|
1346
|
+
open_ai_search_vector_store_request=open_ai_search_vector_store_request,
|
|
1347
|
+
_request_auth=_request_auth,
|
|
1348
|
+
_content_type=_content_type,
|
|
1349
|
+
_headers=_headers,
|
|
1350
|
+
_host_index=_host_index
|
|
1351
|
+
)
|
|
1352
|
+
|
|
1353
|
+
_response_types_map: dict[str, str | None] = {
|
|
1354
|
+
'200': "VectorStoreSearchResponsePage",
|
|
1355
|
+
'400': "Error",
|
|
1356
|
+
'429': "Error",
|
|
1357
|
+
'500': "Error",
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
response_data = self.api_client.call_api(
|
|
1361
|
+
*_param,
|
|
1362
|
+
_request_timeout=_request_timeout
|
|
1363
|
+
)
|
|
1364
|
+
|
|
1365
|
+
response_data.read()
|
|
1366
|
+
_deserialized = self.api_client.response_deserialize(
|
|
1367
|
+
response_data=response_data,
|
|
1368
|
+
response_types_map=_response_types_map,
|
|
1369
|
+
).data
|
|
1370
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
1371
|
+
return _deserialized
|
|
1372
|
+
|
|
1373
|
+
@validate_call
|
|
1374
|
+
def search_with_http_info(
|
|
1375
|
+
self,
|
|
1376
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
1377
|
+
open_ai_search_vector_store_request: OpenAISearchVectorStoreRequest | None = None,
|
|
1378
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1379
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1380
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1381
|
+
] | None = None,
|
|
1382
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1383
|
+
_content_type: StrictStr | None = None,
|
|
1384
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1385
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1386
|
+
**kwargs: Any
|
|
1387
|
+
) -> ApiResponse[VectorStoreSearchResponsePage]:
|
|
1388
|
+
"""Search a vector store (OpenAI-compatible).
|
|
1389
|
+
|
|
1390
|
+
Search a vector store (OpenAI-compatible).
|
|
1391
|
+
|
|
1392
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
1393
|
+
:type vector_store_id: str
|
|
1394
|
+
:param open_ai_search_vector_store_request: (required)
|
|
1395
|
+
:type open_ai_search_vector_store_request: OpenAISearchVectorStoreRequest
|
|
1396
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1397
|
+
number provided, it will be total request
|
|
1398
|
+
timeout. It can also be a pair (tuple) of
|
|
1399
|
+
(connection, read) timeouts.
|
|
1400
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1401
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1402
|
+
request; this effectively ignores the
|
|
1403
|
+
authentication in the spec for a single request.
|
|
1404
|
+
:type _request_auth: dict, optional
|
|
1405
|
+
:param _content_type: force content-type for the request.
|
|
1406
|
+
:type _content_type: str, Optional
|
|
1407
|
+
:param _headers: set to override the headers for a single
|
|
1408
|
+
request; this effectively ignores the headers
|
|
1409
|
+
in the spec for a single request.
|
|
1410
|
+
:type _headers: dict, optional
|
|
1411
|
+
:param _host_index: set to override the host_index for a single
|
|
1412
|
+
request; this effectively ignores the host_index
|
|
1413
|
+
in the spec for a single request.
|
|
1414
|
+
:type _host_index: int, optional
|
|
1415
|
+
:return: Returns the result object.
|
|
1416
|
+
""" # noqa: E501
|
|
1417
|
+
|
|
1418
|
+
# If body param not provided, construct from kwargs
|
|
1419
|
+
if open_ai_search_vector_store_request is None and kwargs:
|
|
1420
|
+
try:
|
|
1421
|
+
# Try proper type conversion via from_json
|
|
1422
|
+
open_ai_search_vector_store_request = OpenAISearchVectorStoreRequest.from_json(json.dumps(kwargs))
|
|
1423
|
+
except Exception:
|
|
1424
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1425
|
+
# Server will still validate the final request
|
|
1426
|
+
open_ai_search_vector_store_request = OpenAISearchVectorStoreRequest.model_construct(**kwargs)
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
_param = self._search_serialize(
|
|
1430
|
+
vector_store_id=vector_store_id,
|
|
1431
|
+
open_ai_search_vector_store_request=open_ai_search_vector_store_request,
|
|
1432
|
+
_request_auth=_request_auth,
|
|
1433
|
+
_content_type=_content_type,
|
|
1434
|
+
_headers=_headers,
|
|
1435
|
+
_host_index=_host_index
|
|
1436
|
+
)
|
|
1437
|
+
|
|
1438
|
+
_response_types_map: dict[str, str | None] = {
|
|
1439
|
+
'200': "VectorStoreSearchResponsePage",
|
|
1440
|
+
'400': "Error",
|
|
1441
|
+
'429': "Error",
|
|
1442
|
+
'500': "Error",
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
response_data = self.api_client.call_api(
|
|
1446
|
+
*_param,
|
|
1447
|
+
_request_timeout=_request_timeout
|
|
1448
|
+
)
|
|
1449
|
+
|
|
1450
|
+
response_data.read()
|
|
1451
|
+
return self.api_client.response_deserialize(
|
|
1452
|
+
response_data=response_data,
|
|
1453
|
+
response_types_map=_response_types_map,
|
|
1454
|
+
)
|
|
1455
|
+
|
|
1456
|
+
@validate_call
|
|
1457
|
+
def search_without_preload_content(
|
|
1458
|
+
self,
|
|
1459
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
1460
|
+
open_ai_search_vector_store_request: OpenAISearchVectorStoreRequest | None = None,
|
|
1461
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1462
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1463
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1464
|
+
] | None = None,
|
|
1465
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1466
|
+
_content_type: StrictStr | None = None,
|
|
1467
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1468
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1469
|
+
**kwargs: Any
|
|
1470
|
+
) -> RESTResponseType:
|
|
1471
|
+
"""Search a vector store (OpenAI-compatible).
|
|
1472
|
+
|
|
1473
|
+
Search a vector store (OpenAI-compatible).
|
|
1474
|
+
|
|
1475
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
1476
|
+
:type vector_store_id: str
|
|
1477
|
+
:param open_ai_search_vector_store_request: (required)
|
|
1478
|
+
:type open_ai_search_vector_store_request: OpenAISearchVectorStoreRequest
|
|
1479
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1480
|
+
number provided, it will be total request
|
|
1481
|
+
timeout. It can also be a pair (tuple) of
|
|
1482
|
+
(connection, read) timeouts.
|
|
1483
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1484
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1485
|
+
request; this effectively ignores the
|
|
1486
|
+
authentication in the spec for a single request.
|
|
1487
|
+
:type _request_auth: dict, optional
|
|
1488
|
+
:param _content_type: force content-type for the request.
|
|
1489
|
+
:type _content_type: str, Optional
|
|
1490
|
+
:param _headers: set to override the headers for a single
|
|
1491
|
+
request; this effectively ignores the headers
|
|
1492
|
+
in the spec for a single request.
|
|
1493
|
+
:type _headers: dict, optional
|
|
1494
|
+
:param _host_index: set to override the host_index for a single
|
|
1495
|
+
request; this effectively ignores the host_index
|
|
1496
|
+
in the spec for a single request.
|
|
1497
|
+
:type _host_index: int, optional
|
|
1498
|
+
:return: Returns the result object.
|
|
1499
|
+
""" # noqa: E501
|
|
1500
|
+
|
|
1501
|
+
# If body param not provided, construct from kwargs
|
|
1502
|
+
if open_ai_search_vector_store_request is None and kwargs:
|
|
1503
|
+
try:
|
|
1504
|
+
# Try proper type conversion via from_json
|
|
1505
|
+
open_ai_search_vector_store_request = OpenAISearchVectorStoreRequest.from_json(json.dumps(kwargs))
|
|
1506
|
+
except Exception:
|
|
1507
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1508
|
+
# Server will still validate the final request
|
|
1509
|
+
open_ai_search_vector_store_request = OpenAISearchVectorStoreRequest.model_construct(**kwargs)
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
_param = self._search_serialize(
|
|
1513
|
+
vector_store_id=vector_store_id,
|
|
1514
|
+
open_ai_search_vector_store_request=open_ai_search_vector_store_request,
|
|
1515
|
+
_request_auth=_request_auth,
|
|
1516
|
+
_content_type=_content_type,
|
|
1517
|
+
_headers=_headers,
|
|
1518
|
+
_host_index=_host_index
|
|
1519
|
+
)
|
|
1520
|
+
|
|
1521
|
+
_response_types_map: dict[str, str | None] = {
|
|
1522
|
+
'200': "VectorStoreSearchResponsePage",
|
|
1523
|
+
'400': "Error",
|
|
1524
|
+
'429': "Error",
|
|
1525
|
+
'500': "Error",
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
response_data = self.api_client.call_api(
|
|
1529
|
+
*_param,
|
|
1530
|
+
_request_timeout=_request_timeout
|
|
1531
|
+
)
|
|
1532
|
+
return response_data.response
|
|
1533
|
+
|
|
1534
|
+
|
|
1535
|
+
def _search_serialize(
|
|
1536
|
+
self,
|
|
1537
|
+
vector_store_id,
|
|
1538
|
+
open_ai_search_vector_store_request,
|
|
1539
|
+
_request_auth,
|
|
1540
|
+
_content_type,
|
|
1541
|
+
_headers,
|
|
1542
|
+
_host_index,
|
|
1543
|
+
) -> RequestSerialized:
|
|
1544
|
+
|
|
1545
|
+
_host = None
|
|
1546
|
+
|
|
1547
|
+
_collection_formats: dict[str, str] = {
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
_path_params: dict[str, str] = {}
|
|
1551
|
+
_query_params: list[tuple[str, str]] = []
|
|
1552
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
1553
|
+
_form_params: list[tuple[str, str]] = []
|
|
1554
|
+
_files: dict[
|
|
1555
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
1556
|
+
] = {}
|
|
1557
|
+
_body_params: bytes | None = None
|
|
1558
|
+
|
|
1559
|
+
# process the path parameters
|
|
1560
|
+
if vector_store_id is not None:
|
|
1561
|
+
_path_params['vector_store_id'] = vector_store_id
|
|
1562
|
+
# process the query parameters
|
|
1563
|
+
# process the header parameters
|
|
1564
|
+
# process the form parameters
|
|
1565
|
+
# process the body parameter
|
|
1566
|
+
if open_ai_search_vector_store_request is not None:
|
|
1567
|
+
_body_params = open_ai_search_vector_store_request
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
# set the HTTP header `Accept`
|
|
1571
|
+
if 'Accept' not in _header_params:
|
|
1572
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1573
|
+
[
|
|
1574
|
+
'application/json'
|
|
1575
|
+
]
|
|
1576
|
+
)
|
|
1577
|
+
|
|
1578
|
+
# set the HTTP header `Content-Type`
|
|
1579
|
+
if _content_type:
|
|
1580
|
+
_header_params['Content-Type'] = _content_type
|
|
1581
|
+
else:
|
|
1582
|
+
_default_content_type = (
|
|
1583
|
+
self.api_client.select_header_content_type(
|
|
1584
|
+
[
|
|
1585
|
+
'application/json'
|
|
1586
|
+
]
|
|
1587
|
+
)
|
|
1588
|
+
)
|
|
1589
|
+
if _default_content_type is not None:
|
|
1590
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1591
|
+
|
|
1592
|
+
# authentication setting
|
|
1593
|
+
_auth_settings: list[str] = [
|
|
1594
|
+
]
|
|
1595
|
+
|
|
1596
|
+
return self.api_client.param_serialize(
|
|
1597
|
+
method='POST',
|
|
1598
|
+
resource_path='/v1/vector_stores/{vector_store_id}/search',
|
|
1599
|
+
path_params=_path_params,
|
|
1600
|
+
query_params=_query_params,
|
|
1601
|
+
header_params=_header_params,
|
|
1602
|
+
body=_body_params,
|
|
1603
|
+
post_params=_form_params,
|
|
1604
|
+
files=_files,
|
|
1605
|
+
auth_settings=_auth_settings,
|
|
1606
|
+
collection_formats=_collection_formats,
|
|
1607
|
+
_host=_host,
|
|
1608
|
+
_request_auth=_request_auth
|
|
1609
|
+
)
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
@validate_call
|
|
1614
|
+
def update(
|
|
1615
|
+
self,
|
|
1616
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
1617
|
+
open_ai_update_vector_store_request: OpenAIUpdateVectorStoreRequest | None = None,
|
|
1618
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1619
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1620
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1621
|
+
] | None = None,
|
|
1622
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1623
|
+
_content_type: StrictStr | None = None,
|
|
1624
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1625
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1626
|
+
**kwargs: Any
|
|
1627
|
+
) -> VectorStoreObject:
|
|
1628
|
+
"""Update a vector store (OpenAI-compatible).
|
|
1629
|
+
|
|
1630
|
+
Update a vector store (OpenAI-compatible).
|
|
1631
|
+
|
|
1632
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
1633
|
+
:type vector_store_id: str
|
|
1634
|
+
:param open_ai_update_vector_store_request: (required)
|
|
1635
|
+
:type open_ai_update_vector_store_request: OpenAIUpdateVectorStoreRequest
|
|
1636
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1637
|
+
number provided, it will be total request
|
|
1638
|
+
timeout. It can also be a pair (tuple) of
|
|
1639
|
+
(connection, read) timeouts.
|
|
1640
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1641
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1642
|
+
request; this effectively ignores the
|
|
1643
|
+
authentication in the spec for a single request.
|
|
1644
|
+
:type _request_auth: dict, optional
|
|
1645
|
+
:param _content_type: force content-type for the request.
|
|
1646
|
+
:type _content_type: str, Optional
|
|
1647
|
+
:param _headers: set to override the headers for a single
|
|
1648
|
+
request; this effectively ignores the headers
|
|
1649
|
+
in the spec for a single request.
|
|
1650
|
+
:type _headers: dict, optional
|
|
1651
|
+
:param _host_index: set to override the host_index for a single
|
|
1652
|
+
request; this effectively ignores the host_index
|
|
1653
|
+
in the spec for a single request.
|
|
1654
|
+
:type _host_index: int, optional
|
|
1655
|
+
:return: Returns the result object.
|
|
1656
|
+
""" # noqa: E501
|
|
1657
|
+
|
|
1658
|
+
# If body param not provided, construct from kwargs
|
|
1659
|
+
if open_ai_update_vector_store_request is None and kwargs:
|
|
1660
|
+
try:
|
|
1661
|
+
# Try proper type conversion via from_json
|
|
1662
|
+
open_ai_update_vector_store_request = OpenAIUpdateVectorStoreRequest.from_json(json.dumps(kwargs))
|
|
1663
|
+
except Exception:
|
|
1664
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1665
|
+
# Server will still validate the final request
|
|
1666
|
+
open_ai_update_vector_store_request = OpenAIUpdateVectorStoreRequest.model_construct(**kwargs)
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
_param = self._update_serialize(
|
|
1670
|
+
vector_store_id=vector_store_id,
|
|
1671
|
+
open_ai_update_vector_store_request=open_ai_update_vector_store_request,
|
|
1672
|
+
_request_auth=_request_auth,
|
|
1673
|
+
_content_type=_content_type,
|
|
1674
|
+
_headers=_headers,
|
|
1675
|
+
_host_index=_host_index
|
|
1676
|
+
)
|
|
1677
|
+
|
|
1678
|
+
_response_types_map: dict[str, str | None] = {
|
|
1679
|
+
'200': "VectorStoreObject",
|
|
1680
|
+
'400': "Error",
|
|
1681
|
+
'429': "Error",
|
|
1682
|
+
'500': "Error",
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
response_data = self.api_client.call_api(
|
|
1686
|
+
*_param,
|
|
1687
|
+
_request_timeout=_request_timeout
|
|
1688
|
+
)
|
|
1689
|
+
|
|
1690
|
+
response_data.read()
|
|
1691
|
+
_deserialized = self.api_client.response_deserialize(
|
|
1692
|
+
response_data=response_data,
|
|
1693
|
+
response_types_map=_response_types_map,
|
|
1694
|
+
).data
|
|
1695
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
1696
|
+
return _deserialized
|
|
1697
|
+
|
|
1698
|
+
@validate_call
|
|
1699
|
+
def update_with_http_info(
|
|
1700
|
+
self,
|
|
1701
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
1702
|
+
open_ai_update_vector_store_request: OpenAIUpdateVectorStoreRequest | None = None,
|
|
1703
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1704
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1705
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1706
|
+
] | None = None,
|
|
1707
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1708
|
+
_content_type: StrictStr | None = None,
|
|
1709
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1710
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1711
|
+
**kwargs: Any
|
|
1712
|
+
) -> ApiResponse[VectorStoreObject]:
|
|
1713
|
+
"""Update a vector store (OpenAI-compatible).
|
|
1714
|
+
|
|
1715
|
+
Update a vector store (OpenAI-compatible).
|
|
1716
|
+
|
|
1717
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
1718
|
+
:type vector_store_id: str
|
|
1719
|
+
:param open_ai_update_vector_store_request: (required)
|
|
1720
|
+
:type open_ai_update_vector_store_request: OpenAIUpdateVectorStoreRequest
|
|
1721
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1722
|
+
number provided, it will be total request
|
|
1723
|
+
timeout. It can also be a pair (tuple) of
|
|
1724
|
+
(connection, read) timeouts.
|
|
1725
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1726
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1727
|
+
request; this effectively ignores the
|
|
1728
|
+
authentication in the spec for a single request.
|
|
1729
|
+
:type _request_auth: dict, optional
|
|
1730
|
+
:param _content_type: force content-type for the request.
|
|
1731
|
+
:type _content_type: str, Optional
|
|
1732
|
+
:param _headers: set to override the headers for a single
|
|
1733
|
+
request; this effectively ignores the headers
|
|
1734
|
+
in the spec for a single request.
|
|
1735
|
+
:type _headers: dict, optional
|
|
1736
|
+
:param _host_index: set to override the host_index for a single
|
|
1737
|
+
request; this effectively ignores the host_index
|
|
1738
|
+
in the spec for a single request.
|
|
1739
|
+
:type _host_index: int, optional
|
|
1740
|
+
:return: Returns the result object.
|
|
1741
|
+
""" # noqa: E501
|
|
1742
|
+
|
|
1743
|
+
# If body param not provided, construct from kwargs
|
|
1744
|
+
if open_ai_update_vector_store_request is None and kwargs:
|
|
1745
|
+
try:
|
|
1746
|
+
# Try proper type conversion via from_json
|
|
1747
|
+
open_ai_update_vector_store_request = OpenAIUpdateVectorStoreRequest.from_json(json.dumps(kwargs))
|
|
1748
|
+
except Exception:
|
|
1749
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1750
|
+
# Server will still validate the final request
|
|
1751
|
+
open_ai_update_vector_store_request = OpenAIUpdateVectorStoreRequest.model_construct(**kwargs)
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
_param = self._update_serialize(
|
|
1755
|
+
vector_store_id=vector_store_id,
|
|
1756
|
+
open_ai_update_vector_store_request=open_ai_update_vector_store_request,
|
|
1757
|
+
_request_auth=_request_auth,
|
|
1758
|
+
_content_type=_content_type,
|
|
1759
|
+
_headers=_headers,
|
|
1760
|
+
_host_index=_host_index
|
|
1761
|
+
)
|
|
1762
|
+
|
|
1763
|
+
_response_types_map: dict[str, str | None] = {
|
|
1764
|
+
'200': "VectorStoreObject",
|
|
1765
|
+
'400': "Error",
|
|
1766
|
+
'429': "Error",
|
|
1767
|
+
'500': "Error",
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
response_data = self.api_client.call_api(
|
|
1771
|
+
*_param,
|
|
1772
|
+
_request_timeout=_request_timeout
|
|
1773
|
+
)
|
|
1774
|
+
|
|
1775
|
+
response_data.read()
|
|
1776
|
+
return self.api_client.response_deserialize(
|
|
1777
|
+
response_data=response_data,
|
|
1778
|
+
response_types_map=_response_types_map,
|
|
1779
|
+
)
|
|
1780
|
+
|
|
1781
|
+
@validate_call
|
|
1782
|
+
def update_without_preload_content(
|
|
1783
|
+
self,
|
|
1784
|
+
vector_store_id: Annotated[StrictStr, Field(description="The vector store identifier.")],
|
|
1785
|
+
open_ai_update_vector_store_request: OpenAIUpdateVectorStoreRequest | None = None,
|
|
1786
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1787
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1788
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1789
|
+
] | None = None,
|
|
1790
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1791
|
+
_content_type: StrictStr | None = None,
|
|
1792
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1793
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1794
|
+
**kwargs: Any
|
|
1795
|
+
) -> RESTResponseType:
|
|
1796
|
+
"""Update a vector store (OpenAI-compatible).
|
|
1797
|
+
|
|
1798
|
+
Update a vector store (OpenAI-compatible).
|
|
1799
|
+
|
|
1800
|
+
:param vector_store_id: The vector store identifier. (required)
|
|
1801
|
+
:type vector_store_id: str
|
|
1802
|
+
:param open_ai_update_vector_store_request: (required)
|
|
1803
|
+
:type open_ai_update_vector_store_request: OpenAIUpdateVectorStoreRequest
|
|
1804
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1805
|
+
number provided, it will be total request
|
|
1806
|
+
timeout. It can also be a pair (tuple) of
|
|
1807
|
+
(connection, read) timeouts.
|
|
1808
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1809
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1810
|
+
request; this effectively ignores the
|
|
1811
|
+
authentication in the spec for a single request.
|
|
1812
|
+
:type _request_auth: dict, optional
|
|
1813
|
+
:param _content_type: force content-type for the request.
|
|
1814
|
+
:type _content_type: str, Optional
|
|
1815
|
+
:param _headers: set to override the headers for a single
|
|
1816
|
+
request; this effectively ignores the headers
|
|
1817
|
+
in the spec for a single request.
|
|
1818
|
+
:type _headers: dict, optional
|
|
1819
|
+
:param _host_index: set to override the host_index for a single
|
|
1820
|
+
request; this effectively ignores the host_index
|
|
1821
|
+
in the spec for a single request.
|
|
1822
|
+
:type _host_index: int, optional
|
|
1823
|
+
:return: Returns the result object.
|
|
1824
|
+
""" # noqa: E501
|
|
1825
|
+
|
|
1826
|
+
# If body param not provided, construct from kwargs
|
|
1827
|
+
if open_ai_update_vector_store_request is None and kwargs:
|
|
1828
|
+
try:
|
|
1829
|
+
# Try proper type conversion via from_json
|
|
1830
|
+
open_ai_update_vector_store_request = OpenAIUpdateVectorStoreRequest.from_json(json.dumps(kwargs))
|
|
1831
|
+
except Exception:
|
|
1832
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1833
|
+
# Server will still validate the final request
|
|
1834
|
+
open_ai_update_vector_store_request = OpenAIUpdateVectorStoreRequest.model_construct(**kwargs)
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
_param = self._update_serialize(
|
|
1838
|
+
vector_store_id=vector_store_id,
|
|
1839
|
+
open_ai_update_vector_store_request=open_ai_update_vector_store_request,
|
|
1840
|
+
_request_auth=_request_auth,
|
|
1841
|
+
_content_type=_content_type,
|
|
1842
|
+
_headers=_headers,
|
|
1843
|
+
_host_index=_host_index
|
|
1844
|
+
)
|
|
1845
|
+
|
|
1846
|
+
_response_types_map: dict[str, str | None] = {
|
|
1847
|
+
'200': "VectorStoreObject",
|
|
1848
|
+
'400': "Error",
|
|
1849
|
+
'429': "Error",
|
|
1850
|
+
'500': "Error",
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
response_data = self.api_client.call_api(
|
|
1854
|
+
*_param,
|
|
1855
|
+
_request_timeout=_request_timeout
|
|
1856
|
+
)
|
|
1857
|
+
return response_data.response
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
def _update_serialize(
|
|
1861
|
+
self,
|
|
1862
|
+
vector_store_id,
|
|
1863
|
+
open_ai_update_vector_store_request,
|
|
1864
|
+
_request_auth,
|
|
1865
|
+
_content_type,
|
|
1866
|
+
_headers,
|
|
1867
|
+
_host_index,
|
|
1868
|
+
) -> RequestSerialized:
|
|
1869
|
+
|
|
1870
|
+
_host = None
|
|
1871
|
+
|
|
1872
|
+
_collection_formats: dict[str, str] = {
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
_path_params: dict[str, str] = {}
|
|
1876
|
+
_query_params: list[tuple[str, str]] = []
|
|
1877
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
1878
|
+
_form_params: list[tuple[str, str]] = []
|
|
1879
|
+
_files: dict[
|
|
1880
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
1881
|
+
] = {}
|
|
1882
|
+
_body_params: bytes | None = None
|
|
1883
|
+
|
|
1884
|
+
# process the path parameters
|
|
1885
|
+
if vector_store_id is not None:
|
|
1886
|
+
_path_params['vector_store_id'] = vector_store_id
|
|
1887
|
+
# process the query parameters
|
|
1888
|
+
# process the header parameters
|
|
1889
|
+
# process the form parameters
|
|
1890
|
+
# process the body parameter
|
|
1891
|
+
if open_ai_update_vector_store_request is not None:
|
|
1892
|
+
_body_params = open_ai_update_vector_store_request
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
# set the HTTP header `Accept`
|
|
1896
|
+
if 'Accept' not in _header_params:
|
|
1897
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1898
|
+
[
|
|
1899
|
+
'application/json'
|
|
1900
|
+
]
|
|
1901
|
+
)
|
|
1902
|
+
|
|
1903
|
+
# set the HTTP header `Content-Type`
|
|
1904
|
+
if _content_type:
|
|
1905
|
+
_header_params['Content-Type'] = _content_type
|
|
1906
|
+
else:
|
|
1907
|
+
_default_content_type = (
|
|
1908
|
+
self.api_client.select_header_content_type(
|
|
1909
|
+
[
|
|
1910
|
+
'application/json'
|
|
1911
|
+
]
|
|
1912
|
+
)
|
|
1913
|
+
)
|
|
1914
|
+
if _default_content_type is not None:
|
|
1915
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1916
|
+
|
|
1917
|
+
# authentication setting
|
|
1918
|
+
_auth_settings: list[str] = [
|
|
1919
|
+
]
|
|
1920
|
+
|
|
1921
|
+
return self.api_client.param_serialize(
|
|
1922
|
+
method='POST',
|
|
1923
|
+
resource_path='/v1/vector_stores/{vector_store_id}',
|
|
1924
|
+
path_params=_path_params,
|
|
1925
|
+
query_params=_query_params,
|
|
1926
|
+
header_params=_header_params,
|
|
1927
|
+
body=_body_params,
|
|
1928
|
+
post_params=_form_params,
|
|
1929
|
+
files=_files,
|
|
1930
|
+
auth_settings=_auth_settings,
|
|
1931
|
+
collection_formats=_collection_formats,
|
|
1932
|
+
_host=_host,
|
|
1933
|
+
_request_auth=_request_auth
|
|
1934
|
+
)
|
|
1935
|
+
|
|
1936
|
+
|