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,2466 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# Copyright (c) The OGX Contributors.
|
|
4
|
+
# All rights reserved.
|
|
5
|
+
#
|
|
6
|
+
# This source code is licensed under the terms described in the LICENSE file in
|
|
7
|
+
# the root directory of this source tree.
|
|
8
|
+
|
|
9
|
+
"""
|
|
10
|
+
OGX Specification - Stable & Experimental APIs
|
|
11
|
+
|
|
12
|
+
This is the specification of the OGX that provides a set of endpoints and their corresponding interfaces that are tailored to best leverage Llama Models. **🔗 COMBINED**: This specification includes both stable production-ready APIs and experimental pre-release APIs. Use stable APIs for production deployments and experimental APIs for testing new features.
|
|
13
|
+
|
|
14
|
+
The version of the OpenAPI document: v1
|
|
15
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
16
|
+
|
|
17
|
+
Do not edit the class manually.
|
|
18
|
+
""" # noqa: E501
|
|
19
|
+
|
|
20
|
+
import importlib
|
|
21
|
+
import json
|
|
22
|
+
import logging
|
|
23
|
+
import re
|
|
24
|
+
import sys
|
|
25
|
+
import warnings
|
|
26
|
+
|
|
27
|
+
from pydantic import validate_call, Field, SkipValidation, StrictFloat, StrictStr, StrictInt
|
|
28
|
+
from typing import Any
|
|
29
|
+
from typing_extensions import Annotated
|
|
30
|
+
|
|
31
|
+
from pydantic import Field, StrictInt, StrictStr
|
|
32
|
+
from typing import Any, Optional
|
|
33
|
+
from typing_extensions import Annotated
|
|
34
|
+
from ogx_open_client.models.anthropic_count_tokens_request import AnthropicCountTokensRequest
|
|
35
|
+
from ogx_open_client.models.anthropic_count_tokens_response import AnthropicCountTokensResponse
|
|
36
|
+
from ogx_open_client.models.anthropic_create_message_request import AnthropicCreateMessageRequest
|
|
37
|
+
from ogx_open_client.models.anthropic_message_response import AnthropicMessageResponse
|
|
38
|
+
from ogx_open_client.models.chat_completion_message_list import ChatCompletionMessageList
|
|
39
|
+
from ogx_open_client.models.create_message_batch_request import CreateMessageBatchRequest
|
|
40
|
+
from ogx_open_client.models.list_message_batches_response import ListMessageBatchesResponse
|
|
41
|
+
from ogx_open_client.models.message_batch import MessageBatch
|
|
42
|
+
|
|
43
|
+
from ogx_open_client.api_client import ApiClient, RequestSerialized
|
|
44
|
+
from ogx_open_client.api_response import ApiResponse
|
|
45
|
+
from ogx_open_client.rest import RESTResponseType
|
|
46
|
+
from ogx_open_client.stream import Stream
|
|
47
|
+
from ogx_open_client.lib._utils import pascal_to_snake_case
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class MessagesApi:
|
|
51
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
52
|
+
Ref: https://openapi-generator.tech
|
|
53
|
+
|
|
54
|
+
Do not edit the class manually.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
def __init__(self, api_client=None) -> None:
|
|
58
|
+
if api_client is None:
|
|
59
|
+
api_client = ApiClient.get_default()
|
|
60
|
+
self.api_client = api_client
|
|
61
|
+
self.logger = logging.getLogger(MessagesApi.__name__)
|
|
62
|
+
|
|
63
|
+
# Child API attributes (set by OgxClient based on x-nesting-path)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _create_event_stream(self, response_data: RESTResponseType, stream_type_name: str) -> Stream[Any]:
|
|
67
|
+
"""Create a typed event stream from an SSE response.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
response_data: The raw HTTP response containing the SSE stream.
|
|
71
|
+
stream_type_name: The schema name for the streaming response type
|
|
72
|
+
(e.g., 'OpenAIChatCompletionChunk', 'OpenAIResponseObjectStream').
|
|
73
|
+
"""
|
|
74
|
+
# Import the stream type class once
|
|
75
|
+
stream_class = None
|
|
76
|
+
discriminator_map = None
|
|
77
|
+
discriminator_property = None
|
|
78
|
+
try:
|
|
79
|
+
module_name = pascal_to_snake_case(stream_type_name)
|
|
80
|
+
model_module = importlib.import_module('ogx_open_client.models.' + module_name)
|
|
81
|
+
stream_class = getattr(model_module, stream_type_name)
|
|
82
|
+
# Check if the stream type has a discriminator (e.g., oneOf with propertyName)
|
|
83
|
+
discriminator_map = getattr(stream_class, 'discriminator_value_class_map', None)
|
|
84
|
+
discriminator_property = getattr(stream_class, 'discriminator_property_name', None)
|
|
85
|
+
except (ImportError, ModuleNotFoundError, AttributeError) as e:
|
|
86
|
+
self.logger.debug(f"Could not import stream type {stream_type_name}: {e}")
|
|
87
|
+
|
|
88
|
+
def stream_decoder(data_str: str) -> Any:
|
|
89
|
+
if not data_str:
|
|
90
|
+
return None
|
|
91
|
+
try:
|
|
92
|
+
data = json.loads(data_str)
|
|
93
|
+
except json.JSONDecodeError:
|
|
94
|
+
return data_str
|
|
95
|
+
|
|
96
|
+
# If we have a discriminator, resolve the specific variant class
|
|
97
|
+
if discriminator_map and discriminator_property:
|
|
98
|
+
disc_value = data.get(discriminator_property, '')
|
|
99
|
+
variant_class_name = discriminator_map.get(disc_value)
|
|
100
|
+
if variant_class_name:
|
|
101
|
+
try:
|
|
102
|
+
variant_module_name = pascal_to_snake_case(variant_class_name)
|
|
103
|
+
variant_module = importlib.import_module('ogx_open_client.models.' + variant_module_name)
|
|
104
|
+
variant_class = getattr(variant_module, variant_class_name)
|
|
105
|
+
return variant_class.from_dict(data)
|
|
106
|
+
except Exception as e:
|
|
107
|
+
self.logger.debug(f"Failed to deserialize as {variant_class_name}: {e}")
|
|
108
|
+
|
|
109
|
+
# Non-discriminated: deserialize as stream type directly
|
|
110
|
+
if stream_class is not None:
|
|
111
|
+
try:
|
|
112
|
+
result = stream_class.from_dict(data)
|
|
113
|
+
# Unwrap oneOf/anyOf wrappers
|
|
114
|
+
if hasattr(result, 'actual_instance') and result.actual_instance is not None:
|
|
115
|
+
return result.actual_instance
|
|
116
|
+
return result
|
|
117
|
+
except Exception as e:
|
|
118
|
+
self.logger.debug(f"Failed to deserialize as {stream_type_name}: {e}")
|
|
119
|
+
|
|
120
|
+
# Final fallback: return raw dict
|
|
121
|
+
return data
|
|
122
|
+
|
|
123
|
+
return Stream(
|
|
124
|
+
response=response_data.response,
|
|
125
|
+
client=self.api_client,
|
|
126
|
+
decoder=stream_decoder,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
@validate_call
|
|
131
|
+
def list(
|
|
132
|
+
self,
|
|
133
|
+
completion_id: Annotated[StrictStr, Field(description="The ID of the chat completion to retrieve messages from.")],
|
|
134
|
+
after: Annotated[Optional[StrictStr], Field(description="Identifier for the last message from the previous pagination request.")] = None,
|
|
135
|
+
limit: Annotated[Optional[StrictInt], Field(description="Number of messages to retrieve.")] = None,
|
|
136
|
+
order: Annotated[Optional[Any], Field(description="Sort order for messages by timestamp. Use \"asc\" or \"desc\". Defaults to \"asc\".")] = None,
|
|
137
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
138
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
139
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
140
|
+
] | None = None,
|
|
141
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
142
|
+
_content_type: StrictStr | None = None,
|
|
143
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
144
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
145
|
+
) -> ChatCompletionMessageList:
|
|
146
|
+
"""List chat completion messages.
|
|
147
|
+
|
|
148
|
+
Get the messages in a stored chat completion.
|
|
149
|
+
|
|
150
|
+
:param completion_id: The ID of the chat completion to retrieve messages from. (required)
|
|
151
|
+
:type completion_id: str
|
|
152
|
+
:param after: Identifier for the last message from the previous pagination request.
|
|
153
|
+
:type after: str
|
|
154
|
+
:param limit: Number of messages to retrieve.
|
|
155
|
+
:type limit: int
|
|
156
|
+
:param order: Sort order for messages by timestamp. Use \"asc\" or \"desc\". Defaults to \"asc\".
|
|
157
|
+
:type order: Order
|
|
158
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
159
|
+
number provided, it will be total request
|
|
160
|
+
timeout. It can also be a pair (tuple) of
|
|
161
|
+
(connection, read) timeouts.
|
|
162
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
163
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
164
|
+
request; this effectively ignores the
|
|
165
|
+
authentication in the spec for a single request.
|
|
166
|
+
:type _request_auth: dict, optional
|
|
167
|
+
:param _content_type: force content-type for the request.
|
|
168
|
+
:type _content_type: str, Optional
|
|
169
|
+
:param _headers: set to override the headers for a single
|
|
170
|
+
request; this effectively ignores the headers
|
|
171
|
+
in the spec for a single request.
|
|
172
|
+
:type _headers: dict, optional
|
|
173
|
+
:param _host_index: set to override the host_index for a single
|
|
174
|
+
request; this effectively ignores the host_index
|
|
175
|
+
in the spec for a single request.
|
|
176
|
+
:type _host_index: int, optional
|
|
177
|
+
:return: Returns the result object.
|
|
178
|
+
""" # noqa: E501
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
_param = self._list_serialize(
|
|
182
|
+
completion_id=completion_id,
|
|
183
|
+
after=after,
|
|
184
|
+
limit=limit,
|
|
185
|
+
order=order,
|
|
186
|
+
_request_auth=_request_auth,
|
|
187
|
+
_content_type=_content_type,
|
|
188
|
+
_headers=_headers,
|
|
189
|
+
_host_index=_host_index
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
_response_types_map: dict[str, str | None] = {
|
|
193
|
+
'200': "ChatCompletionMessageList",
|
|
194
|
+
'400': "Error",
|
|
195
|
+
'429': "Error",
|
|
196
|
+
'500': "Error",
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
response_data = self.api_client.call_api(
|
|
200
|
+
*_param,
|
|
201
|
+
_request_timeout=_request_timeout
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
response_data.read()
|
|
205
|
+
_deserialized = self.api_client.response_deserialize(
|
|
206
|
+
response_data=response_data,
|
|
207
|
+
response_types_map=_response_types_map,
|
|
208
|
+
).data
|
|
209
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
210
|
+
return _deserialized
|
|
211
|
+
|
|
212
|
+
@validate_call
|
|
213
|
+
def list_with_http_info(
|
|
214
|
+
self,
|
|
215
|
+
completion_id: Annotated[StrictStr, Field(description="The ID of the chat completion to retrieve messages from.")],
|
|
216
|
+
after: Annotated[Optional[StrictStr], Field(description="Identifier for the last message from the previous pagination request.")] = None,
|
|
217
|
+
limit: Annotated[Optional[StrictInt], Field(description="Number of messages to retrieve.")] = None,
|
|
218
|
+
order: Annotated[Optional[Any], Field(description="Sort order for messages by timestamp. Use \"asc\" or \"desc\". Defaults to \"asc\".")] = None,
|
|
219
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
220
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
221
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
222
|
+
] | None = None,
|
|
223
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
224
|
+
_content_type: StrictStr | None = None,
|
|
225
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
226
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
227
|
+
) -> ApiResponse[ChatCompletionMessageList]:
|
|
228
|
+
"""List chat completion messages.
|
|
229
|
+
|
|
230
|
+
Get the messages in a stored chat completion.
|
|
231
|
+
|
|
232
|
+
:param completion_id: The ID of the chat completion to retrieve messages from. (required)
|
|
233
|
+
:type completion_id: str
|
|
234
|
+
:param after: Identifier for the last message from the previous pagination request.
|
|
235
|
+
:type after: str
|
|
236
|
+
:param limit: Number of messages to retrieve.
|
|
237
|
+
:type limit: int
|
|
238
|
+
:param order: Sort order for messages by timestamp. Use \"asc\" or \"desc\". Defaults to \"asc\".
|
|
239
|
+
:type order: Order
|
|
240
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
241
|
+
number provided, it will be total request
|
|
242
|
+
timeout. It can also be a pair (tuple) of
|
|
243
|
+
(connection, read) timeouts.
|
|
244
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
245
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
246
|
+
request; this effectively ignores the
|
|
247
|
+
authentication in the spec for a single request.
|
|
248
|
+
:type _request_auth: dict, optional
|
|
249
|
+
:param _content_type: force content-type for the request.
|
|
250
|
+
:type _content_type: str, Optional
|
|
251
|
+
:param _headers: set to override the headers for a single
|
|
252
|
+
request; this effectively ignores the headers
|
|
253
|
+
in the spec for a single request.
|
|
254
|
+
:type _headers: dict, optional
|
|
255
|
+
:param _host_index: set to override the host_index for a single
|
|
256
|
+
request; this effectively ignores the host_index
|
|
257
|
+
in the spec for a single request.
|
|
258
|
+
:type _host_index: int, optional
|
|
259
|
+
:return: Returns the result object.
|
|
260
|
+
""" # noqa: E501
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
_param = self._list_serialize(
|
|
264
|
+
completion_id=completion_id,
|
|
265
|
+
after=after,
|
|
266
|
+
limit=limit,
|
|
267
|
+
order=order,
|
|
268
|
+
_request_auth=_request_auth,
|
|
269
|
+
_content_type=_content_type,
|
|
270
|
+
_headers=_headers,
|
|
271
|
+
_host_index=_host_index
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
_response_types_map: dict[str, str | None] = {
|
|
275
|
+
'200': "ChatCompletionMessageList",
|
|
276
|
+
'400': "Error",
|
|
277
|
+
'429': "Error",
|
|
278
|
+
'500': "Error",
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
response_data = self.api_client.call_api(
|
|
282
|
+
*_param,
|
|
283
|
+
_request_timeout=_request_timeout
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
response_data.read()
|
|
287
|
+
return self.api_client.response_deserialize(
|
|
288
|
+
response_data=response_data,
|
|
289
|
+
response_types_map=_response_types_map,
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
@validate_call
|
|
293
|
+
def list_without_preload_content(
|
|
294
|
+
self,
|
|
295
|
+
completion_id: Annotated[StrictStr, Field(description="The ID of the chat completion to retrieve messages from.")],
|
|
296
|
+
after: Annotated[Optional[StrictStr], Field(description="Identifier for the last message from the previous pagination request.")] = None,
|
|
297
|
+
limit: Annotated[Optional[StrictInt], Field(description="Number of messages to retrieve.")] = None,
|
|
298
|
+
order: Annotated[Optional[Any], Field(description="Sort order for messages by timestamp. Use \"asc\" or \"desc\". Defaults to \"asc\".")] = None,
|
|
299
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
300
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
301
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
302
|
+
] | None = None,
|
|
303
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
304
|
+
_content_type: StrictStr | None = None,
|
|
305
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
306
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
307
|
+
) -> RESTResponseType:
|
|
308
|
+
"""List chat completion messages.
|
|
309
|
+
|
|
310
|
+
Get the messages in a stored chat completion.
|
|
311
|
+
|
|
312
|
+
:param completion_id: The ID of the chat completion to retrieve messages from. (required)
|
|
313
|
+
:type completion_id: str
|
|
314
|
+
:param after: Identifier for the last message from the previous pagination request.
|
|
315
|
+
:type after: str
|
|
316
|
+
:param limit: Number of messages to retrieve.
|
|
317
|
+
:type limit: int
|
|
318
|
+
:param order: Sort order for messages by timestamp. Use \"asc\" or \"desc\". Defaults to \"asc\".
|
|
319
|
+
:type order: Order
|
|
320
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
321
|
+
number provided, it will be total request
|
|
322
|
+
timeout. It can also be a pair (tuple) of
|
|
323
|
+
(connection, read) timeouts.
|
|
324
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
325
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
326
|
+
request; this effectively ignores the
|
|
327
|
+
authentication in the spec for a single request.
|
|
328
|
+
:type _request_auth: dict, optional
|
|
329
|
+
:param _content_type: force content-type for the request.
|
|
330
|
+
:type _content_type: str, Optional
|
|
331
|
+
:param _headers: set to override the headers for a single
|
|
332
|
+
request; this effectively ignores the headers
|
|
333
|
+
in the spec for a single request.
|
|
334
|
+
:type _headers: dict, optional
|
|
335
|
+
:param _host_index: set to override the host_index for a single
|
|
336
|
+
request; this effectively ignores the host_index
|
|
337
|
+
in the spec for a single request.
|
|
338
|
+
:type _host_index: int, optional
|
|
339
|
+
:return: Returns the result object.
|
|
340
|
+
""" # noqa: E501
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
_param = self._list_serialize(
|
|
344
|
+
completion_id=completion_id,
|
|
345
|
+
after=after,
|
|
346
|
+
limit=limit,
|
|
347
|
+
order=order,
|
|
348
|
+
_request_auth=_request_auth,
|
|
349
|
+
_content_type=_content_type,
|
|
350
|
+
_headers=_headers,
|
|
351
|
+
_host_index=_host_index
|
|
352
|
+
)
|
|
353
|
+
|
|
354
|
+
_response_types_map: dict[str, str | None] = {
|
|
355
|
+
'200': "ChatCompletionMessageList",
|
|
356
|
+
'400': "Error",
|
|
357
|
+
'429': "Error",
|
|
358
|
+
'500': "Error",
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
response_data = self.api_client.call_api(
|
|
362
|
+
*_param,
|
|
363
|
+
_request_timeout=_request_timeout
|
|
364
|
+
)
|
|
365
|
+
return response_data.response
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
def _list_serialize(
|
|
369
|
+
self,
|
|
370
|
+
completion_id,
|
|
371
|
+
after,
|
|
372
|
+
limit,
|
|
373
|
+
order,
|
|
374
|
+
_request_auth,
|
|
375
|
+
_content_type,
|
|
376
|
+
_headers,
|
|
377
|
+
_host_index,
|
|
378
|
+
) -> RequestSerialized:
|
|
379
|
+
|
|
380
|
+
_host = None
|
|
381
|
+
|
|
382
|
+
_collection_formats: dict[str, str] = {
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
_path_params: dict[str, str] = {}
|
|
386
|
+
_query_params: list[tuple[str, str]] = []
|
|
387
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
388
|
+
_form_params: list[tuple[str, str]] = []
|
|
389
|
+
_files: dict[
|
|
390
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
391
|
+
] = {}
|
|
392
|
+
_body_params: bytes | None = None
|
|
393
|
+
|
|
394
|
+
# process the path parameters
|
|
395
|
+
if completion_id is not None:
|
|
396
|
+
_path_params['completion_id'] = completion_id
|
|
397
|
+
# process the query parameters
|
|
398
|
+
if after is not None:
|
|
399
|
+
|
|
400
|
+
_query_params.append(('after', after))
|
|
401
|
+
|
|
402
|
+
if limit is not None:
|
|
403
|
+
|
|
404
|
+
_query_params.append(('limit', limit))
|
|
405
|
+
|
|
406
|
+
if order is not None:
|
|
407
|
+
|
|
408
|
+
_query_params.append(('order', order.value))
|
|
409
|
+
|
|
410
|
+
# process the header parameters
|
|
411
|
+
# process the form parameters
|
|
412
|
+
# process the body parameter
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
# set the HTTP header `Accept`
|
|
416
|
+
if 'Accept' not in _header_params:
|
|
417
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
418
|
+
[
|
|
419
|
+
'application/json'
|
|
420
|
+
]
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
# authentication setting
|
|
425
|
+
_auth_settings: list[str] = [
|
|
426
|
+
]
|
|
427
|
+
|
|
428
|
+
return self.api_client.param_serialize(
|
|
429
|
+
method='GET',
|
|
430
|
+
resource_path='/v1/chat/completions/{completion_id}/messages',
|
|
431
|
+
path_params=_path_params,
|
|
432
|
+
query_params=_query_params,
|
|
433
|
+
header_params=_header_params,
|
|
434
|
+
body=_body_params,
|
|
435
|
+
post_params=_form_params,
|
|
436
|
+
files=_files,
|
|
437
|
+
auth_settings=_auth_settings,
|
|
438
|
+
collection_formats=_collection_formats,
|
|
439
|
+
_host=_host,
|
|
440
|
+
_request_auth=_request_auth
|
|
441
|
+
)
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
@validate_call
|
|
446
|
+
def message_batch_results_v1_messages_batches_message_batch_id_results_get(
|
|
447
|
+
self,
|
|
448
|
+
message_batch_id: StrictStr,
|
|
449
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
450
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
451
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
452
|
+
] | None = None,
|
|
453
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
454
|
+
_content_type: StrictStr | None = None,
|
|
455
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
456
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
457
|
+
) -> None:
|
|
458
|
+
"""Retrieve Message Batch results.
|
|
459
|
+
|
|
460
|
+
Stream the results of a Message Batch as JSONL.
|
|
461
|
+
|
|
462
|
+
:param message_batch_id: (required)
|
|
463
|
+
:type message_batch_id: str
|
|
464
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
465
|
+
number provided, it will be total request
|
|
466
|
+
timeout. It can also be a pair (tuple) of
|
|
467
|
+
(connection, read) timeouts.
|
|
468
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
469
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
470
|
+
request; this effectively ignores the
|
|
471
|
+
authentication in the spec for a single request.
|
|
472
|
+
:type _request_auth: dict, optional
|
|
473
|
+
:param _content_type: force content-type for the request.
|
|
474
|
+
:type _content_type: str, Optional
|
|
475
|
+
:param _headers: set to override the headers for a single
|
|
476
|
+
request; this effectively ignores the headers
|
|
477
|
+
in the spec for a single request.
|
|
478
|
+
:type _headers: dict, optional
|
|
479
|
+
:param _host_index: set to override the host_index for a single
|
|
480
|
+
request; this effectively ignores the host_index
|
|
481
|
+
in the spec for a single request.
|
|
482
|
+
:type _host_index: int, optional
|
|
483
|
+
:return: Returns the result object.
|
|
484
|
+
""" # noqa: E501
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
_param = self._message_batch_results_v1_messages_batches_message_batch_id_results_get_serialize(
|
|
488
|
+
message_batch_id=message_batch_id,
|
|
489
|
+
_request_auth=_request_auth,
|
|
490
|
+
_content_type=_content_type,
|
|
491
|
+
_headers=_headers,
|
|
492
|
+
_host_index=_host_index
|
|
493
|
+
)
|
|
494
|
+
|
|
495
|
+
_response_types_map: dict[str, str | None] = {
|
|
496
|
+
'400': "Error",
|
|
497
|
+
'429': "Error",
|
|
498
|
+
'500': "Error",
|
|
499
|
+
'204': None,
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
response_data = self.api_client.call_api(
|
|
503
|
+
*_param,
|
|
504
|
+
_request_timeout=_request_timeout
|
|
505
|
+
)
|
|
506
|
+
|
|
507
|
+
response_data.read()
|
|
508
|
+
_deserialized = self.api_client.response_deserialize(
|
|
509
|
+
response_data=response_data,
|
|
510
|
+
response_types_map=_response_types_map,
|
|
511
|
+
).data
|
|
512
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
513
|
+
return _deserialized
|
|
514
|
+
|
|
515
|
+
@validate_call
|
|
516
|
+
def message_batch_results_v1_messages_batches_message_batch_id_results_get_with_http_info(
|
|
517
|
+
self,
|
|
518
|
+
message_batch_id: StrictStr,
|
|
519
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
520
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
521
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
522
|
+
] | None = None,
|
|
523
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
524
|
+
_content_type: StrictStr | None = None,
|
|
525
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
526
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
527
|
+
) -> ApiResponse[None]:
|
|
528
|
+
"""Retrieve Message Batch results.
|
|
529
|
+
|
|
530
|
+
Stream the results of a Message Batch as JSONL.
|
|
531
|
+
|
|
532
|
+
:param message_batch_id: (required)
|
|
533
|
+
:type message_batch_id: str
|
|
534
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
535
|
+
number provided, it will be total request
|
|
536
|
+
timeout. It can also be a pair (tuple) of
|
|
537
|
+
(connection, read) timeouts.
|
|
538
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
539
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
540
|
+
request; this effectively ignores the
|
|
541
|
+
authentication in the spec for a single request.
|
|
542
|
+
:type _request_auth: dict, optional
|
|
543
|
+
:param _content_type: force content-type for the request.
|
|
544
|
+
:type _content_type: str, Optional
|
|
545
|
+
:param _headers: set to override the headers for a single
|
|
546
|
+
request; this effectively ignores the headers
|
|
547
|
+
in the spec for a single request.
|
|
548
|
+
:type _headers: dict, optional
|
|
549
|
+
:param _host_index: set to override the host_index for a single
|
|
550
|
+
request; this effectively ignores the host_index
|
|
551
|
+
in the spec for a single request.
|
|
552
|
+
:type _host_index: int, optional
|
|
553
|
+
:return: Returns the result object.
|
|
554
|
+
""" # noqa: E501
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
_param = self._message_batch_results_v1_messages_batches_message_batch_id_results_get_serialize(
|
|
558
|
+
message_batch_id=message_batch_id,
|
|
559
|
+
_request_auth=_request_auth,
|
|
560
|
+
_content_type=_content_type,
|
|
561
|
+
_headers=_headers,
|
|
562
|
+
_host_index=_host_index
|
|
563
|
+
)
|
|
564
|
+
|
|
565
|
+
_response_types_map: dict[str, str | None] = {
|
|
566
|
+
'400': "Error",
|
|
567
|
+
'429': "Error",
|
|
568
|
+
'500': "Error",
|
|
569
|
+
'204': None,
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
response_data = self.api_client.call_api(
|
|
573
|
+
*_param,
|
|
574
|
+
_request_timeout=_request_timeout
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
response_data.read()
|
|
578
|
+
return self.api_client.response_deserialize(
|
|
579
|
+
response_data=response_data,
|
|
580
|
+
response_types_map=_response_types_map,
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
@validate_call
|
|
584
|
+
def message_batch_results_v1_messages_batches_message_batch_id_results_get_without_preload_content(
|
|
585
|
+
self,
|
|
586
|
+
message_batch_id: StrictStr,
|
|
587
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
589
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
590
|
+
] | None = None,
|
|
591
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
592
|
+
_content_type: StrictStr | None = None,
|
|
593
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
594
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
595
|
+
) -> RESTResponseType:
|
|
596
|
+
"""Retrieve Message Batch results.
|
|
597
|
+
|
|
598
|
+
Stream the results of a Message Batch as JSONL.
|
|
599
|
+
|
|
600
|
+
:param message_batch_id: (required)
|
|
601
|
+
:type message_batch_id: str
|
|
602
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
603
|
+
number provided, it will be total request
|
|
604
|
+
timeout. It can also be a pair (tuple) of
|
|
605
|
+
(connection, read) timeouts.
|
|
606
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
607
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
608
|
+
request; this effectively ignores the
|
|
609
|
+
authentication in the spec for a single request.
|
|
610
|
+
:type _request_auth: dict, optional
|
|
611
|
+
:param _content_type: force content-type for the request.
|
|
612
|
+
:type _content_type: str, Optional
|
|
613
|
+
:param _headers: set to override the headers for a single
|
|
614
|
+
request; this effectively ignores the headers
|
|
615
|
+
in the spec for a single request.
|
|
616
|
+
:type _headers: dict, optional
|
|
617
|
+
:param _host_index: set to override the host_index for a single
|
|
618
|
+
request; this effectively ignores the host_index
|
|
619
|
+
in the spec for a single request.
|
|
620
|
+
:type _host_index: int, optional
|
|
621
|
+
:return: Returns the result object.
|
|
622
|
+
""" # noqa: E501
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
_param = self._message_batch_results_v1_messages_batches_message_batch_id_results_get_serialize(
|
|
626
|
+
message_batch_id=message_batch_id,
|
|
627
|
+
_request_auth=_request_auth,
|
|
628
|
+
_content_type=_content_type,
|
|
629
|
+
_headers=_headers,
|
|
630
|
+
_host_index=_host_index
|
|
631
|
+
)
|
|
632
|
+
|
|
633
|
+
_response_types_map: dict[str, str | None] = {
|
|
634
|
+
'400': "Error",
|
|
635
|
+
'429': "Error",
|
|
636
|
+
'500': "Error",
|
|
637
|
+
'204': None,
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
response_data = self.api_client.call_api(
|
|
641
|
+
*_param,
|
|
642
|
+
_request_timeout=_request_timeout
|
|
643
|
+
)
|
|
644
|
+
return response_data.response
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
def _message_batch_results_v1_messages_batches_message_batch_id_results_get_serialize(
|
|
648
|
+
self,
|
|
649
|
+
message_batch_id,
|
|
650
|
+
_request_auth,
|
|
651
|
+
_content_type,
|
|
652
|
+
_headers,
|
|
653
|
+
_host_index,
|
|
654
|
+
) -> RequestSerialized:
|
|
655
|
+
|
|
656
|
+
_host = None
|
|
657
|
+
|
|
658
|
+
_collection_formats: dict[str, str] = {
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
_path_params: dict[str, str] = {}
|
|
662
|
+
_query_params: list[tuple[str, str]] = []
|
|
663
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
664
|
+
_form_params: list[tuple[str, str]] = []
|
|
665
|
+
_files: dict[
|
|
666
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
667
|
+
] = {}
|
|
668
|
+
_body_params: bytes | None = None
|
|
669
|
+
|
|
670
|
+
# process the path parameters
|
|
671
|
+
if message_batch_id is not None:
|
|
672
|
+
_path_params['message_batch_id'] = message_batch_id
|
|
673
|
+
# process the query parameters
|
|
674
|
+
# process the header parameters
|
|
675
|
+
# process the form parameters
|
|
676
|
+
# process the body parameter
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
# set the HTTP header `Accept`
|
|
680
|
+
if 'Accept' not in _header_params:
|
|
681
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
682
|
+
[
|
|
683
|
+
'application/json'
|
|
684
|
+
]
|
|
685
|
+
)
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
# authentication setting
|
|
689
|
+
_auth_settings: list[str] = [
|
|
690
|
+
]
|
|
691
|
+
|
|
692
|
+
return self.api_client.param_serialize(
|
|
693
|
+
method='GET',
|
|
694
|
+
resource_path='/v1/messages/batches/{message_batch_id}/results',
|
|
695
|
+
path_params=_path_params,
|
|
696
|
+
query_params=_query_params,
|
|
697
|
+
header_params=_header_params,
|
|
698
|
+
body=_body_params,
|
|
699
|
+
post_params=_form_params,
|
|
700
|
+
files=_files,
|
|
701
|
+
auth_settings=_auth_settings,
|
|
702
|
+
collection_formats=_collection_formats,
|
|
703
|
+
_host=_host,
|
|
704
|
+
_request_auth=_request_auth
|
|
705
|
+
)
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
@validate_call
|
|
710
|
+
def message_batch_v1_messages_batches_message_batch_id_cancel_post(
|
|
711
|
+
self,
|
|
712
|
+
message_batch_id: StrictStr,
|
|
713
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
714
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
715
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
716
|
+
] | None = None,
|
|
717
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
718
|
+
_content_type: StrictStr | None = None,
|
|
719
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
720
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
721
|
+
) -> MessageBatch:
|
|
722
|
+
"""Cancel a Message Batch.
|
|
723
|
+
|
|
724
|
+
Cancel a Message Batch before processing ends.
|
|
725
|
+
|
|
726
|
+
:param message_batch_id: (required)
|
|
727
|
+
:type message_batch_id: str
|
|
728
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
729
|
+
number provided, it will be total request
|
|
730
|
+
timeout. It can also be a pair (tuple) of
|
|
731
|
+
(connection, read) timeouts.
|
|
732
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
733
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
734
|
+
request; this effectively ignores the
|
|
735
|
+
authentication in the spec for a single request.
|
|
736
|
+
:type _request_auth: dict, optional
|
|
737
|
+
:param _content_type: force content-type for the request.
|
|
738
|
+
:type _content_type: str, Optional
|
|
739
|
+
:param _headers: set to override the headers for a single
|
|
740
|
+
request; this effectively ignores the headers
|
|
741
|
+
in the spec for a single request.
|
|
742
|
+
:type _headers: dict, optional
|
|
743
|
+
:param _host_index: set to override the host_index for a single
|
|
744
|
+
request; this effectively ignores the host_index
|
|
745
|
+
in the spec for a single request.
|
|
746
|
+
:type _host_index: int, optional
|
|
747
|
+
:return: Returns the result object.
|
|
748
|
+
""" # noqa: E501
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
_param = self._message_batch_v1_messages_batches_message_batch_id_cancel_post_serialize(
|
|
752
|
+
message_batch_id=message_batch_id,
|
|
753
|
+
_request_auth=_request_auth,
|
|
754
|
+
_content_type=_content_type,
|
|
755
|
+
_headers=_headers,
|
|
756
|
+
_host_index=_host_index
|
|
757
|
+
)
|
|
758
|
+
|
|
759
|
+
_response_types_map: dict[str, str | None] = {
|
|
760
|
+
'200': "MessageBatch",
|
|
761
|
+
'400': "Error",
|
|
762
|
+
'429': "Error",
|
|
763
|
+
'500': "Error",
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
response_data = self.api_client.call_api(
|
|
767
|
+
*_param,
|
|
768
|
+
_request_timeout=_request_timeout
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
response_data.read()
|
|
772
|
+
_deserialized = self.api_client.response_deserialize(
|
|
773
|
+
response_data=response_data,
|
|
774
|
+
response_types_map=_response_types_map,
|
|
775
|
+
).data
|
|
776
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
777
|
+
return _deserialized
|
|
778
|
+
|
|
779
|
+
@validate_call
|
|
780
|
+
def message_batch_v1_messages_batches_message_batch_id_cancel_post_with_http_info(
|
|
781
|
+
self,
|
|
782
|
+
message_batch_id: StrictStr,
|
|
783
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
784
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
785
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
786
|
+
] | None = None,
|
|
787
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
788
|
+
_content_type: StrictStr | None = None,
|
|
789
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
790
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
791
|
+
) -> ApiResponse[MessageBatch]:
|
|
792
|
+
"""Cancel a Message Batch.
|
|
793
|
+
|
|
794
|
+
Cancel a Message Batch before processing ends.
|
|
795
|
+
|
|
796
|
+
:param message_batch_id: (required)
|
|
797
|
+
:type message_batch_id: str
|
|
798
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
799
|
+
number provided, it will be total request
|
|
800
|
+
timeout. It can also be a pair (tuple) of
|
|
801
|
+
(connection, read) timeouts.
|
|
802
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
803
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
804
|
+
request; this effectively ignores the
|
|
805
|
+
authentication in the spec for a single request.
|
|
806
|
+
:type _request_auth: dict, optional
|
|
807
|
+
:param _content_type: force content-type for the request.
|
|
808
|
+
:type _content_type: str, Optional
|
|
809
|
+
:param _headers: set to override the headers for a single
|
|
810
|
+
request; this effectively ignores the headers
|
|
811
|
+
in the spec for a single request.
|
|
812
|
+
:type _headers: dict, optional
|
|
813
|
+
:param _host_index: set to override the host_index for a single
|
|
814
|
+
request; this effectively ignores the host_index
|
|
815
|
+
in the spec for a single request.
|
|
816
|
+
:type _host_index: int, optional
|
|
817
|
+
:return: Returns the result object.
|
|
818
|
+
""" # noqa: E501
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
_param = self._message_batch_v1_messages_batches_message_batch_id_cancel_post_serialize(
|
|
822
|
+
message_batch_id=message_batch_id,
|
|
823
|
+
_request_auth=_request_auth,
|
|
824
|
+
_content_type=_content_type,
|
|
825
|
+
_headers=_headers,
|
|
826
|
+
_host_index=_host_index
|
|
827
|
+
)
|
|
828
|
+
|
|
829
|
+
_response_types_map: dict[str, str | None] = {
|
|
830
|
+
'200': "MessageBatch",
|
|
831
|
+
'400': "Error",
|
|
832
|
+
'429': "Error",
|
|
833
|
+
'500': "Error",
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
response_data = self.api_client.call_api(
|
|
837
|
+
*_param,
|
|
838
|
+
_request_timeout=_request_timeout
|
|
839
|
+
)
|
|
840
|
+
|
|
841
|
+
response_data.read()
|
|
842
|
+
return self.api_client.response_deserialize(
|
|
843
|
+
response_data=response_data,
|
|
844
|
+
response_types_map=_response_types_map,
|
|
845
|
+
)
|
|
846
|
+
|
|
847
|
+
@validate_call
|
|
848
|
+
def message_batch_v1_messages_batches_message_batch_id_cancel_post_without_preload_content(
|
|
849
|
+
self,
|
|
850
|
+
message_batch_id: StrictStr,
|
|
851
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
852
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
853
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
854
|
+
] | None = None,
|
|
855
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
856
|
+
_content_type: StrictStr | None = None,
|
|
857
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
858
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
859
|
+
) -> RESTResponseType:
|
|
860
|
+
"""Cancel a Message Batch.
|
|
861
|
+
|
|
862
|
+
Cancel a Message Batch before processing ends.
|
|
863
|
+
|
|
864
|
+
:param message_batch_id: (required)
|
|
865
|
+
:type message_batch_id: str
|
|
866
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
867
|
+
number provided, it will be total request
|
|
868
|
+
timeout. It can also be a pair (tuple) of
|
|
869
|
+
(connection, read) timeouts.
|
|
870
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
871
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
872
|
+
request; this effectively ignores the
|
|
873
|
+
authentication in the spec for a single request.
|
|
874
|
+
:type _request_auth: dict, optional
|
|
875
|
+
:param _content_type: force content-type for the request.
|
|
876
|
+
:type _content_type: str, Optional
|
|
877
|
+
:param _headers: set to override the headers for a single
|
|
878
|
+
request; this effectively ignores the headers
|
|
879
|
+
in the spec for a single request.
|
|
880
|
+
:type _headers: dict, optional
|
|
881
|
+
:param _host_index: set to override the host_index for a single
|
|
882
|
+
request; this effectively ignores the host_index
|
|
883
|
+
in the spec for a single request.
|
|
884
|
+
:type _host_index: int, optional
|
|
885
|
+
:return: Returns the result object.
|
|
886
|
+
""" # noqa: E501
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
_param = self._message_batch_v1_messages_batches_message_batch_id_cancel_post_serialize(
|
|
890
|
+
message_batch_id=message_batch_id,
|
|
891
|
+
_request_auth=_request_auth,
|
|
892
|
+
_content_type=_content_type,
|
|
893
|
+
_headers=_headers,
|
|
894
|
+
_host_index=_host_index
|
|
895
|
+
)
|
|
896
|
+
|
|
897
|
+
_response_types_map: dict[str, str | None] = {
|
|
898
|
+
'200': "MessageBatch",
|
|
899
|
+
'400': "Error",
|
|
900
|
+
'429': "Error",
|
|
901
|
+
'500': "Error",
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
response_data = self.api_client.call_api(
|
|
905
|
+
*_param,
|
|
906
|
+
_request_timeout=_request_timeout
|
|
907
|
+
)
|
|
908
|
+
return response_data.response
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
def _message_batch_v1_messages_batches_message_batch_id_cancel_post_serialize(
|
|
912
|
+
self,
|
|
913
|
+
message_batch_id,
|
|
914
|
+
_request_auth,
|
|
915
|
+
_content_type,
|
|
916
|
+
_headers,
|
|
917
|
+
_host_index,
|
|
918
|
+
) -> RequestSerialized:
|
|
919
|
+
|
|
920
|
+
_host = None
|
|
921
|
+
|
|
922
|
+
_collection_formats: dict[str, str] = {
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
_path_params: dict[str, str] = {}
|
|
926
|
+
_query_params: list[tuple[str, str]] = []
|
|
927
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
928
|
+
_form_params: list[tuple[str, str]] = []
|
|
929
|
+
_files: dict[
|
|
930
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
931
|
+
] = {}
|
|
932
|
+
_body_params: bytes | None = None
|
|
933
|
+
|
|
934
|
+
# process the path parameters
|
|
935
|
+
if message_batch_id is not None:
|
|
936
|
+
_path_params['message_batch_id'] = message_batch_id
|
|
937
|
+
# process the query parameters
|
|
938
|
+
# process the header parameters
|
|
939
|
+
# process the form parameters
|
|
940
|
+
# process the body parameter
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
# set the HTTP header `Accept`
|
|
944
|
+
if 'Accept' not in _header_params:
|
|
945
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
946
|
+
[
|
|
947
|
+
'application/json'
|
|
948
|
+
]
|
|
949
|
+
)
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
# authentication setting
|
|
953
|
+
_auth_settings: list[str] = [
|
|
954
|
+
]
|
|
955
|
+
|
|
956
|
+
return self.api_client.param_serialize(
|
|
957
|
+
method='POST',
|
|
958
|
+
resource_path='/v1/messages/batches/{message_batch_id}/cancel',
|
|
959
|
+
path_params=_path_params,
|
|
960
|
+
query_params=_query_params,
|
|
961
|
+
header_params=_header_params,
|
|
962
|
+
body=_body_params,
|
|
963
|
+
post_params=_form_params,
|
|
964
|
+
files=_files,
|
|
965
|
+
auth_settings=_auth_settings,
|
|
966
|
+
collection_formats=_collection_formats,
|
|
967
|
+
_host=_host,
|
|
968
|
+
_request_auth=_request_auth
|
|
969
|
+
)
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
@validate_call
|
|
974
|
+
def message_batch_v1_messages_batches_message_batch_id_get(
|
|
975
|
+
self,
|
|
976
|
+
message_batch_id: StrictStr,
|
|
977
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
978
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
979
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
980
|
+
] | None = None,
|
|
981
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
982
|
+
_content_type: StrictStr | None = None,
|
|
983
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
984
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
985
|
+
) -> MessageBatch:
|
|
986
|
+
"""Retrieve a Message Batch.
|
|
987
|
+
|
|
988
|
+
Retrieve the status of a Message Batch by its ID.
|
|
989
|
+
|
|
990
|
+
:param message_batch_id: (required)
|
|
991
|
+
:type message_batch_id: str
|
|
992
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
993
|
+
number provided, it will be total request
|
|
994
|
+
timeout. It can also be a pair (tuple) of
|
|
995
|
+
(connection, read) timeouts.
|
|
996
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
997
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
998
|
+
request; this effectively ignores the
|
|
999
|
+
authentication in the spec for a single request.
|
|
1000
|
+
:type _request_auth: dict, optional
|
|
1001
|
+
:param _content_type: force content-type for the request.
|
|
1002
|
+
:type _content_type: str, Optional
|
|
1003
|
+
:param _headers: set to override the headers for a single
|
|
1004
|
+
request; this effectively ignores the headers
|
|
1005
|
+
in the spec for a single request.
|
|
1006
|
+
:type _headers: dict, optional
|
|
1007
|
+
:param _host_index: set to override the host_index for a single
|
|
1008
|
+
request; this effectively ignores the host_index
|
|
1009
|
+
in the spec for a single request.
|
|
1010
|
+
:type _host_index: int, optional
|
|
1011
|
+
:return: Returns the result object.
|
|
1012
|
+
""" # noqa: E501
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
_param = self._message_batch_v1_messages_batches_message_batch_id_get_serialize(
|
|
1016
|
+
message_batch_id=message_batch_id,
|
|
1017
|
+
_request_auth=_request_auth,
|
|
1018
|
+
_content_type=_content_type,
|
|
1019
|
+
_headers=_headers,
|
|
1020
|
+
_host_index=_host_index
|
|
1021
|
+
)
|
|
1022
|
+
|
|
1023
|
+
_response_types_map: dict[str, str | None] = {
|
|
1024
|
+
'200': "MessageBatch",
|
|
1025
|
+
'400': "Error",
|
|
1026
|
+
'429': "Error",
|
|
1027
|
+
'500': "Error",
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
response_data = self.api_client.call_api(
|
|
1031
|
+
*_param,
|
|
1032
|
+
_request_timeout=_request_timeout
|
|
1033
|
+
)
|
|
1034
|
+
|
|
1035
|
+
response_data.read()
|
|
1036
|
+
_deserialized = self.api_client.response_deserialize(
|
|
1037
|
+
response_data=response_data,
|
|
1038
|
+
response_types_map=_response_types_map,
|
|
1039
|
+
).data
|
|
1040
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
1041
|
+
return _deserialized
|
|
1042
|
+
|
|
1043
|
+
@validate_call
|
|
1044
|
+
def message_batch_v1_messages_batches_message_batch_id_get_with_http_info(
|
|
1045
|
+
self,
|
|
1046
|
+
message_batch_id: StrictStr,
|
|
1047
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1048
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1049
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1050
|
+
] | None = None,
|
|
1051
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1052
|
+
_content_type: StrictStr | None = None,
|
|
1053
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1054
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
1055
|
+
) -> ApiResponse[MessageBatch]:
|
|
1056
|
+
"""Retrieve a Message Batch.
|
|
1057
|
+
|
|
1058
|
+
Retrieve the status of a Message Batch by its ID.
|
|
1059
|
+
|
|
1060
|
+
:param message_batch_id: (required)
|
|
1061
|
+
:type message_batch_id: str
|
|
1062
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1063
|
+
number provided, it will be total request
|
|
1064
|
+
timeout. It can also be a pair (tuple) of
|
|
1065
|
+
(connection, read) timeouts.
|
|
1066
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1067
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1068
|
+
request; this effectively ignores the
|
|
1069
|
+
authentication in the spec for a single request.
|
|
1070
|
+
:type _request_auth: dict, optional
|
|
1071
|
+
:param _content_type: force content-type for the request.
|
|
1072
|
+
:type _content_type: str, Optional
|
|
1073
|
+
:param _headers: set to override the headers for a single
|
|
1074
|
+
request; this effectively ignores the headers
|
|
1075
|
+
in the spec for a single request.
|
|
1076
|
+
:type _headers: dict, optional
|
|
1077
|
+
:param _host_index: set to override the host_index for a single
|
|
1078
|
+
request; this effectively ignores the host_index
|
|
1079
|
+
in the spec for a single request.
|
|
1080
|
+
:type _host_index: int, optional
|
|
1081
|
+
:return: Returns the result object.
|
|
1082
|
+
""" # noqa: E501
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
_param = self._message_batch_v1_messages_batches_message_batch_id_get_serialize(
|
|
1086
|
+
message_batch_id=message_batch_id,
|
|
1087
|
+
_request_auth=_request_auth,
|
|
1088
|
+
_content_type=_content_type,
|
|
1089
|
+
_headers=_headers,
|
|
1090
|
+
_host_index=_host_index
|
|
1091
|
+
)
|
|
1092
|
+
|
|
1093
|
+
_response_types_map: dict[str, str | None] = {
|
|
1094
|
+
'200': "MessageBatch",
|
|
1095
|
+
'400': "Error",
|
|
1096
|
+
'429': "Error",
|
|
1097
|
+
'500': "Error",
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
response_data = self.api_client.call_api(
|
|
1101
|
+
*_param,
|
|
1102
|
+
_request_timeout=_request_timeout
|
|
1103
|
+
)
|
|
1104
|
+
|
|
1105
|
+
response_data.read()
|
|
1106
|
+
return self.api_client.response_deserialize(
|
|
1107
|
+
response_data=response_data,
|
|
1108
|
+
response_types_map=_response_types_map,
|
|
1109
|
+
)
|
|
1110
|
+
|
|
1111
|
+
@validate_call
|
|
1112
|
+
def message_batch_v1_messages_batches_message_batch_id_get_without_preload_content(
|
|
1113
|
+
self,
|
|
1114
|
+
message_batch_id: StrictStr,
|
|
1115
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1116
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1117
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1118
|
+
] | None = None,
|
|
1119
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1120
|
+
_content_type: StrictStr | None = None,
|
|
1121
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1122
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
1123
|
+
) -> RESTResponseType:
|
|
1124
|
+
"""Retrieve a Message Batch.
|
|
1125
|
+
|
|
1126
|
+
Retrieve the status of a Message Batch by its ID.
|
|
1127
|
+
|
|
1128
|
+
:param message_batch_id: (required)
|
|
1129
|
+
:type message_batch_id: str
|
|
1130
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1131
|
+
number provided, it will be total request
|
|
1132
|
+
timeout. It can also be a pair (tuple) of
|
|
1133
|
+
(connection, read) timeouts.
|
|
1134
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1135
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1136
|
+
request; this effectively ignores the
|
|
1137
|
+
authentication in the spec for a single request.
|
|
1138
|
+
:type _request_auth: dict, optional
|
|
1139
|
+
:param _content_type: force content-type for the request.
|
|
1140
|
+
:type _content_type: str, Optional
|
|
1141
|
+
:param _headers: set to override the headers for a single
|
|
1142
|
+
request; this effectively ignores the headers
|
|
1143
|
+
in the spec for a single request.
|
|
1144
|
+
:type _headers: dict, optional
|
|
1145
|
+
:param _host_index: set to override the host_index for a single
|
|
1146
|
+
request; this effectively ignores the host_index
|
|
1147
|
+
in the spec for a single request.
|
|
1148
|
+
:type _host_index: int, optional
|
|
1149
|
+
:return: Returns the result object.
|
|
1150
|
+
""" # noqa: E501
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
_param = self._message_batch_v1_messages_batches_message_batch_id_get_serialize(
|
|
1154
|
+
message_batch_id=message_batch_id,
|
|
1155
|
+
_request_auth=_request_auth,
|
|
1156
|
+
_content_type=_content_type,
|
|
1157
|
+
_headers=_headers,
|
|
1158
|
+
_host_index=_host_index
|
|
1159
|
+
)
|
|
1160
|
+
|
|
1161
|
+
_response_types_map: dict[str, str | None] = {
|
|
1162
|
+
'200': "MessageBatch",
|
|
1163
|
+
'400': "Error",
|
|
1164
|
+
'429': "Error",
|
|
1165
|
+
'500': "Error",
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
response_data = self.api_client.call_api(
|
|
1169
|
+
*_param,
|
|
1170
|
+
_request_timeout=_request_timeout
|
|
1171
|
+
)
|
|
1172
|
+
return response_data.response
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
def _message_batch_v1_messages_batches_message_batch_id_get_serialize(
|
|
1176
|
+
self,
|
|
1177
|
+
message_batch_id,
|
|
1178
|
+
_request_auth,
|
|
1179
|
+
_content_type,
|
|
1180
|
+
_headers,
|
|
1181
|
+
_host_index,
|
|
1182
|
+
) -> RequestSerialized:
|
|
1183
|
+
|
|
1184
|
+
_host = None
|
|
1185
|
+
|
|
1186
|
+
_collection_formats: dict[str, str] = {
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
_path_params: dict[str, str] = {}
|
|
1190
|
+
_query_params: list[tuple[str, str]] = []
|
|
1191
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
1192
|
+
_form_params: list[tuple[str, str]] = []
|
|
1193
|
+
_files: dict[
|
|
1194
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
1195
|
+
] = {}
|
|
1196
|
+
_body_params: bytes | None = None
|
|
1197
|
+
|
|
1198
|
+
# process the path parameters
|
|
1199
|
+
if message_batch_id is not None:
|
|
1200
|
+
_path_params['message_batch_id'] = message_batch_id
|
|
1201
|
+
# process the query parameters
|
|
1202
|
+
# process the header parameters
|
|
1203
|
+
# process the form parameters
|
|
1204
|
+
# process the body parameter
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
# set the HTTP header `Accept`
|
|
1208
|
+
if 'Accept' not in _header_params:
|
|
1209
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1210
|
+
[
|
|
1211
|
+
'application/json'
|
|
1212
|
+
]
|
|
1213
|
+
)
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
# authentication setting
|
|
1217
|
+
_auth_settings: list[str] = [
|
|
1218
|
+
]
|
|
1219
|
+
|
|
1220
|
+
return self.api_client.param_serialize(
|
|
1221
|
+
method='GET',
|
|
1222
|
+
resource_path='/v1/messages/batches/{message_batch_id}',
|
|
1223
|
+
path_params=_path_params,
|
|
1224
|
+
query_params=_query_params,
|
|
1225
|
+
header_params=_header_params,
|
|
1226
|
+
body=_body_params,
|
|
1227
|
+
post_params=_form_params,
|
|
1228
|
+
files=_files,
|
|
1229
|
+
auth_settings=_auth_settings,
|
|
1230
|
+
collection_formats=_collection_formats,
|
|
1231
|
+
_host=_host,
|
|
1232
|
+
_request_auth=_request_auth
|
|
1233
|
+
)
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
@validate_call
|
|
1238
|
+
def message_batch_v1_messages_batches_post(
|
|
1239
|
+
self,
|
|
1240
|
+
create_message_batch_request: CreateMessageBatchRequest | None = None,
|
|
1241
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1242
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1243
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1244
|
+
] | None = None,
|
|
1245
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1246
|
+
_content_type: StrictStr | None = None,
|
|
1247
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1248
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1249
|
+
**kwargs: Any
|
|
1250
|
+
) -> MessageBatch:
|
|
1251
|
+
"""Create a Message Batch.
|
|
1252
|
+
|
|
1253
|
+
Send a batch of message creation requests.
|
|
1254
|
+
|
|
1255
|
+
:param create_message_batch_request: (required)
|
|
1256
|
+
:type create_message_batch_request: CreateMessageBatchRequest
|
|
1257
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1258
|
+
number provided, it will be total request
|
|
1259
|
+
timeout. It can also be a pair (tuple) of
|
|
1260
|
+
(connection, read) timeouts.
|
|
1261
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1262
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1263
|
+
request; this effectively ignores the
|
|
1264
|
+
authentication in the spec for a single request.
|
|
1265
|
+
:type _request_auth: dict, optional
|
|
1266
|
+
:param _content_type: force content-type for the request.
|
|
1267
|
+
:type _content_type: str, Optional
|
|
1268
|
+
:param _headers: set to override the headers for a single
|
|
1269
|
+
request; this effectively ignores the headers
|
|
1270
|
+
in the spec for a single request.
|
|
1271
|
+
:type _headers: dict, optional
|
|
1272
|
+
:param _host_index: set to override the host_index for a single
|
|
1273
|
+
request; this effectively ignores the host_index
|
|
1274
|
+
in the spec for a single request.
|
|
1275
|
+
:type _host_index: int, optional
|
|
1276
|
+
:return: Returns the result object.
|
|
1277
|
+
""" # noqa: E501
|
|
1278
|
+
|
|
1279
|
+
# If body param not provided, construct from kwargs
|
|
1280
|
+
if create_message_batch_request is None and kwargs:
|
|
1281
|
+
try:
|
|
1282
|
+
# Try proper type conversion via from_json
|
|
1283
|
+
create_message_batch_request = CreateMessageBatchRequest.from_json(json.dumps(kwargs))
|
|
1284
|
+
except Exception:
|
|
1285
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1286
|
+
# Server will still validate the final request
|
|
1287
|
+
create_message_batch_request = CreateMessageBatchRequest.model_construct(**kwargs)
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
_param = self._message_batch_v1_messages_batches_post_serialize(
|
|
1291
|
+
create_message_batch_request=create_message_batch_request,
|
|
1292
|
+
_request_auth=_request_auth,
|
|
1293
|
+
_content_type=_content_type,
|
|
1294
|
+
_headers=_headers,
|
|
1295
|
+
_host_index=_host_index
|
|
1296
|
+
)
|
|
1297
|
+
|
|
1298
|
+
_response_types_map: dict[str, str | None] = {
|
|
1299
|
+
'200': "MessageBatch",
|
|
1300
|
+
'400': "Error",
|
|
1301
|
+
'429': "Error",
|
|
1302
|
+
'500': "Error",
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
response_data = self.api_client.call_api(
|
|
1306
|
+
*_param,
|
|
1307
|
+
_request_timeout=_request_timeout
|
|
1308
|
+
)
|
|
1309
|
+
|
|
1310
|
+
response_data.read()
|
|
1311
|
+
_deserialized = self.api_client.response_deserialize(
|
|
1312
|
+
response_data=response_data,
|
|
1313
|
+
response_types_map=_response_types_map,
|
|
1314
|
+
).data
|
|
1315
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
1316
|
+
return _deserialized
|
|
1317
|
+
|
|
1318
|
+
@validate_call
|
|
1319
|
+
def message_batch_v1_messages_batches_post_with_http_info(
|
|
1320
|
+
self,
|
|
1321
|
+
create_message_batch_request: CreateMessageBatchRequest | None = None,
|
|
1322
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1323
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1324
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1325
|
+
] | None = None,
|
|
1326
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1327
|
+
_content_type: StrictStr | None = None,
|
|
1328
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1329
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1330
|
+
**kwargs: Any
|
|
1331
|
+
) -> ApiResponse[MessageBatch]:
|
|
1332
|
+
"""Create a Message Batch.
|
|
1333
|
+
|
|
1334
|
+
Send a batch of message creation requests.
|
|
1335
|
+
|
|
1336
|
+
:param create_message_batch_request: (required)
|
|
1337
|
+
:type create_message_batch_request: CreateMessageBatchRequest
|
|
1338
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1339
|
+
number provided, it will be total request
|
|
1340
|
+
timeout. It can also be a pair (tuple) of
|
|
1341
|
+
(connection, read) timeouts.
|
|
1342
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1343
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1344
|
+
request; this effectively ignores the
|
|
1345
|
+
authentication in the spec for a single request.
|
|
1346
|
+
:type _request_auth: dict, optional
|
|
1347
|
+
:param _content_type: force content-type for the request.
|
|
1348
|
+
:type _content_type: str, Optional
|
|
1349
|
+
:param _headers: set to override the headers for a single
|
|
1350
|
+
request; this effectively ignores the headers
|
|
1351
|
+
in the spec for a single request.
|
|
1352
|
+
:type _headers: dict, optional
|
|
1353
|
+
:param _host_index: set to override the host_index for a single
|
|
1354
|
+
request; this effectively ignores the host_index
|
|
1355
|
+
in the spec for a single request.
|
|
1356
|
+
:type _host_index: int, optional
|
|
1357
|
+
:return: Returns the result object.
|
|
1358
|
+
""" # noqa: E501
|
|
1359
|
+
|
|
1360
|
+
# If body param not provided, construct from kwargs
|
|
1361
|
+
if create_message_batch_request is None and kwargs:
|
|
1362
|
+
try:
|
|
1363
|
+
# Try proper type conversion via from_json
|
|
1364
|
+
create_message_batch_request = CreateMessageBatchRequest.from_json(json.dumps(kwargs))
|
|
1365
|
+
except Exception:
|
|
1366
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1367
|
+
# Server will still validate the final request
|
|
1368
|
+
create_message_batch_request = CreateMessageBatchRequest.model_construct(**kwargs)
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
_param = self._message_batch_v1_messages_batches_post_serialize(
|
|
1372
|
+
create_message_batch_request=create_message_batch_request,
|
|
1373
|
+
_request_auth=_request_auth,
|
|
1374
|
+
_content_type=_content_type,
|
|
1375
|
+
_headers=_headers,
|
|
1376
|
+
_host_index=_host_index
|
|
1377
|
+
)
|
|
1378
|
+
|
|
1379
|
+
_response_types_map: dict[str, str | None] = {
|
|
1380
|
+
'200': "MessageBatch",
|
|
1381
|
+
'400': "Error",
|
|
1382
|
+
'429': "Error",
|
|
1383
|
+
'500': "Error",
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
response_data = self.api_client.call_api(
|
|
1387
|
+
*_param,
|
|
1388
|
+
_request_timeout=_request_timeout
|
|
1389
|
+
)
|
|
1390
|
+
|
|
1391
|
+
response_data.read()
|
|
1392
|
+
return self.api_client.response_deserialize(
|
|
1393
|
+
response_data=response_data,
|
|
1394
|
+
response_types_map=_response_types_map,
|
|
1395
|
+
)
|
|
1396
|
+
|
|
1397
|
+
@validate_call
|
|
1398
|
+
def message_batch_v1_messages_batches_post_without_preload_content(
|
|
1399
|
+
self,
|
|
1400
|
+
create_message_batch_request: CreateMessageBatchRequest | None = None,
|
|
1401
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1402
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1403
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1404
|
+
] | None = None,
|
|
1405
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1406
|
+
_content_type: StrictStr | None = None,
|
|
1407
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1408
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1409
|
+
**kwargs: Any
|
|
1410
|
+
) -> RESTResponseType:
|
|
1411
|
+
"""Create a Message Batch.
|
|
1412
|
+
|
|
1413
|
+
Send a batch of message creation requests.
|
|
1414
|
+
|
|
1415
|
+
:param create_message_batch_request: (required)
|
|
1416
|
+
:type create_message_batch_request: CreateMessageBatchRequest
|
|
1417
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1418
|
+
number provided, it will be total request
|
|
1419
|
+
timeout. It can also be a pair (tuple) of
|
|
1420
|
+
(connection, read) timeouts.
|
|
1421
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1422
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1423
|
+
request; this effectively ignores the
|
|
1424
|
+
authentication in the spec for a single request.
|
|
1425
|
+
:type _request_auth: dict, optional
|
|
1426
|
+
:param _content_type: force content-type for the request.
|
|
1427
|
+
:type _content_type: str, Optional
|
|
1428
|
+
:param _headers: set to override the headers for a single
|
|
1429
|
+
request; this effectively ignores the headers
|
|
1430
|
+
in the spec for a single request.
|
|
1431
|
+
:type _headers: dict, optional
|
|
1432
|
+
:param _host_index: set to override the host_index for a single
|
|
1433
|
+
request; this effectively ignores the host_index
|
|
1434
|
+
in the spec for a single request.
|
|
1435
|
+
:type _host_index: int, optional
|
|
1436
|
+
:return: Returns the result object.
|
|
1437
|
+
""" # noqa: E501
|
|
1438
|
+
|
|
1439
|
+
# If body param not provided, construct from kwargs
|
|
1440
|
+
if create_message_batch_request is None and kwargs:
|
|
1441
|
+
try:
|
|
1442
|
+
# Try proper type conversion via from_json
|
|
1443
|
+
create_message_batch_request = CreateMessageBatchRequest.from_json(json.dumps(kwargs))
|
|
1444
|
+
except Exception:
|
|
1445
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1446
|
+
# Server will still validate the final request
|
|
1447
|
+
create_message_batch_request = CreateMessageBatchRequest.model_construct(**kwargs)
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
_param = self._message_batch_v1_messages_batches_post_serialize(
|
|
1451
|
+
create_message_batch_request=create_message_batch_request,
|
|
1452
|
+
_request_auth=_request_auth,
|
|
1453
|
+
_content_type=_content_type,
|
|
1454
|
+
_headers=_headers,
|
|
1455
|
+
_host_index=_host_index
|
|
1456
|
+
)
|
|
1457
|
+
|
|
1458
|
+
_response_types_map: dict[str, str | None] = {
|
|
1459
|
+
'200': "MessageBatch",
|
|
1460
|
+
'400': "Error",
|
|
1461
|
+
'429': "Error",
|
|
1462
|
+
'500': "Error",
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
response_data = self.api_client.call_api(
|
|
1466
|
+
*_param,
|
|
1467
|
+
_request_timeout=_request_timeout
|
|
1468
|
+
)
|
|
1469
|
+
return response_data.response
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
def _message_batch_v1_messages_batches_post_serialize(
|
|
1473
|
+
self,
|
|
1474
|
+
create_message_batch_request,
|
|
1475
|
+
_request_auth,
|
|
1476
|
+
_content_type,
|
|
1477
|
+
_headers,
|
|
1478
|
+
_host_index,
|
|
1479
|
+
) -> RequestSerialized:
|
|
1480
|
+
|
|
1481
|
+
_host = None
|
|
1482
|
+
|
|
1483
|
+
_collection_formats: dict[str, str] = {
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
_path_params: dict[str, str] = {}
|
|
1487
|
+
_query_params: list[tuple[str, str]] = []
|
|
1488
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
1489
|
+
_form_params: list[tuple[str, str]] = []
|
|
1490
|
+
_files: dict[
|
|
1491
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
1492
|
+
] = {}
|
|
1493
|
+
_body_params: bytes | None = None
|
|
1494
|
+
|
|
1495
|
+
# process the path parameters
|
|
1496
|
+
# process the query parameters
|
|
1497
|
+
# process the header parameters
|
|
1498
|
+
# process the form parameters
|
|
1499
|
+
# process the body parameter
|
|
1500
|
+
if create_message_batch_request is not None:
|
|
1501
|
+
_body_params = create_message_batch_request
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
# set the HTTP header `Accept`
|
|
1505
|
+
if 'Accept' not in _header_params:
|
|
1506
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1507
|
+
[
|
|
1508
|
+
'application/json'
|
|
1509
|
+
]
|
|
1510
|
+
)
|
|
1511
|
+
|
|
1512
|
+
# set the HTTP header `Content-Type`
|
|
1513
|
+
if _content_type:
|
|
1514
|
+
_header_params['Content-Type'] = _content_type
|
|
1515
|
+
else:
|
|
1516
|
+
_default_content_type = (
|
|
1517
|
+
self.api_client.select_header_content_type(
|
|
1518
|
+
[
|
|
1519
|
+
'application/json'
|
|
1520
|
+
]
|
|
1521
|
+
)
|
|
1522
|
+
)
|
|
1523
|
+
if _default_content_type is not None:
|
|
1524
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1525
|
+
|
|
1526
|
+
# authentication setting
|
|
1527
|
+
_auth_settings: list[str] = [
|
|
1528
|
+
]
|
|
1529
|
+
|
|
1530
|
+
return self.api_client.param_serialize(
|
|
1531
|
+
method='POST',
|
|
1532
|
+
resource_path='/v1/messages/batches',
|
|
1533
|
+
path_params=_path_params,
|
|
1534
|
+
query_params=_query_params,
|
|
1535
|
+
header_params=_header_params,
|
|
1536
|
+
body=_body_params,
|
|
1537
|
+
post_params=_form_params,
|
|
1538
|
+
files=_files,
|
|
1539
|
+
auth_settings=_auth_settings,
|
|
1540
|
+
collection_formats=_collection_formats,
|
|
1541
|
+
_host=_host,
|
|
1542
|
+
_request_auth=_request_auth
|
|
1543
|
+
)
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
@validate_call
|
|
1548
|
+
def message_batches_v1_messages_batches_get(
|
|
1549
|
+
self,
|
|
1550
|
+
limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of batches to return.")] = None,
|
|
1551
|
+
before_id: Annotated[Optional[StrictStr], Field(description="Return batches created before this batch ID.")] = None,
|
|
1552
|
+
after_id: Annotated[Optional[StrictStr], Field(description="Return batches created after this batch ID.")] = None,
|
|
1553
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1554
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1555
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1556
|
+
] | None = None,
|
|
1557
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1558
|
+
_content_type: StrictStr | None = None,
|
|
1559
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1560
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
1561
|
+
) -> ListMessageBatchesResponse:
|
|
1562
|
+
"""List Message Batches.
|
|
1563
|
+
|
|
1564
|
+
List all Message Batches with pagination.
|
|
1565
|
+
|
|
1566
|
+
:param limit: Maximum number of batches to return.
|
|
1567
|
+
:type limit: int
|
|
1568
|
+
:param before_id: Return batches created before this batch ID.
|
|
1569
|
+
:type before_id: str
|
|
1570
|
+
:param after_id: Return batches created after this batch ID.
|
|
1571
|
+
:type after_id: str
|
|
1572
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1573
|
+
number provided, it will be total request
|
|
1574
|
+
timeout. It can also be a pair (tuple) of
|
|
1575
|
+
(connection, read) timeouts.
|
|
1576
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1577
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1578
|
+
request; this effectively ignores the
|
|
1579
|
+
authentication in the spec for a single request.
|
|
1580
|
+
:type _request_auth: dict, optional
|
|
1581
|
+
:param _content_type: force content-type for the request.
|
|
1582
|
+
:type _content_type: str, Optional
|
|
1583
|
+
:param _headers: set to override the headers for a single
|
|
1584
|
+
request; this effectively ignores the headers
|
|
1585
|
+
in the spec for a single request.
|
|
1586
|
+
:type _headers: dict, optional
|
|
1587
|
+
:param _host_index: set to override the host_index for a single
|
|
1588
|
+
request; this effectively ignores the host_index
|
|
1589
|
+
in the spec for a single request.
|
|
1590
|
+
:type _host_index: int, optional
|
|
1591
|
+
:return: Returns the result object.
|
|
1592
|
+
""" # noqa: E501
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
_param = self._message_batches_v1_messages_batches_get_serialize(
|
|
1596
|
+
limit=limit,
|
|
1597
|
+
before_id=before_id,
|
|
1598
|
+
after_id=after_id,
|
|
1599
|
+
_request_auth=_request_auth,
|
|
1600
|
+
_content_type=_content_type,
|
|
1601
|
+
_headers=_headers,
|
|
1602
|
+
_host_index=_host_index
|
|
1603
|
+
)
|
|
1604
|
+
|
|
1605
|
+
_response_types_map: dict[str, str | None] = {
|
|
1606
|
+
'200': "ListMessageBatchesResponse",
|
|
1607
|
+
'400': "Error",
|
|
1608
|
+
'429': "Error",
|
|
1609
|
+
'500': "Error",
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
response_data = self.api_client.call_api(
|
|
1613
|
+
*_param,
|
|
1614
|
+
_request_timeout=_request_timeout
|
|
1615
|
+
)
|
|
1616
|
+
|
|
1617
|
+
response_data.read()
|
|
1618
|
+
_deserialized = self.api_client.response_deserialize(
|
|
1619
|
+
response_data=response_data,
|
|
1620
|
+
response_types_map=_response_types_map,
|
|
1621
|
+
).data
|
|
1622
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
1623
|
+
return _deserialized
|
|
1624
|
+
|
|
1625
|
+
@validate_call
|
|
1626
|
+
def message_batches_v1_messages_batches_get_with_http_info(
|
|
1627
|
+
self,
|
|
1628
|
+
limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of batches to return.")] = None,
|
|
1629
|
+
before_id: Annotated[Optional[StrictStr], Field(description="Return batches created before this batch ID.")] = None,
|
|
1630
|
+
after_id: Annotated[Optional[StrictStr], Field(description="Return batches created after this batch ID.")] = None,
|
|
1631
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1632
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1633
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1634
|
+
] | None = None,
|
|
1635
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1636
|
+
_content_type: StrictStr | None = None,
|
|
1637
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1638
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
1639
|
+
) -> ApiResponse[ListMessageBatchesResponse]:
|
|
1640
|
+
"""List Message Batches.
|
|
1641
|
+
|
|
1642
|
+
List all Message Batches with pagination.
|
|
1643
|
+
|
|
1644
|
+
:param limit: Maximum number of batches to return.
|
|
1645
|
+
:type limit: int
|
|
1646
|
+
:param before_id: Return batches created before this batch ID.
|
|
1647
|
+
:type before_id: str
|
|
1648
|
+
:param after_id: Return batches created after this batch ID.
|
|
1649
|
+
:type after_id: str
|
|
1650
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1651
|
+
number provided, it will be total request
|
|
1652
|
+
timeout. It can also be a pair (tuple) of
|
|
1653
|
+
(connection, read) timeouts.
|
|
1654
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1655
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1656
|
+
request; this effectively ignores the
|
|
1657
|
+
authentication in the spec for a single request.
|
|
1658
|
+
:type _request_auth: dict, optional
|
|
1659
|
+
:param _content_type: force content-type for the request.
|
|
1660
|
+
:type _content_type: str, Optional
|
|
1661
|
+
:param _headers: set to override the headers for a single
|
|
1662
|
+
request; this effectively ignores the headers
|
|
1663
|
+
in the spec for a single request.
|
|
1664
|
+
:type _headers: dict, optional
|
|
1665
|
+
:param _host_index: set to override the host_index for a single
|
|
1666
|
+
request; this effectively ignores the host_index
|
|
1667
|
+
in the spec for a single request.
|
|
1668
|
+
:type _host_index: int, optional
|
|
1669
|
+
:return: Returns the result object.
|
|
1670
|
+
""" # noqa: E501
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
_param = self._message_batches_v1_messages_batches_get_serialize(
|
|
1674
|
+
limit=limit,
|
|
1675
|
+
before_id=before_id,
|
|
1676
|
+
after_id=after_id,
|
|
1677
|
+
_request_auth=_request_auth,
|
|
1678
|
+
_content_type=_content_type,
|
|
1679
|
+
_headers=_headers,
|
|
1680
|
+
_host_index=_host_index
|
|
1681
|
+
)
|
|
1682
|
+
|
|
1683
|
+
_response_types_map: dict[str, str | None] = {
|
|
1684
|
+
'200': "ListMessageBatchesResponse",
|
|
1685
|
+
'400': "Error",
|
|
1686
|
+
'429': "Error",
|
|
1687
|
+
'500': "Error",
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
response_data = self.api_client.call_api(
|
|
1691
|
+
*_param,
|
|
1692
|
+
_request_timeout=_request_timeout
|
|
1693
|
+
)
|
|
1694
|
+
|
|
1695
|
+
response_data.read()
|
|
1696
|
+
return self.api_client.response_deserialize(
|
|
1697
|
+
response_data=response_data,
|
|
1698
|
+
response_types_map=_response_types_map,
|
|
1699
|
+
)
|
|
1700
|
+
|
|
1701
|
+
@validate_call
|
|
1702
|
+
def message_batches_v1_messages_batches_get_without_preload_content(
|
|
1703
|
+
self,
|
|
1704
|
+
limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Maximum number of batches to return.")] = None,
|
|
1705
|
+
before_id: Annotated[Optional[StrictStr], Field(description="Return batches created before this batch ID.")] = None,
|
|
1706
|
+
after_id: Annotated[Optional[StrictStr], Field(description="Return batches created after this batch ID.")] = None,
|
|
1707
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1708
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1709
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1710
|
+
] | None = None,
|
|
1711
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1712
|
+
_content_type: StrictStr | None = None,
|
|
1713
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1714
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0
|
|
1715
|
+
) -> RESTResponseType:
|
|
1716
|
+
"""List Message Batches.
|
|
1717
|
+
|
|
1718
|
+
List all Message Batches with pagination.
|
|
1719
|
+
|
|
1720
|
+
:param limit: Maximum number of batches to return.
|
|
1721
|
+
:type limit: int
|
|
1722
|
+
:param before_id: Return batches created before this batch ID.
|
|
1723
|
+
:type before_id: str
|
|
1724
|
+
:param after_id: Return batches created after this batch ID.
|
|
1725
|
+
:type after_id: str
|
|
1726
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1727
|
+
number provided, it will be total request
|
|
1728
|
+
timeout. It can also be a pair (tuple) of
|
|
1729
|
+
(connection, read) timeouts.
|
|
1730
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1731
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1732
|
+
request; this effectively ignores the
|
|
1733
|
+
authentication in the spec for a single request.
|
|
1734
|
+
:type _request_auth: dict, optional
|
|
1735
|
+
:param _content_type: force content-type for the request.
|
|
1736
|
+
:type _content_type: str, Optional
|
|
1737
|
+
:param _headers: set to override the headers for a single
|
|
1738
|
+
request; this effectively ignores the headers
|
|
1739
|
+
in the spec for a single request.
|
|
1740
|
+
:type _headers: dict, optional
|
|
1741
|
+
:param _host_index: set to override the host_index for a single
|
|
1742
|
+
request; this effectively ignores the host_index
|
|
1743
|
+
in the spec for a single request.
|
|
1744
|
+
:type _host_index: int, optional
|
|
1745
|
+
:return: Returns the result object.
|
|
1746
|
+
""" # noqa: E501
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
_param = self._message_batches_v1_messages_batches_get_serialize(
|
|
1750
|
+
limit=limit,
|
|
1751
|
+
before_id=before_id,
|
|
1752
|
+
after_id=after_id,
|
|
1753
|
+
_request_auth=_request_auth,
|
|
1754
|
+
_content_type=_content_type,
|
|
1755
|
+
_headers=_headers,
|
|
1756
|
+
_host_index=_host_index
|
|
1757
|
+
)
|
|
1758
|
+
|
|
1759
|
+
_response_types_map: dict[str, str | None] = {
|
|
1760
|
+
'200': "ListMessageBatchesResponse",
|
|
1761
|
+
'400': "Error",
|
|
1762
|
+
'429': "Error",
|
|
1763
|
+
'500': "Error",
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
response_data = self.api_client.call_api(
|
|
1767
|
+
*_param,
|
|
1768
|
+
_request_timeout=_request_timeout
|
|
1769
|
+
)
|
|
1770
|
+
return response_data.response
|
|
1771
|
+
|
|
1772
|
+
|
|
1773
|
+
def _message_batches_v1_messages_batches_get_serialize(
|
|
1774
|
+
self,
|
|
1775
|
+
limit,
|
|
1776
|
+
before_id,
|
|
1777
|
+
after_id,
|
|
1778
|
+
_request_auth,
|
|
1779
|
+
_content_type,
|
|
1780
|
+
_headers,
|
|
1781
|
+
_host_index,
|
|
1782
|
+
) -> RequestSerialized:
|
|
1783
|
+
|
|
1784
|
+
_host = None
|
|
1785
|
+
|
|
1786
|
+
_collection_formats: dict[str, str] = {
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
_path_params: dict[str, str] = {}
|
|
1790
|
+
_query_params: list[tuple[str, str]] = []
|
|
1791
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
1792
|
+
_form_params: list[tuple[str, str]] = []
|
|
1793
|
+
_files: dict[
|
|
1794
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
1795
|
+
] = {}
|
|
1796
|
+
_body_params: bytes | None = None
|
|
1797
|
+
|
|
1798
|
+
# process the path parameters
|
|
1799
|
+
# process the query parameters
|
|
1800
|
+
if limit is not None:
|
|
1801
|
+
|
|
1802
|
+
_query_params.append(('limit', limit))
|
|
1803
|
+
|
|
1804
|
+
if before_id is not None:
|
|
1805
|
+
|
|
1806
|
+
_query_params.append(('before_id', before_id))
|
|
1807
|
+
|
|
1808
|
+
if after_id is not None:
|
|
1809
|
+
|
|
1810
|
+
_query_params.append(('after_id', after_id))
|
|
1811
|
+
|
|
1812
|
+
# process the header parameters
|
|
1813
|
+
# process the form parameters
|
|
1814
|
+
# process the body parameter
|
|
1815
|
+
|
|
1816
|
+
|
|
1817
|
+
# set the HTTP header `Accept`
|
|
1818
|
+
if 'Accept' not in _header_params:
|
|
1819
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1820
|
+
[
|
|
1821
|
+
'application/json'
|
|
1822
|
+
]
|
|
1823
|
+
)
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
# authentication setting
|
|
1827
|
+
_auth_settings: list[str] = [
|
|
1828
|
+
]
|
|
1829
|
+
|
|
1830
|
+
return self.api_client.param_serialize(
|
|
1831
|
+
method='GET',
|
|
1832
|
+
resource_path='/v1/messages/batches',
|
|
1833
|
+
path_params=_path_params,
|
|
1834
|
+
query_params=_query_params,
|
|
1835
|
+
header_params=_header_params,
|
|
1836
|
+
body=_body_params,
|
|
1837
|
+
post_params=_form_params,
|
|
1838
|
+
files=_files,
|
|
1839
|
+
auth_settings=_auth_settings,
|
|
1840
|
+
collection_formats=_collection_formats,
|
|
1841
|
+
_host=_host,
|
|
1842
|
+
_request_auth=_request_auth
|
|
1843
|
+
)
|
|
1844
|
+
|
|
1845
|
+
|
|
1846
|
+
|
|
1847
|
+
@validate_call
|
|
1848
|
+
def message_tokens_v1_messages_count_tokens_post(
|
|
1849
|
+
self,
|
|
1850
|
+
anthropic_count_tokens_request: AnthropicCountTokensRequest | None = None,
|
|
1851
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1852
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1853
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1854
|
+
] | None = None,
|
|
1855
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1856
|
+
_content_type: StrictStr | None = None,
|
|
1857
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1858
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1859
|
+
**kwargs: Any
|
|
1860
|
+
) -> AnthropicCountTokensResponse:
|
|
1861
|
+
"""Count tokens in a message.
|
|
1862
|
+
|
|
1863
|
+
Count the number of tokens in a message request.
|
|
1864
|
+
|
|
1865
|
+
:param anthropic_count_tokens_request: (required)
|
|
1866
|
+
:type anthropic_count_tokens_request: AnthropicCountTokensRequest
|
|
1867
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1868
|
+
number provided, it will be total request
|
|
1869
|
+
timeout. It can also be a pair (tuple) of
|
|
1870
|
+
(connection, read) timeouts.
|
|
1871
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1872
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1873
|
+
request; this effectively ignores the
|
|
1874
|
+
authentication in the spec for a single request.
|
|
1875
|
+
:type _request_auth: dict, optional
|
|
1876
|
+
:param _content_type: force content-type for the request.
|
|
1877
|
+
:type _content_type: str, Optional
|
|
1878
|
+
:param _headers: set to override the headers for a single
|
|
1879
|
+
request; this effectively ignores the headers
|
|
1880
|
+
in the spec for a single request.
|
|
1881
|
+
:type _headers: dict, optional
|
|
1882
|
+
:param _host_index: set to override the host_index for a single
|
|
1883
|
+
request; this effectively ignores the host_index
|
|
1884
|
+
in the spec for a single request.
|
|
1885
|
+
:type _host_index: int, optional
|
|
1886
|
+
:return: Returns the result object.
|
|
1887
|
+
""" # noqa: E501
|
|
1888
|
+
|
|
1889
|
+
# If body param not provided, construct from kwargs
|
|
1890
|
+
if anthropic_count_tokens_request is None and kwargs:
|
|
1891
|
+
try:
|
|
1892
|
+
# Try proper type conversion via from_json
|
|
1893
|
+
anthropic_count_tokens_request = AnthropicCountTokensRequest.from_json(json.dumps(kwargs))
|
|
1894
|
+
except Exception:
|
|
1895
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1896
|
+
# Server will still validate the final request
|
|
1897
|
+
anthropic_count_tokens_request = AnthropicCountTokensRequest.model_construct(**kwargs)
|
|
1898
|
+
|
|
1899
|
+
|
|
1900
|
+
_param = self._message_tokens_v1_messages_count_tokens_post_serialize(
|
|
1901
|
+
anthropic_count_tokens_request=anthropic_count_tokens_request,
|
|
1902
|
+
_request_auth=_request_auth,
|
|
1903
|
+
_content_type=_content_type,
|
|
1904
|
+
_headers=_headers,
|
|
1905
|
+
_host_index=_host_index
|
|
1906
|
+
)
|
|
1907
|
+
|
|
1908
|
+
_response_types_map: dict[str, str | None] = {
|
|
1909
|
+
'200': "AnthropicCountTokensResponse",
|
|
1910
|
+
'400': "Error",
|
|
1911
|
+
'429': "Error",
|
|
1912
|
+
'500': "Error",
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
response_data = self.api_client.call_api(
|
|
1916
|
+
*_param,
|
|
1917
|
+
_request_timeout=_request_timeout
|
|
1918
|
+
)
|
|
1919
|
+
|
|
1920
|
+
response_data.read()
|
|
1921
|
+
_deserialized = self.api_client.response_deserialize(
|
|
1922
|
+
response_data=response_data,
|
|
1923
|
+
response_types_map=_response_types_map,
|
|
1924
|
+
).data
|
|
1925
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
1926
|
+
return _deserialized
|
|
1927
|
+
|
|
1928
|
+
@validate_call
|
|
1929
|
+
def message_tokens_v1_messages_count_tokens_post_with_http_info(
|
|
1930
|
+
self,
|
|
1931
|
+
anthropic_count_tokens_request: AnthropicCountTokensRequest | None = None,
|
|
1932
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
1933
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1934
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1935
|
+
] | None = None,
|
|
1936
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
1937
|
+
_content_type: StrictStr | None = None,
|
|
1938
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
1939
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1940
|
+
**kwargs: Any
|
|
1941
|
+
) -> ApiResponse[AnthropicCountTokensResponse]:
|
|
1942
|
+
"""Count tokens in a message.
|
|
1943
|
+
|
|
1944
|
+
Count the number of tokens in a message request.
|
|
1945
|
+
|
|
1946
|
+
:param anthropic_count_tokens_request: (required)
|
|
1947
|
+
:type anthropic_count_tokens_request: AnthropicCountTokensRequest
|
|
1948
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1949
|
+
number provided, it will be total request
|
|
1950
|
+
timeout. It can also be a pair (tuple) of
|
|
1951
|
+
(connection, read) timeouts.
|
|
1952
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1953
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1954
|
+
request; this effectively ignores the
|
|
1955
|
+
authentication in the spec for a single request.
|
|
1956
|
+
:type _request_auth: dict, optional
|
|
1957
|
+
:param _content_type: force content-type for the request.
|
|
1958
|
+
:type _content_type: str, Optional
|
|
1959
|
+
:param _headers: set to override the headers for a single
|
|
1960
|
+
request; this effectively ignores the headers
|
|
1961
|
+
in the spec for a single request.
|
|
1962
|
+
:type _headers: dict, optional
|
|
1963
|
+
:param _host_index: set to override the host_index for a single
|
|
1964
|
+
request; this effectively ignores the host_index
|
|
1965
|
+
in the spec for a single request.
|
|
1966
|
+
:type _host_index: int, optional
|
|
1967
|
+
:return: Returns the result object.
|
|
1968
|
+
""" # noqa: E501
|
|
1969
|
+
|
|
1970
|
+
# If body param not provided, construct from kwargs
|
|
1971
|
+
if anthropic_count_tokens_request is None and kwargs:
|
|
1972
|
+
try:
|
|
1973
|
+
# Try proper type conversion via from_json
|
|
1974
|
+
anthropic_count_tokens_request = AnthropicCountTokensRequest.from_json(json.dumps(kwargs))
|
|
1975
|
+
except Exception:
|
|
1976
|
+
# Fall back to lenient construction for complex/flexible types
|
|
1977
|
+
# Server will still validate the final request
|
|
1978
|
+
anthropic_count_tokens_request = AnthropicCountTokensRequest.model_construct(**kwargs)
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
_param = self._message_tokens_v1_messages_count_tokens_post_serialize(
|
|
1982
|
+
anthropic_count_tokens_request=anthropic_count_tokens_request,
|
|
1983
|
+
_request_auth=_request_auth,
|
|
1984
|
+
_content_type=_content_type,
|
|
1985
|
+
_headers=_headers,
|
|
1986
|
+
_host_index=_host_index
|
|
1987
|
+
)
|
|
1988
|
+
|
|
1989
|
+
_response_types_map: dict[str, str | None] = {
|
|
1990
|
+
'200': "AnthropicCountTokensResponse",
|
|
1991
|
+
'400': "Error",
|
|
1992
|
+
'429': "Error",
|
|
1993
|
+
'500': "Error",
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
response_data = self.api_client.call_api(
|
|
1997
|
+
*_param,
|
|
1998
|
+
_request_timeout=_request_timeout
|
|
1999
|
+
)
|
|
2000
|
+
|
|
2001
|
+
response_data.read()
|
|
2002
|
+
return self.api_client.response_deserialize(
|
|
2003
|
+
response_data=response_data,
|
|
2004
|
+
response_types_map=_response_types_map,
|
|
2005
|
+
)
|
|
2006
|
+
|
|
2007
|
+
@validate_call
|
|
2008
|
+
def message_tokens_v1_messages_count_tokens_post_without_preload_content(
|
|
2009
|
+
self,
|
|
2010
|
+
anthropic_count_tokens_request: AnthropicCountTokensRequest | None = None,
|
|
2011
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
2012
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2013
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2014
|
+
] | None = None,
|
|
2015
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
2016
|
+
_content_type: StrictStr | None = None,
|
|
2017
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
2018
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2019
|
+
**kwargs: Any
|
|
2020
|
+
) -> RESTResponseType:
|
|
2021
|
+
"""Count tokens in a message.
|
|
2022
|
+
|
|
2023
|
+
Count the number of tokens in a message request.
|
|
2024
|
+
|
|
2025
|
+
:param anthropic_count_tokens_request: (required)
|
|
2026
|
+
:type anthropic_count_tokens_request: AnthropicCountTokensRequest
|
|
2027
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2028
|
+
number provided, it will be total request
|
|
2029
|
+
timeout. It can also be a pair (tuple) of
|
|
2030
|
+
(connection, read) timeouts.
|
|
2031
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2032
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2033
|
+
request; this effectively ignores the
|
|
2034
|
+
authentication in the spec for a single request.
|
|
2035
|
+
:type _request_auth: dict, optional
|
|
2036
|
+
:param _content_type: force content-type for the request.
|
|
2037
|
+
:type _content_type: str, Optional
|
|
2038
|
+
:param _headers: set to override the headers for a single
|
|
2039
|
+
request; this effectively ignores the headers
|
|
2040
|
+
in the spec for a single request.
|
|
2041
|
+
:type _headers: dict, optional
|
|
2042
|
+
:param _host_index: set to override the host_index for a single
|
|
2043
|
+
request; this effectively ignores the host_index
|
|
2044
|
+
in the spec for a single request.
|
|
2045
|
+
:type _host_index: int, optional
|
|
2046
|
+
:return: Returns the result object.
|
|
2047
|
+
""" # noqa: E501
|
|
2048
|
+
|
|
2049
|
+
# If body param not provided, construct from kwargs
|
|
2050
|
+
if anthropic_count_tokens_request is None and kwargs:
|
|
2051
|
+
try:
|
|
2052
|
+
# Try proper type conversion via from_json
|
|
2053
|
+
anthropic_count_tokens_request = AnthropicCountTokensRequest.from_json(json.dumps(kwargs))
|
|
2054
|
+
except Exception:
|
|
2055
|
+
# Fall back to lenient construction for complex/flexible types
|
|
2056
|
+
# Server will still validate the final request
|
|
2057
|
+
anthropic_count_tokens_request = AnthropicCountTokensRequest.model_construct(**kwargs)
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
_param = self._message_tokens_v1_messages_count_tokens_post_serialize(
|
|
2061
|
+
anthropic_count_tokens_request=anthropic_count_tokens_request,
|
|
2062
|
+
_request_auth=_request_auth,
|
|
2063
|
+
_content_type=_content_type,
|
|
2064
|
+
_headers=_headers,
|
|
2065
|
+
_host_index=_host_index
|
|
2066
|
+
)
|
|
2067
|
+
|
|
2068
|
+
_response_types_map: dict[str, str | None] = {
|
|
2069
|
+
'200': "AnthropicCountTokensResponse",
|
|
2070
|
+
'400': "Error",
|
|
2071
|
+
'429': "Error",
|
|
2072
|
+
'500': "Error",
|
|
2073
|
+
}
|
|
2074
|
+
|
|
2075
|
+
response_data = self.api_client.call_api(
|
|
2076
|
+
*_param,
|
|
2077
|
+
_request_timeout=_request_timeout
|
|
2078
|
+
)
|
|
2079
|
+
return response_data.response
|
|
2080
|
+
|
|
2081
|
+
|
|
2082
|
+
def _message_tokens_v1_messages_count_tokens_post_serialize(
|
|
2083
|
+
self,
|
|
2084
|
+
anthropic_count_tokens_request,
|
|
2085
|
+
_request_auth,
|
|
2086
|
+
_content_type,
|
|
2087
|
+
_headers,
|
|
2088
|
+
_host_index,
|
|
2089
|
+
) -> RequestSerialized:
|
|
2090
|
+
|
|
2091
|
+
_host = None
|
|
2092
|
+
|
|
2093
|
+
_collection_formats: dict[str, str] = {
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
_path_params: dict[str, str] = {}
|
|
2097
|
+
_query_params: list[tuple[str, str]] = []
|
|
2098
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
2099
|
+
_form_params: list[tuple[str, str]] = []
|
|
2100
|
+
_files: dict[
|
|
2101
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
2102
|
+
] = {}
|
|
2103
|
+
_body_params: bytes | None = None
|
|
2104
|
+
|
|
2105
|
+
# process the path parameters
|
|
2106
|
+
# process the query parameters
|
|
2107
|
+
# process the header parameters
|
|
2108
|
+
# process the form parameters
|
|
2109
|
+
# process the body parameter
|
|
2110
|
+
if anthropic_count_tokens_request is not None:
|
|
2111
|
+
_body_params = anthropic_count_tokens_request
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
# set the HTTP header `Accept`
|
|
2115
|
+
if 'Accept' not in _header_params:
|
|
2116
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2117
|
+
[
|
|
2118
|
+
'application/json'
|
|
2119
|
+
]
|
|
2120
|
+
)
|
|
2121
|
+
|
|
2122
|
+
# set the HTTP header `Content-Type`
|
|
2123
|
+
if _content_type:
|
|
2124
|
+
_header_params['Content-Type'] = _content_type
|
|
2125
|
+
else:
|
|
2126
|
+
_default_content_type = (
|
|
2127
|
+
self.api_client.select_header_content_type(
|
|
2128
|
+
[
|
|
2129
|
+
'application/json'
|
|
2130
|
+
]
|
|
2131
|
+
)
|
|
2132
|
+
)
|
|
2133
|
+
if _default_content_type is not None:
|
|
2134
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2135
|
+
|
|
2136
|
+
# authentication setting
|
|
2137
|
+
_auth_settings: list[str] = [
|
|
2138
|
+
]
|
|
2139
|
+
|
|
2140
|
+
return self.api_client.param_serialize(
|
|
2141
|
+
method='POST',
|
|
2142
|
+
resource_path='/v1/messages/count_tokens',
|
|
2143
|
+
path_params=_path_params,
|
|
2144
|
+
query_params=_query_params,
|
|
2145
|
+
header_params=_header_params,
|
|
2146
|
+
body=_body_params,
|
|
2147
|
+
post_params=_form_params,
|
|
2148
|
+
files=_files,
|
|
2149
|
+
auth_settings=_auth_settings,
|
|
2150
|
+
collection_formats=_collection_formats,
|
|
2151
|
+
_host=_host,
|
|
2152
|
+
_request_auth=_request_auth
|
|
2153
|
+
)
|
|
2154
|
+
|
|
2155
|
+
|
|
2156
|
+
|
|
2157
|
+
@validate_call
|
|
2158
|
+
def message_v1_messages_post(
|
|
2159
|
+
self,
|
|
2160
|
+
anthropic_create_message_request: AnthropicCreateMessageRequest | None = None,
|
|
2161
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
2162
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2163
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2164
|
+
] | None = None,
|
|
2165
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
2166
|
+
_content_type: StrictStr | None = None,
|
|
2167
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
2168
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2169
|
+
**kwargs: Any
|
|
2170
|
+
) -> AnthropicMessageResponse:
|
|
2171
|
+
"""Create a message.
|
|
2172
|
+
|
|
2173
|
+
Create a message using the Anthropic Messages API format.
|
|
2174
|
+
|
|
2175
|
+
:param anthropic_create_message_request: (required)
|
|
2176
|
+
:type anthropic_create_message_request: AnthropicCreateMessageRequest
|
|
2177
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2178
|
+
number provided, it will be total request
|
|
2179
|
+
timeout. It can also be a pair (tuple) of
|
|
2180
|
+
(connection, read) timeouts.
|
|
2181
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2182
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2183
|
+
request; this effectively ignores the
|
|
2184
|
+
authentication in the spec for a single request.
|
|
2185
|
+
:type _request_auth: dict, optional
|
|
2186
|
+
:param _content_type: force content-type for the request.
|
|
2187
|
+
:type _content_type: str, Optional
|
|
2188
|
+
:param _headers: set to override the headers for a single
|
|
2189
|
+
request; this effectively ignores the headers
|
|
2190
|
+
in the spec for a single request.
|
|
2191
|
+
:type _headers: dict, optional
|
|
2192
|
+
:param _host_index: set to override the host_index for a single
|
|
2193
|
+
request; this effectively ignores the host_index
|
|
2194
|
+
in the spec for a single request.
|
|
2195
|
+
:type _host_index: int, optional
|
|
2196
|
+
:return: Returns the result object.
|
|
2197
|
+
""" # noqa: E501
|
|
2198
|
+
|
|
2199
|
+
# If body param not provided, construct from kwargs
|
|
2200
|
+
if anthropic_create_message_request is None and kwargs:
|
|
2201
|
+
try:
|
|
2202
|
+
# Try proper type conversion via from_json
|
|
2203
|
+
anthropic_create_message_request = AnthropicCreateMessageRequest.from_json(json.dumps(kwargs))
|
|
2204
|
+
except Exception:
|
|
2205
|
+
# Fall back to lenient construction for complex/flexible types
|
|
2206
|
+
# Server will still validate the final request
|
|
2207
|
+
anthropic_create_message_request = AnthropicCreateMessageRequest.model_construct(**kwargs)
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
_param = self._message_v1_messages_post_serialize(
|
|
2211
|
+
anthropic_create_message_request=anthropic_create_message_request,
|
|
2212
|
+
_request_auth=_request_auth,
|
|
2213
|
+
_content_type=_content_type,
|
|
2214
|
+
_headers=_headers,
|
|
2215
|
+
_host_index=_host_index
|
|
2216
|
+
)
|
|
2217
|
+
|
|
2218
|
+
_response_types_map: dict[str, str | None] = {
|
|
2219
|
+
'200': "AnthropicMessageResponse",
|
|
2220
|
+
'400': "Error",
|
|
2221
|
+
'429': "Error",
|
|
2222
|
+
'500': "Error",
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
response_data = self.api_client.call_api(
|
|
2226
|
+
*_param,
|
|
2227
|
+
_request_timeout=_request_timeout
|
|
2228
|
+
)
|
|
2229
|
+
|
|
2230
|
+
response_data.read()
|
|
2231
|
+
_deserialized = self.api_client.response_deserialize(
|
|
2232
|
+
response_data=response_data,
|
|
2233
|
+
response_types_map=_response_types_map,
|
|
2234
|
+
).data
|
|
2235
|
+
# Unwrap List*Response wrappers to return the data field directly
|
|
2236
|
+
return _deserialized
|
|
2237
|
+
|
|
2238
|
+
@validate_call
|
|
2239
|
+
def message_v1_messages_post_with_http_info(
|
|
2240
|
+
self,
|
|
2241
|
+
anthropic_create_message_request: AnthropicCreateMessageRequest | None = None,
|
|
2242
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
2243
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2244
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2245
|
+
] | None = None,
|
|
2246
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
2247
|
+
_content_type: StrictStr | None = None,
|
|
2248
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
2249
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2250
|
+
**kwargs: Any
|
|
2251
|
+
) -> ApiResponse[AnthropicMessageResponse]:
|
|
2252
|
+
"""Create a message.
|
|
2253
|
+
|
|
2254
|
+
Create a message using the Anthropic Messages API format.
|
|
2255
|
+
|
|
2256
|
+
:param anthropic_create_message_request: (required)
|
|
2257
|
+
:type anthropic_create_message_request: AnthropicCreateMessageRequest
|
|
2258
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2259
|
+
number provided, it will be total request
|
|
2260
|
+
timeout. It can also be a pair (tuple) of
|
|
2261
|
+
(connection, read) timeouts.
|
|
2262
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2263
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2264
|
+
request; this effectively ignores the
|
|
2265
|
+
authentication in the spec for a single request.
|
|
2266
|
+
:type _request_auth: dict, optional
|
|
2267
|
+
:param _content_type: force content-type for the request.
|
|
2268
|
+
:type _content_type: str, Optional
|
|
2269
|
+
:param _headers: set to override the headers for a single
|
|
2270
|
+
request; this effectively ignores the headers
|
|
2271
|
+
in the spec for a single request.
|
|
2272
|
+
:type _headers: dict, optional
|
|
2273
|
+
:param _host_index: set to override the host_index for a single
|
|
2274
|
+
request; this effectively ignores the host_index
|
|
2275
|
+
in the spec for a single request.
|
|
2276
|
+
:type _host_index: int, optional
|
|
2277
|
+
:return: Returns the result object.
|
|
2278
|
+
""" # noqa: E501
|
|
2279
|
+
|
|
2280
|
+
# If body param not provided, construct from kwargs
|
|
2281
|
+
if anthropic_create_message_request is None and kwargs:
|
|
2282
|
+
try:
|
|
2283
|
+
# Try proper type conversion via from_json
|
|
2284
|
+
anthropic_create_message_request = AnthropicCreateMessageRequest.from_json(json.dumps(kwargs))
|
|
2285
|
+
except Exception:
|
|
2286
|
+
# Fall back to lenient construction for complex/flexible types
|
|
2287
|
+
# Server will still validate the final request
|
|
2288
|
+
anthropic_create_message_request = AnthropicCreateMessageRequest.model_construct(**kwargs)
|
|
2289
|
+
|
|
2290
|
+
|
|
2291
|
+
_param = self._message_v1_messages_post_serialize(
|
|
2292
|
+
anthropic_create_message_request=anthropic_create_message_request,
|
|
2293
|
+
_request_auth=_request_auth,
|
|
2294
|
+
_content_type=_content_type,
|
|
2295
|
+
_headers=_headers,
|
|
2296
|
+
_host_index=_host_index
|
|
2297
|
+
)
|
|
2298
|
+
|
|
2299
|
+
_response_types_map: dict[str, str | None] = {
|
|
2300
|
+
'200': "AnthropicMessageResponse",
|
|
2301
|
+
'400': "Error",
|
|
2302
|
+
'429': "Error",
|
|
2303
|
+
'500': "Error",
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
response_data = self.api_client.call_api(
|
|
2307
|
+
*_param,
|
|
2308
|
+
_request_timeout=_request_timeout
|
|
2309
|
+
)
|
|
2310
|
+
|
|
2311
|
+
response_data.read()
|
|
2312
|
+
return self.api_client.response_deserialize(
|
|
2313
|
+
response_data=response_data,
|
|
2314
|
+
response_types_map=_response_types_map,
|
|
2315
|
+
)
|
|
2316
|
+
|
|
2317
|
+
@validate_call
|
|
2318
|
+
def message_v1_messages_post_without_preload_content(
|
|
2319
|
+
self,
|
|
2320
|
+
anthropic_create_message_request: AnthropicCreateMessageRequest | None = None,
|
|
2321
|
+
_request_timeout: Annotated[StrictFloat, Field(gt=0)] | tuple[
|
|
2322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2323
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2324
|
+
] | None = None,
|
|
2325
|
+
_request_auth: dict[StrictStr, Any] | None = None,
|
|
2326
|
+
_content_type: StrictStr | None = None,
|
|
2327
|
+
_headers: dict[StrictStr, Any] | None = None,
|
|
2328
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2329
|
+
**kwargs: Any
|
|
2330
|
+
) -> RESTResponseType:
|
|
2331
|
+
"""Create a message.
|
|
2332
|
+
|
|
2333
|
+
Create a message using the Anthropic Messages API format.
|
|
2334
|
+
|
|
2335
|
+
:param anthropic_create_message_request: (required)
|
|
2336
|
+
:type anthropic_create_message_request: AnthropicCreateMessageRequest
|
|
2337
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2338
|
+
number provided, it will be total request
|
|
2339
|
+
timeout. It can also be a pair (tuple) of
|
|
2340
|
+
(connection, read) timeouts.
|
|
2341
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2342
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2343
|
+
request; this effectively ignores the
|
|
2344
|
+
authentication in the spec for a single request.
|
|
2345
|
+
:type _request_auth: dict, optional
|
|
2346
|
+
:param _content_type: force content-type for the request.
|
|
2347
|
+
:type _content_type: str, Optional
|
|
2348
|
+
:param _headers: set to override the headers for a single
|
|
2349
|
+
request; this effectively ignores the headers
|
|
2350
|
+
in the spec for a single request.
|
|
2351
|
+
:type _headers: dict, optional
|
|
2352
|
+
:param _host_index: set to override the host_index for a single
|
|
2353
|
+
request; this effectively ignores the host_index
|
|
2354
|
+
in the spec for a single request.
|
|
2355
|
+
:type _host_index: int, optional
|
|
2356
|
+
:return: Returns the result object.
|
|
2357
|
+
""" # noqa: E501
|
|
2358
|
+
|
|
2359
|
+
# If body param not provided, construct from kwargs
|
|
2360
|
+
if anthropic_create_message_request is None and kwargs:
|
|
2361
|
+
try:
|
|
2362
|
+
# Try proper type conversion via from_json
|
|
2363
|
+
anthropic_create_message_request = AnthropicCreateMessageRequest.from_json(json.dumps(kwargs))
|
|
2364
|
+
except Exception:
|
|
2365
|
+
# Fall back to lenient construction for complex/flexible types
|
|
2366
|
+
# Server will still validate the final request
|
|
2367
|
+
anthropic_create_message_request = AnthropicCreateMessageRequest.model_construct(**kwargs)
|
|
2368
|
+
|
|
2369
|
+
|
|
2370
|
+
_param = self._message_v1_messages_post_serialize(
|
|
2371
|
+
anthropic_create_message_request=anthropic_create_message_request,
|
|
2372
|
+
_request_auth=_request_auth,
|
|
2373
|
+
_content_type=_content_type,
|
|
2374
|
+
_headers=_headers,
|
|
2375
|
+
_host_index=_host_index
|
|
2376
|
+
)
|
|
2377
|
+
|
|
2378
|
+
_response_types_map: dict[str, str | None] = {
|
|
2379
|
+
'200': "AnthropicMessageResponse",
|
|
2380
|
+
'400': "Error",
|
|
2381
|
+
'429': "Error",
|
|
2382
|
+
'500': "Error",
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
response_data = self.api_client.call_api(
|
|
2386
|
+
*_param,
|
|
2387
|
+
_request_timeout=_request_timeout
|
|
2388
|
+
)
|
|
2389
|
+
return response_data.response
|
|
2390
|
+
|
|
2391
|
+
|
|
2392
|
+
def _message_v1_messages_post_serialize(
|
|
2393
|
+
self,
|
|
2394
|
+
anthropic_create_message_request,
|
|
2395
|
+
_request_auth,
|
|
2396
|
+
_content_type,
|
|
2397
|
+
_headers,
|
|
2398
|
+
_host_index,
|
|
2399
|
+
) -> RequestSerialized:
|
|
2400
|
+
|
|
2401
|
+
_host = None
|
|
2402
|
+
|
|
2403
|
+
_collection_formats: dict[str, str] = {
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
_path_params: dict[str, str] = {}
|
|
2407
|
+
_query_params: list[tuple[str, str]] = []
|
|
2408
|
+
_header_params: dict[str, str | None] = _headers or {}
|
|
2409
|
+
_form_params: list[tuple[str, str]] = []
|
|
2410
|
+
_files: dict[
|
|
2411
|
+
str, str | bytes | list[str] | list[bytes] | list[tuple[str, bytes]]
|
|
2412
|
+
] = {}
|
|
2413
|
+
_body_params: bytes | None = None
|
|
2414
|
+
|
|
2415
|
+
# process the path parameters
|
|
2416
|
+
# process the query parameters
|
|
2417
|
+
# process the header parameters
|
|
2418
|
+
# process the form parameters
|
|
2419
|
+
# process the body parameter
|
|
2420
|
+
if anthropic_create_message_request is not None:
|
|
2421
|
+
_body_params = anthropic_create_message_request
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
# set the HTTP header `Accept`
|
|
2425
|
+
if 'Accept' not in _header_params:
|
|
2426
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2427
|
+
[
|
|
2428
|
+
'application/json',
|
|
2429
|
+
'text/event-stream'
|
|
2430
|
+
]
|
|
2431
|
+
)
|
|
2432
|
+
|
|
2433
|
+
# set the HTTP header `Content-Type`
|
|
2434
|
+
if _content_type:
|
|
2435
|
+
_header_params['Content-Type'] = _content_type
|
|
2436
|
+
else:
|
|
2437
|
+
_default_content_type = (
|
|
2438
|
+
self.api_client.select_header_content_type(
|
|
2439
|
+
[
|
|
2440
|
+
'application/json'
|
|
2441
|
+
]
|
|
2442
|
+
)
|
|
2443
|
+
)
|
|
2444
|
+
if _default_content_type is not None:
|
|
2445
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2446
|
+
|
|
2447
|
+
# authentication setting
|
|
2448
|
+
_auth_settings: list[str] = [
|
|
2449
|
+
]
|
|
2450
|
+
|
|
2451
|
+
return self.api_client.param_serialize(
|
|
2452
|
+
method='POST',
|
|
2453
|
+
resource_path='/v1/messages',
|
|
2454
|
+
path_params=_path_params,
|
|
2455
|
+
query_params=_query_params,
|
|
2456
|
+
header_params=_header_params,
|
|
2457
|
+
body=_body_params,
|
|
2458
|
+
post_params=_form_params,
|
|
2459
|
+
files=_files,
|
|
2460
|
+
auth_settings=_auth_settings,
|
|
2461
|
+
collection_formats=_collection_formats,
|
|
2462
|
+
_host=_host,
|
|
2463
|
+
_request_auth=_request_auth
|
|
2464
|
+
)
|
|
2465
|
+
|
|
2466
|
+
|