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