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