qanswer-sdk 0.46.0.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.
- qanswer_sdk/__init__.py +1268 -0
- qanswer_sdk/api/__init__.py +64 -0
- qanswer_sdk/api/admin_api.py +7383 -0
- qanswer_sdk/api/ai_assistant_access_rights_api.py +5879 -0
- qanswer_sdk/api/ai_assistant_api.py +8960 -0
- qanswer_sdk/api/auto_complete_api.py +612 -0
- qanswer_sdk/api/bot_slack_api.py +1069 -0
- qanswer_sdk/api/branding_api.py +5723 -0
- qanswer_sdk/api/chatbot_api.py +1102 -0
- qanswer_sdk/api/connector_audio_api.py +3264 -0
- qanswer_sdk/api/connector_document_api.py +1990 -0
- qanswer_sdk/api/connector_e_consilium_api.py +313 -0
- qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1164 -0
- qanswer_sdk/api/connector_google_drive_api.py +1896 -0
- qanswer_sdk/api/connector_imapapi_api.py +1775 -0
- qanswer_sdk/api/connector_one_drive_api.py +1579 -0
- qanswer_sdk/api/connector_onenote_api.py +1596 -0
- qanswer_sdk/api/connector_pinecone_api.py +893 -0
- qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
- qanswer_sdk/api/connector_qn_a_api.py +1521 -0
- qanswer_sdk/api/connector_rdf_answer_api.py +1393 -0
- qanswer_sdk/api/connector_rdf_api.py +5093 -0
- qanswer_sdk/api/connector_sharepoint_api.py +3445 -0
- qanswer_sdk/api/connector_websearch_api.py +332 -0
- qanswer_sdk/api/connector_website_api.py +2829 -0
- qanswer_sdk/api/connectors_api.py +6824 -0
- qanswer_sdk/api/connectors_data_api.py +5415 -0
- qanswer_sdk/api/conversation_logs_api.py +13159 -0
- qanswer_sdk/api/dataset_api.py +6487 -0
- qanswer_sdk/api/dataset_config_api.py +4643 -0
- qanswer_sdk/api/debug_api.py +278 -0
- qanswer_sdk/api/default_api.py +763 -0
- qanswer_sdk/api/embedder_endpoint_api.py +3330 -0
- qanswer_sdk/api/frontend_config_api.py +270 -0
- qanswer_sdk/api/health_check_api_api.py +278 -0
- qanswer_sdk/api/llm_endpoint_api.py +4660 -0
- qanswer_sdk/api/mcp_api.py +11201 -0
- qanswer_sdk/api/metadata_api.py +2070 -0
- qanswer_sdk/api/notifications_api.py +1841 -0
- qanswer_sdk/api/o_auth2_api.py +648 -0
- qanswer_sdk/api/payment_api.py +1852 -0
- qanswer_sdk/api/socket_api.py +4220 -0
- qanswer_sdk/api/speech_to_text_api.py +919 -0
- qanswer_sdk/api/task_ai_excel_api.py +7541 -0
- qanswer_sdk/api/task_chat_api.py +2598 -0
- qanswer_sdk/api/task_document_parsing_api.py +619 -0
- qanswer_sdk/api/task_entity_linking_api.py +315 -0
- qanswer_sdk/api/task_rdf_linker_api.py +4408 -0
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3189 -0
- qanswer_sdk/api/task_rdf_text_linker_api.py +1452 -0
- qanswer_sdk/api/task_report_copilot_api.py +7010 -0
- qanswer_sdk/api/task_search_api.py +2012 -0
- qanswer_sdk/api/task_text2sparql_api.py +902 -0
- qanswer_sdk/api/task_text_classification_api.py +592 -0
- qanswer_sdk/api/tasks_api.py +318 -0
- qanswer_sdk/api/tool_embedder_api.py +5208 -0
- qanswer_sdk/api/tool_llm_api.py +6518 -0
- qanswer_sdk/api/unit_organizations_api.py +7086 -0
- qanswer_sdk/api/unit_teams_api.py +4255 -0
- qanswer_sdk/api/unit_user_api.py +11948 -0
- qanswer_sdk/api/v1_chat_completion_api.py +330 -0
- qanswer_sdk/api/v1_embeddings_api.py +297 -0
- qanswer_sdk/api_client.py +804 -0
- qanswer_sdk/api_response.py +21 -0
- qanswer_sdk/configuration.py +614 -0
- qanswer_sdk/exceptions.py +216 -0
- qanswer_sdk/models/__init__.py +567 -0
- qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
- qanswer_sdk/models/access_pdf_payload_model.py +111 -0
- qanswer_sdk/models/access_type.py +42 -0
- qanswer_sdk/models/access_type_shared.py +38 -0
- qanswer_sdk/models/add_qn_a_request.py +103 -0
- qanswer_sdk/models/add_synonyms.py +93 -0
- qanswer_sdk/models/add_synonyms_resp.py +89 -0
- qanswer_sdk/models/admin_overall_stats_response.py +105 -0
- qanswer_sdk/models/admin_user_overall_stats.py +99 -0
- qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
- qanswer_sdk/models/aggregate.py +93 -0
- qanswer_sdk/models/aggregation.py +116 -0
- qanswer_sdk/models/aggregation_type.py +41 -0
- qanswer_sdk/models/aggregations_group.py +102 -0
- qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
- qanswer_sdk/models/ai_assistant_dto.py +122 -0
- qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
- qanswer_sdk/models/ai_assistant_list.py +101 -0
- qanswer_sdk/models/ai_assistant_share_response.py +93 -0
- qanswer_sdk/models/ai_assistant_shared_access.py +113 -0
- qanswer_sdk/models/ai_excel_task_settings.py +125 -0
- qanswer_sdk/models/ai_excel_task_update.py +125 -0
- qanswer_sdk/models/ai_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/ai_template_base_with_id.py +95 -0
- qanswer_sdk/models/ai_template_cell.py +113 -0
- qanswer_sdk/models/ai_template_cell_base.py +87 -0
- qanswer_sdk/models/ai_template_cell_update_payload.py +95 -0
- qanswer_sdk/models/ai_template_column.py +99 -0
- qanswer_sdk/models/ai_template_column_base.py +93 -0
- qanswer_sdk/models/ai_template_column_update_payload.py +109 -0
- qanswer_sdk/models/ai_template_column_with_cells.py +109 -0
- qanswer_sdk/models/ai_template_create_payload.py +128 -0
- qanswer_sdk/models/ai_template_row.py +93 -0
- qanswer_sdk/models/ai_template_row_base.py +87 -0
- qanswer_sdk/models/ai_template_row_update_payload.py +103 -0
- qanswer_sdk/models/ai_template_row_with_cells.py +103 -0
- qanswer_sdk/models/ai_template_with_cells.py +134 -0
- qanswer_sdk/models/ai_template_with_cells_new_column_id.py +136 -0
- qanswer_sdk/models/allowed_extension.py +53 -0
- qanswer_sdk/models/allowed_file_extensions.py +98 -0
- qanswer_sdk/models/api_key_header_type.py +38 -0
- qanswer_sdk/models/api_key_mcp_authentication_config.py +94 -0
- qanswer_sdk/models/applied_filter_type.py +37 -0
- qanswer_sdk/models/applied_metadata_filter.py +103 -0
- qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
- qanswer_sdk/models/assistant_category_color_definition.py +89 -0
- qanswer_sdk/models/assistant_category_color_item.py +89 -0
- qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
- qanswer_sdk/models/assistant_category_count.py +91 -0
- qanswer_sdk/models/assistant_message_stop.py +93 -0
- qanswer_sdk/models/assistant_task.py +43 -0
- qanswer_sdk/models/assistant_template.py +111 -0
- qanswer_sdk/models/assistant_template_filter_dto.py +120 -0
- qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +121 -0
- qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
- qanswer_sdk/models/audio_file_upload_payload.py +107 -0
- qanswer_sdk/models/audio_format.py +37 -0
- qanswer_sdk/models/audio_segment.py +95 -0
- qanswer_sdk/models/audio_segment_update_payload.py +97 -0
- qanswer_sdk/models/audio_segment_update_response.py +91 -0
- qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
- qanswer_sdk/models/audio_speaker_update_response.py +91 -0
- qanswer_sdk/models/audio_transcription_list_response.py +101 -0
- qanswer_sdk/models/audio_transcription_mode.py +37 -0
- qanswer_sdk/models/audio_transcription_record.py +101 -0
- qanswer_sdk/models/audio_upload_response.py +99 -0
- qanswer_sdk/models/audio_upload_transcription.py +99 -0
- qanswer_sdk/models/audio_word_segment.py +93 -0
- qanswer_sdk/models/audio_word_span_change.py +94 -0
- qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
- qanswer_sdk/models/audio_word_span_update_response.py +91 -0
- qanswer_sdk/models/audio_word_update_payload.py +100 -0
- qanswer_sdk/models/audio_word_update_response.py +91 -0
- qanswer_sdk/models/auth_link_response.py +91 -0
- qanswer_sdk/models/auto_bot_description_request.py +89 -0
- qanswer_sdk/models/auto_bot_description_response.py +87 -0
- qanswer_sdk/models/available_aggregation.py +98 -0
- qanswer_sdk/models/available_connectors_response.py +99 -0
- qanswer_sdk/models/available_embedding_models_response.py +95 -0
- qanswer_sdk/models/available_endpoints_response.py +95 -0
- qanswer_sdk/models/available_logs_visibility_policy.py +103 -0
- qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
- qanswer_sdk/models/available_storage_preference.py +103 -0
- qanswer_sdk/models/base_connectors_response.py +89 -0
- qanswer_sdk/models/base_conversation_response.py +89 -0
- qanswer_sdk/models/base_feedback_response.py +89 -0
- qanswer_sdk/models/bot_answer_length.py +38 -0
- qanswer_sdk/models/branding_app_title.py +87 -0
- qanswer_sdk/models/branding_system_message.py +87 -0
- qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
- qanswer_sdk/models/capability_type.py +37 -0
- qanswer_sdk/models/cell.py +89 -0
- qanswer_sdk/models/change_password.py +89 -0
- qanswer_sdk/models/change_password_admin.py +89 -0
- qanswer_sdk/models/change_role.py +96 -0
- qanswer_sdk/models/chat_task_settings.py +141 -0
- qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/chat_task_update.py +139 -0
- qanswer_sdk/models/chatbot_chat_payload.py +148 -0
- qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
- qanswer_sdk/models/chatbot_llm_dto.py +147 -0
- qanswer_sdk/models/chatbot_response.py +151 -0
- qanswer_sdk/models/chatbot_setting_dto.py +99 -0
- qanswer_sdk/models/chatbot_setting_request.py +91 -0
- qanswer_sdk/models/class_info.py +89 -0
- qanswer_sdk/models/clone_dataset_request.py +104 -0
- qanswer_sdk/models/clone_dataset_response.py +91 -0
- qanswer_sdk/models/config.py +228 -0
- qanswer_sdk/models/config1.py +138 -0
- qanswer_sdk/models/connector_config_list_response.py +99 -0
- qanswer_sdk/models/connector_config_model.py +102 -0
- qanswer_sdk/models/connector_config_patch_payload.py +93 -0
- qanswer_sdk/models/connector_config_response.py +95 -0
- qanswer_sdk/models/connector_config_sync_response.py +93 -0
- qanswer_sdk/models/connector_config_type.py +37 -0
- qanswer_sdk/models/connector_model.py +118 -0
- qanswer_sdk/models/connector_type.py +50 -0
- qanswer_sdk/models/connector_type_dto.py +98 -0
- qanswer_sdk/models/connector_type_list_dto.py +95 -0
- qanswer_sdk/models/content_item.py +130 -0
- qanswer_sdk/models/content_item_type.py +39 -0
- qanswer_sdk/models/conversation_message.py +259 -0
- qanswer_sdk/models/conversation_message_error_key.py +52 -0
- qanswer_sdk/models/conversation_message_search_result.py +121 -0
- qanswer_sdk/models/conversation_model.py +169 -0
- qanswer_sdk/models/conversation_overall_stats.py +97 -0
- qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
- qanswer_sdk/models/conversation_retention_response.py +91 -0
- qanswer_sdk/models/conversation_statistics.py +95 -0
- qanswer_sdk/models/conversation_update.py +93 -0
- qanswer_sdk/models/conversation_users_stats.py +99 -0
- qanswer_sdk/models/conversation_users_stats_response.py +99 -0
- qanswer_sdk/models/coordinates.py +89 -0
- qanswer_sdk/models/cost_summary_dto.py +99 -0
- qanswer_sdk/models/create_connector_request.py +95 -0
- qanswer_sdk/models/create_connector_response.py +95 -0
- qanswer_sdk/models/create_dataset_request.py +145 -0
- qanswer_sdk/models/create_imap_connector_request.py +105 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
- qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
- qanswer_sdk/models/credits_info_global_dto.py +97 -0
- qanswer_sdk/models/credits_info_organization_dto.py +95 -0
- qanswer_sdk/models/currency.py +38 -0
- qanswer_sdk/models/data_filling_mode.py +39 -0
- qanswer_sdk/models/data_storage_preference.py +38 -0
- qanswer_sdk/models/dataset_config_request.py +138 -0
- qanswer_sdk/models/dataset_default_values_model.py +138 -0
- qanswer_sdk/models/dataset_detail.py +137 -0
- qanswer_sdk/models/dataset_detail_kg.py +97 -0
- qanswer_sdk/models/dataset_schema.py +242 -0
- qanswer_sdk/models/dataset_size_response.py +91 -0
- qanswer_sdk/models/dataset_type.py +38 -0
- qanswer_sdk/models/dataset_update_object.py +216 -0
- qanswer_sdk/models/dataset_users_response.py +87 -0
- qanswer_sdk/models/default_prompt.py +106 -0
- qanswer_sdk/models/delete_connector_model.py +96 -0
- qanswer_sdk/models/delete_connector_request.py +99 -0
- qanswer_sdk/models/delete_connectors_response.py +89 -0
- qanswer_sdk/models/delete_files_status_response.py +91 -0
- qanswer_sdk/models/delete_index.py +91 -0
- qanswer_sdk/models/delete_index_resp.py +89 -0
- qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
- qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/delete_synonym.py +93 -0
- qanswer_sdk/models/delete_synonym_resp.py +89 -0
- qanswer_sdk/models/delete_synonyms.py +91 -0
- qanswer_sdk/models/delete_user_response.py +89 -0
- qanswer_sdk/models/diarization_queue_status.py +99 -0
- qanswer_sdk/models/document_content_response.py +91 -0
- qanswer_sdk/models/document_content_update_model.py +99 -0
- qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
- qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
- qanswer_sdk/models/document_metadata.py +173 -0
- qanswer_sdk/models/document_metadata_list_wrapper.py +100 -0
- qanswer_sdk/models/document_parsing_task_settings.py +130 -0
- qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/document_parsing_task_update.py +127 -0
- qanswer_sdk/models/document_status_response.py +89 -0
- qanswer_sdk/models/dummy_error.py +89 -0
- qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
- qanswer_sdk/models/duplicate_report_template_response.py +87 -0
- qanswer_sdk/models/e_consilium_connector_config.py +108 -0
- qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
- qanswer_sdk/models/econsilium_file_metadata.py +105 -0
- qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
- qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
- qanswer_sdk/models/email_folder.py +91 -0
- qanswer_sdk/models/email_request.py +87 -0
- qanswer_sdk/models/embedder_cost_entry.py +91 -0
- qanswer_sdk/models/embedder_cost_filter.py +112 -0
- qanswer_sdk/models/embedder_cost_list.py +111 -0
- qanswer_sdk/models/embedder_create_dto.py +149 -0
- qanswer_sdk/models/embedder_detailed_dto.py +171 -0
- qanswer_sdk/models/embedder_dto.py +101 -0
- qanswer_sdk/models/embedder_list_dto.py +101 -0
- qanswer_sdk/models/embedder_update_dto.py +143 -0
- qanswer_sdk/models/embedding_endpoint.py +149 -0
- qanswer_sdk/models/embedding_endpoint_create.py +147 -0
- qanswer_sdk/models/embedding_endpoint_export_payload.py +87 -0
- qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
- qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
- qanswer_sdk/models/embedding_endpoint_names_validation_payload.py +87 -0
- qanswer_sdk/models/embedding_endpoint_update.py +141 -0
- qanswer_sdk/models/embedding_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/embedding_model.py +96 -0
- qanswer_sdk/models/embedding_provider.py +44 -0
- qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
- qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
- qanswer_sdk/models/endpoint_status.py +38 -0
- qanswer_sdk/models/entity_description.py +93 -0
- qanswer_sdk/models/entity_description_dto.py +93 -0
- qanswer_sdk/models/entity_linking_payload.py +97 -0
- qanswer_sdk/models/entity_linking_response.py +97 -0
- qanswer_sdk/models/entity_model_in_linking.py +95 -0
- qanswer_sdk/models/es_meta_data.py +98 -0
- qanswer_sdk/models/es_meta_data_value.py +87 -0
- qanswer_sdk/models/evaluate_feedback_response.py +109 -0
- qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
- qanswer_sdk/models/external_sources_quota_request.py +91 -0
- qanswer_sdk/models/external_sources_quota_response.py +89 -0
- qanswer_sdk/models/extra_body.py +91 -0
- qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
- qanswer_sdk/models/extract_robot_links_payload.py +88 -0
- qanswer_sdk/models/extract_robot_links_response.py +88 -0
- qanswer_sdk/models/fact.py +96 -0
- qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
- qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
- qanswer_sdk/models/feedback_model.py +141 -0
- qanswer_sdk/models/feedback_response.py +95 -0
- qanswer_sdk/models/feedback_update.py +105 -0
- qanswer_sdk/models/file_es_meta_data.py +116 -0
- qanswer_sdk/models/file_failure_reason.py +48 -0
- qanswer_sdk/models/file_folder_model.py +115 -0
- qanswer_sdk/models/file_model.py +130 -0
- qanswer_sdk/models/file_status.py +43 -0
- qanswer_sdk/models/file_type.py +37 -0
- qanswer_sdk/models/file_upload_payload.py +107 -0
- qanswer_sdk/models/files_by_connector_model.py +89 -0
- qanswer_sdk/models/g_drive_connector_info.py +96 -0
- qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/g_drive_download_request.py +103 -0
- qanswer_sdk/models/generate_ai_cells_by_dimension_payload.py +91 -0
- qanswer_sdk/models/generate_ai_cells_payload.py +95 -0
- qanswer_sdk/models/generation_params.py +89 -0
- qanswer_sdk/models/get_aggregations_payload.py +104 -0
- qanswer_sdk/models/get_connector_by_id_response.py +91 -0
- qanswer_sdk/models/get_conversation_response.py +95 -0
- qanswer_sdk/models/global_config_dto.py +135 -0
- qanswer_sdk/models/google_drive_connector_config.py +110 -0
- qanswer_sdk/models/guardrail_endpoint.py +121 -0
- qanswer_sdk/models/guardrail_mode.py +38 -0
- qanswer_sdk/models/highlight_audio_payload_model.py +109 -0
- qanswer_sdk/models/http_validation_error.py +95 -0
- qanswer_sdk/models/iframe_strategy.py +38 -0
- qanswer_sdk/models/image_url_detail.py +38 -0
- qanswer_sdk/models/imap_add_payload.py +105 -0
- qanswer_sdk/models/imap_additional_fields.py +101 -0
- qanswer_sdk/models/imap_file_metadata.py +114 -0
- qanswer_sdk/models/imap_search_response.py +113 -0
- qanswer_sdk/models/index_config.py +89 -0
- qanswer_sdk/models/install_response.py +89 -0
- qanswer_sdk/models/interface_origin.py +48 -0
- qanswer_sdk/models/ip2_geo_response.py +91 -0
- qanswer_sdk/models/is_enabled_response.py +87 -0
- qanswer_sdk/models/jwt_authentication_response.py +93 -0
- qanswer_sdk/models/label.py +89 -0
- qanswer_sdk/models/labeled_node.py +89 -0
- qanswer_sdk/models/language.py +42 -0
- qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
- qanswer_sdk/models/link.py +99 -0
- qanswer_sdk/models/link_extraction_response.py +97 -0
- qanswer_sdk/models/link_result_paginated.py +97 -0
- qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
- qanswer_sdk/models/linker.py +103 -0
- qanswer_sdk/models/linking_result_input.py +95 -0
- qanswer_sdk/models/linking_result_output.py +95 -0
- qanswer_sdk/models/links.py +99 -0
- qanswer_sdk/models/list_ai_templates_response.py +101 -0
- qanswer_sdk/models/list_connectors_response.py +95 -0
- qanswer_sdk/models/list_conversation_response.py +105 -0
- qanswer_sdk/models/list_feedback_response.py +105 -0
- qanswer_sdk/models/list_files_connector_response.py +107 -0
- qanswer_sdk/models/list_published_assistants_payload.py +115 -0
- qanswer_sdk/models/list_socket_events.py +95 -0
- qanswer_sdk/models/list_synonyms_model.py +95 -0
- qanswer_sdk/models/llm_context_ranges.py +93 -0
- qanswer_sdk/models/llm_context_ranges_response.py +93 -0
- qanswer_sdk/models/llm_cost_entry.py +97 -0
- qanswer_sdk/models/llm_cost_filter.py +112 -0
- qanswer_sdk/models/llm_cost_list.py +111 -0
- qanswer_sdk/models/llm_create_dto.py +208 -0
- qanswer_sdk/models/llm_detailed_dto.py +231 -0
- qanswer_sdk/models/llm_details.py +123 -0
- qanswer_sdk/models/llm_dto.py +147 -0
- qanswer_sdk/models/llm_endpoint.py +212 -0
- qanswer_sdk/models/llm_endpoint_create.py +204 -0
- qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
- qanswer_sdk/models/llm_endpoint_export_payload.py +87 -0
- qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
- qanswer_sdk/models/llm_endpoint_input.py +212 -0
- qanswer_sdk/models/llm_endpoint_modality.py +37 -0
- qanswer_sdk/models/llm_endpoint_names_validation_payload.py +87 -0
- qanswer_sdk/models/llm_endpoint_provider.py +44 -0
- qanswer_sdk/models/llm_endpoint_read_input.py +212 -0
- qanswer_sdk/models/llm_endpoint_read_output.py +212 -0
- qanswer_sdk/models/llm_endpoint_update.py +204 -0
- qanswer_sdk/models/llm_endpoint_usage_migration_response.py +93 -0
- qanswer_sdk/models/llm_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/llm_filter_dto.py +111 -0
- qanswer_sdk/models/llm_health_response.py +89 -0
- qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
- qanswer_sdk/models/llm_list_dto.py +101 -0
- qanswer_sdk/models/llm_update_dto.py +208 -0
- qanswer_sdk/models/llm_usage_origin.py +63 -0
- qanswer_sdk/models/location_details.py +97 -0
- qanswer_sdk/models/log_request.py +125 -0
- qanswer_sdk/models/login_request.py +89 -0
- qanswer_sdk/models/logs_visibility_policy.py +38 -0
- qanswer_sdk/models/logs_visibility_policy_payload.py +98 -0
- qanswer_sdk/models/logs_visibility_policy_response.py +98 -0
- qanswer_sdk/models/mcp_authentication_type.py +39 -0
- qanswer_sdk/models/mcp_connection.py +105 -0
- qanswer_sdk/models/mcp_connection_create.py +98 -0
- qanswer_sdk/models/mcp_server.py +167 -0
- qanswer_sdk/models/mcp_server0.py +167 -0
- qanswer_sdk/models/mcp_server_create.py +133 -0
- qanswer_sdk/models/mcp_server_dto.py +167 -0
- qanswer_sdk/models/mcp_server_type.py +37 -0
- qanswer_sdk/models/mcp_server_update.py +131 -0
- qanswer_sdk/models/mcp_tool_dto.py +141 -0
- qanswer_sdk/models/mcp_tool_info.py +95 -0
- qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
- qanswer_sdk/models/mcp_tool_update.py +91 -0
- qanswer_sdk/models/mcp_transport.py +37 -0
- qanswer_sdk/models/mcp_visibility.py +38 -0
- qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
- qanswer_sdk/models/message_role.py +38 -0
- qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
- qanswer_sdk/models/microsoft_connector_config.py +110 -0
- qanswer_sdk/models/modify_connector_request.py +107 -0
- qanswer_sdk/models/modify_file_display_name_request.py +97 -0
- qanswer_sdk/models/notification_dto.py +137 -0
- qanswer_sdk/models/notification_filter.py +116 -0
- qanswer_sdk/models/notification_list_dto.py +101 -0
- qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
- qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
- qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +109 -0
- qanswer_sdk/models/notification_payload_conversation_shared_dto.py +105 -0
- qanswer_sdk/models/notification_payload_dto.py +193 -0
- qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
- qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
- qanswer_sdk/models/notification_read_dto.py +89 -0
- qanswer_sdk/models/notification_type.py +44 -0
- qanswer_sdk/models/o_auth_redirect_response.py +89 -0
- qanswer_sdk/models/o_auth_service_dto.py +89 -0
- qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/one_drive_download_request.py +103 -0
- qanswer_sdk/models/one_note_download_by_ids.py +91 -0
- qanswer_sdk/models/one_note_download_request.py +103 -0
- qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
- qanswer_sdk/models/organization.py +93 -0
- qanswer_sdk/models/organization_creation.py +91 -0
- qanswer_sdk/models/organization_dto.py +93 -0
- qanswer_sdk/models/organization_filter_dto.py +134 -0
- qanswer_sdk/models/organization_list_dto.py +101 -0
- qanswer_sdk/models/paginated_report_templates.py +101 -0
- qanswer_sdk/models/password.py +89 -0
- qanswer_sdk/models/pinecone_index_model.py +91 -0
- qanswer_sdk/models/plan_dto.py +132 -0
- qanswer_sdk/models/predicted_class.py +89 -0
- qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
- qanswer_sdk/models/prepared_synonym_group.py +87 -0
- qanswer_sdk/models/pricing_plan.py +51 -0
- qanswer_sdk/models/pricing_type.py +38 -0
- qanswer_sdk/models/prompt_type.py +51 -0
- qanswer_sdk/models/provider.py +87 -0
- qanswer_sdk/models/publication_add_payload.py +105 -0
- qanswer_sdk/models/publication_file_metadata.py +105 -0
- qanswer_sdk/models/publication_office_additional_fields.py +111 -0
- qanswer_sdk/models/publication_office_connector_config.py +110 -0
- qanswer_sdk/models/publication_search_index_search_response.py +113 -0
- qanswer_sdk/models/published_assistant_from_java.py +94 -0
- qanswer_sdk/models/put_cell_payload.py +89 -0
- qanswer_sdk/models/qa_context.py +129 -0
- qanswer_sdk/models/qa_context_display_type.py +44 -0
- qanswer_sdk/models/qa_contexts.py +116 -0
- qanswer_sdk/models/qa_table.py +100 -0
- qanswer_sdk/models/qn_a_pair_model.py +103 -0
- qanswer_sdk/models/qn_a_pair_response.py +95 -0
- qanswer_sdk/models/question_suggestion_response.py +87 -0
- qanswer_sdk/models/rag_params.py +89 -0
- qanswer_sdk/models/rag_payload.py +186 -0
- qanswer_sdk/models/rag_response.py +155 -0
- qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
- qanswer_sdk/models/rdf_linked_entity.py +97 -0
- qanswer_sdk/models/reasoning_effort.py +39 -0
- qanswer_sdk/models/reference_model.py +99 -0
- qanswer_sdk/models/refresh_frequency.py +39 -0
- qanswer_sdk/models/refresh_token_request.py +87 -0
- qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
- qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
- qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
- qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
- qanswer_sdk/models/report_copilot_slot_task_settings.py +127 -0
- qanswer_sdk/models/report_copilot_slot_task_settings_update.py +127 -0
- qanswer_sdk/models/report_copilot_task_settings.py +125 -0
- qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/report_copilot_task_update.py +125 -0
- qanswer_sdk/models/report_template.py +139 -0
- qanswer_sdk/models/report_template_create_payload.py +117 -0
- qanswer_sdk/models/report_template_image_upload_response.py +87 -0
- qanswer_sdk/models/report_template_simplified.py +115 -0
- qanswer_sdk/models/report_template_simplified_payload.py +91 -0
- qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
- qanswer_sdk/models/report_template_update_payload.py +121 -0
- qanswer_sdk/models/report_templates_search_payload.py +106 -0
- qanswer_sdk/models/reset_password.py +87 -0
- qanswer_sdk/models/response_audit_model.py +99 -0
- qanswer_sdk/models/response_audit_stats_response.py +101 -0
- qanswer_sdk/models/response_get_dummy_union_connector_config_model_backend_api_connectors_config_dummy_models_union_get.py +228 -0
- qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
- qanswer_sdk/models/retry_params.py +89 -0
- qanswer_sdk/models/return_type.py +38 -0
- qanswer_sdk/models/role.py +99 -0
- qanswer_sdk/models/role_name.py +37 -0
- qanswer_sdk/models/scrolling_strategy.py +37 -0
- qanswer_sdk/models/search_conversation_messages_response.py +105 -0
- qanswer_sdk/models/search_document_response.py +105 -0
- qanswer_sdk/models/search_index_payload.py +114 -0
- qanswer_sdk/models/search_metadata_filter.py +94 -0
- qanswer_sdk/models/search_payload.py +146 -0
- qanswer_sdk/models/search_response.py +125 -0
- qanswer_sdk/models/search_synonyms_resp.py +91 -0
- qanswer_sdk/models/search_task_settings.py +139 -0
- qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/search_task_update.py +137 -0
- qanswer_sdk/models/sender_type.py +38 -0
- qanswer_sdk/models/share_point_connector_settings.py +94 -0
- qanswer_sdk/models/share_point_download_by_ids.py +99 -0
- qanswer_sdk/models/share_point_download_request.py +103 -0
- qanswer_sdk/models/shared_by.py +38 -0
- qanswer_sdk/models/shared_entity_type.py +38 -0
- qanswer_sdk/models/shared_organization_access.py +125 -0
- qanswer_sdk/models/shared_organization_access_dto.py +125 -0
- qanswer_sdk/models/shared_team_access.py +125 -0
- qanswer_sdk/models/shared_team_access_dto.py +125 -0
- qanswer_sdk/models/shared_user.py +99 -0
- qanswer_sdk/models/sign_up_request.py +108 -0
- qanswer_sdk/models/signout_request.py +87 -0
- qanswer_sdk/models/slot.py +162 -0
- qanswer_sdk/models/slot_history_entry.py +127 -0
- qanswer_sdk/models/slot_in_prompt.py +91 -0
- qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
- qanswer_sdk/models/slot_update.py +142 -0
- qanswer_sdk/models/socker_join_user.py +91 -0
- qanswer_sdk/models/socket_ai_cell_generation.py +99 -0
- qanswer_sdk/models/socket_conversation_message.py +280 -0
- qanswer_sdk/models/socket_events_q_answer.py +51 -0
- qanswer_sdk/models/socket_feedback_evaluation_progress.py +114 -0
- qanswer_sdk/models/socket_file_metadata.py +207 -0
- qanswer_sdk/models/socket_join_conversation.py +97 -0
- qanswer_sdk/models/socket_join_dataset.py +93 -0
- qanswer_sdk/models/socket_message_status.py +40 -0
- qanswer_sdk/models/socket_notification.py +127 -0
- qanswer_sdk/models/socket_report_continuation_response.py +106 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +122 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +122 -0
- qanswer_sdk/models/socket_report_copilot_refinement_response.py +108 -0
- qanswer_sdk/models/socket_speech2_text_response.py +131 -0
- qanswer_sdk/models/socket_stop_conversation.py +97 -0
- qanswer_sdk/models/source.py +125 -0
- qanswer_sdk/models/source_metadata.py +109 -0
- qanswer_sdk/models/speech2_text_response.py +119 -0
- qanswer_sdk/models/stat_per_date.py +89 -0
- qanswer_sdk/models/status_response.py +89 -0
- qanswer_sdk/models/stop_template_generation_payload.py +91 -0
- qanswer_sdk/models/storage_active_status.py +37 -0
- qanswer_sdk/models/subscription_response.py +101 -0
- qanswer_sdk/models/subscription_status.py +39 -0
- qanswer_sdk/models/suggestion_list_response.py +87 -0
- qanswer_sdk/models/summa_server.py +101 -0
- qanswer_sdk/models/task_category.py +58 -0
- qanswer_sdk/models/task_name.py +43 -0
- qanswer_sdk/models/team.py +93 -0
- qanswer_sdk/models/team_creation.py +89 -0
- qanswer_sdk/models/team_creation_dto.py +89 -0
- qanswer_sdk/models/team_dto.py +93 -0
- qanswer_sdk/models/team_filter_dto.py +141 -0
- qanswer_sdk/models/team_list_dto.py +101 -0
- qanswer_sdk/models/template_clip_structure.py +114 -0
- qanswer_sdk/models/template_toggle_request.py +93 -0
- qanswer_sdk/models/terms_bucket.py +94 -0
- qanswer_sdk/models/test_imap_connection_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_payload.py +188 -0
- qanswer_sdk/models/text2_sparql_task_settings.py +125 -0
- qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_task_update.py +125 -0
- qanswer_sdk/models/text_classification_payload.py +99 -0
- qanswer_sdk/models/text_classification_response.py +87 -0
- qanswer_sdk/models/text_classification_v2_payload.py +99 -0
- qanswer_sdk/models/text_classification_v2_response.py +95 -0
- qanswer_sdk/models/thinking_block.py +91 -0
- qanswer_sdk/models/tool_selection.py +89 -0
- qanswer_sdk/models/total_stat.py +96 -0
- qanswer_sdk/models/ui_mappings.py +141 -0
- qanswer_sdk/models/update_cells_payload.py +93 -0
- qanswer_sdk/models/update_file_es_meta_data.py +116 -0
- qanswer_sdk/models/update_metadata_model_input.py +97 -0
- qanswer_sdk/models/update_metadata_model_output.py +97 -0
- qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
- qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/update_synonyms.py +95 -0
- qanswer_sdk/models/update_synonyms_resp.py +89 -0
- qanswer_sdk/models/update_template_cells_payload.py +101 -0
- qanswer_sdk/models/upload_metadata.py +115 -0
- qanswer_sdk/models/user.py +91 -0
- qanswer_sdk/models/user_credits_config_dto.py +99 -0
- qanswer_sdk/models/user_credits_dto.py +106 -0
- qanswer_sdk/models/user_dataset_api_key.py +120 -0
- qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
- qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +102 -0
- qanswer_sdk/models/user_dto.py +91 -0
- qanswer_sdk/models/user_filter_dto.py +155 -0
- qanswer_sdk/models/user_identity_availability.py +87 -0
- qanswer_sdk/models/user_info_dto.py +95 -0
- qanswer_sdk/models/user_list_dto.py +101 -0
- qanswer_sdk/models/user_log.py +102 -0
- qanswer_sdk/models/user_log_dto.py +102 -0
- qanswer_sdk/models/user_logs_list_dto.py +97 -0
- qanswer_sdk/models/user_mcp_tool_selection_dto.py +118 -0
- qanswer_sdk/models/user_oauth_token.py +96 -0
- qanswer_sdk/models/user_oauth_token_dto.py +96 -0
- qanswer_sdk/models/user_profile_dto.py +200 -0
- qanswer_sdk/models/user_profile_list_dto.py +101 -0
- qanswer_sdk/models/user_stat_per_date.py +90 -0
- qanswer_sdk/models/validation_error.py +108 -0
- qanswer_sdk/models/validation_error_loc_inner.py +138 -0
- qanswer_sdk/models/warn_visibility.py +40 -0
- qanswer_sdk/models/websearch_connector_config.py +102 -0
- qanswer_sdk/models/websearch_scraping_site.py +91 -0
- qanswer_sdk/models/website_add_payload.py +102 -0
- qanswer_sdk/models/website_connector_config.py +102 -0
- qanswer_sdk/models/website_connector_settings.py +160 -0
- qanswer_sdk/models/widget_configs.py +109 -0
- qanswer_sdk/py.typed +0 -0
- qanswer_sdk/rest.py +258 -0
- qanswer_sdk-0.46.0.dev0.dist-info/METADATA +252 -0
- qanswer_sdk-0.46.0.dev0.dist-info/RECORD +624 -0
- qanswer_sdk-0.46.0.dev0.dist-info/WHEEL +5 -0
- qanswer_sdk-0.46.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,3330 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
free-text-client
|
|
5
|
+
|
|
6
|
+
QAnswer 2.0 API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, Dict, List, Tuple, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from qanswer_sdk.models.embedding_endpoint import EmbeddingEndpoint
|
|
23
|
+
from qanswer_sdk.models.embedding_endpoint_create import EmbeddingEndpointCreate
|
|
24
|
+
from qanswer_sdk.models.embedding_endpoint_export_payload import EmbeddingEndpointExportPayload
|
|
25
|
+
from qanswer_sdk.models.embedding_endpoint_import_response import EmbeddingEndpointImportResponse
|
|
26
|
+
from qanswer_sdk.models.embedding_endpoint_names_validation_payload import EmbeddingEndpointNamesValidationPayload
|
|
27
|
+
from qanswer_sdk.models.embedding_endpoint_update import EmbeddingEndpointUpdate
|
|
28
|
+
from qanswer_sdk.models.embedding_endpoint_validation_response import EmbeddingEndpointValidationResponse
|
|
29
|
+
|
|
30
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
|
31
|
+
from qanswer_sdk.api_response import ApiResponse
|
|
32
|
+
from qanswer_sdk.rest import RESTResponseType
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class EmbedderEndpointApi:
|
|
36
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
37
|
+
Ref: https://openapi-generator.tech
|
|
38
|
+
|
|
39
|
+
Do not edit the class manually.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, api_client=None) -> None:
|
|
43
|
+
if api_client is None:
|
|
44
|
+
api_client = ApiClient.get_default()
|
|
45
|
+
self.api_client = api_client
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@validate_call
|
|
49
|
+
def create_embedder_endpoint_v2(
|
|
50
|
+
self,
|
|
51
|
+
embedding_endpoint_create: EmbeddingEndpointCreate,
|
|
52
|
+
_request_timeout: Union[
|
|
53
|
+
None,
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Tuple[
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
58
|
+
]
|
|
59
|
+
] = None,
|
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
|
+
) -> EmbeddingEndpoint:
|
|
65
|
+
"""Create Embedder Endpoint V2
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:param embedding_endpoint_create: (required)
|
|
69
|
+
:type embedding_endpoint_create: EmbeddingEndpointCreate
|
|
70
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
71
|
+
number provided, it will be total request
|
|
72
|
+
timeout. It can also be a pair (tuple) of
|
|
73
|
+
(connection, read) timeouts.
|
|
74
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
75
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
76
|
+
request; this effectively ignores the
|
|
77
|
+
authentication in the spec for a single request.
|
|
78
|
+
:type _request_auth: dict, optional
|
|
79
|
+
:param _content_type: force content-type for the request.
|
|
80
|
+
:type _content_type: str, Optional
|
|
81
|
+
:param _headers: set to override the headers for a single
|
|
82
|
+
request; this effectively ignores the headers
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _headers: dict, optional
|
|
85
|
+
:param _host_index: set to override the host_index for a single
|
|
86
|
+
request; this effectively ignores the host_index
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _host_index: int, optional
|
|
89
|
+
:return: Returns the result object.
|
|
90
|
+
""" # noqa: E501
|
|
91
|
+
|
|
92
|
+
_param = self._create_embedder_endpoint_v2_serialize(
|
|
93
|
+
embedding_endpoint_create=embedding_endpoint_create,
|
|
94
|
+
_request_auth=_request_auth,
|
|
95
|
+
_content_type=_content_type,
|
|
96
|
+
_headers=_headers,
|
|
97
|
+
_host_index=_host_index
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
101
|
+
'200': "EmbeddingEndpoint",
|
|
102
|
+
'404': None,
|
|
103
|
+
'422': "HTTPValidationError",
|
|
104
|
+
}
|
|
105
|
+
response_data = self.api_client.call_api(
|
|
106
|
+
*_param,
|
|
107
|
+
_request_timeout=_request_timeout
|
|
108
|
+
)
|
|
109
|
+
response_data.read()
|
|
110
|
+
return self.api_client.response_deserialize(
|
|
111
|
+
response_data=response_data,
|
|
112
|
+
response_types_map=_response_types_map,
|
|
113
|
+
).data
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
@validate_call
|
|
117
|
+
def create_embedder_endpoint_v2_with_http_info(
|
|
118
|
+
self,
|
|
119
|
+
embedding_endpoint_create: EmbeddingEndpointCreate,
|
|
120
|
+
_request_timeout: Union[
|
|
121
|
+
None,
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Tuple[
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
126
|
+
]
|
|
127
|
+
] = None,
|
|
128
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_content_type: Optional[StrictStr] = None,
|
|
130
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
132
|
+
) -> ApiResponse[EmbeddingEndpoint]:
|
|
133
|
+
"""Create Embedder Endpoint V2
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
:param embedding_endpoint_create: (required)
|
|
137
|
+
:type embedding_endpoint_create: EmbeddingEndpointCreate
|
|
138
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
139
|
+
number provided, it will be total request
|
|
140
|
+
timeout. It can also be a pair (tuple) of
|
|
141
|
+
(connection, read) timeouts.
|
|
142
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
143
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
144
|
+
request; this effectively ignores the
|
|
145
|
+
authentication in the spec for a single request.
|
|
146
|
+
:type _request_auth: dict, optional
|
|
147
|
+
:param _content_type: force content-type for the request.
|
|
148
|
+
:type _content_type: str, Optional
|
|
149
|
+
:param _headers: set to override the headers for a single
|
|
150
|
+
request; this effectively ignores the headers
|
|
151
|
+
in the spec for a single request.
|
|
152
|
+
:type _headers: dict, optional
|
|
153
|
+
:param _host_index: set to override the host_index for a single
|
|
154
|
+
request; this effectively ignores the host_index
|
|
155
|
+
in the spec for a single request.
|
|
156
|
+
:type _host_index: int, optional
|
|
157
|
+
:return: Returns the result object.
|
|
158
|
+
""" # noqa: E501
|
|
159
|
+
|
|
160
|
+
_param = self._create_embedder_endpoint_v2_serialize(
|
|
161
|
+
embedding_endpoint_create=embedding_endpoint_create,
|
|
162
|
+
_request_auth=_request_auth,
|
|
163
|
+
_content_type=_content_type,
|
|
164
|
+
_headers=_headers,
|
|
165
|
+
_host_index=_host_index
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
169
|
+
'200': "EmbeddingEndpoint",
|
|
170
|
+
'404': None,
|
|
171
|
+
'422': "HTTPValidationError",
|
|
172
|
+
}
|
|
173
|
+
response_data = self.api_client.call_api(
|
|
174
|
+
*_param,
|
|
175
|
+
_request_timeout=_request_timeout
|
|
176
|
+
)
|
|
177
|
+
response_data.read()
|
|
178
|
+
return self.api_client.response_deserialize(
|
|
179
|
+
response_data=response_data,
|
|
180
|
+
response_types_map=_response_types_map,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
@validate_call
|
|
185
|
+
def create_embedder_endpoint_v2_without_preload_content(
|
|
186
|
+
self,
|
|
187
|
+
embedding_endpoint_create: EmbeddingEndpointCreate,
|
|
188
|
+
_request_timeout: Union[
|
|
189
|
+
None,
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
191
|
+
Tuple[
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
194
|
+
]
|
|
195
|
+
] = None,
|
|
196
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
197
|
+
_content_type: Optional[StrictStr] = None,
|
|
198
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
199
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
200
|
+
) -> RESTResponseType:
|
|
201
|
+
"""Create Embedder Endpoint V2
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
:param embedding_endpoint_create: (required)
|
|
205
|
+
:type embedding_endpoint_create: EmbeddingEndpointCreate
|
|
206
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
207
|
+
number provided, it will be total request
|
|
208
|
+
timeout. It can also be a pair (tuple) of
|
|
209
|
+
(connection, read) timeouts.
|
|
210
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
211
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
212
|
+
request; this effectively ignores the
|
|
213
|
+
authentication in the spec for a single request.
|
|
214
|
+
:type _request_auth: dict, optional
|
|
215
|
+
:param _content_type: force content-type for the request.
|
|
216
|
+
:type _content_type: str, Optional
|
|
217
|
+
:param _headers: set to override the headers for a single
|
|
218
|
+
request; this effectively ignores the headers
|
|
219
|
+
in the spec for a single request.
|
|
220
|
+
:type _headers: dict, optional
|
|
221
|
+
:param _host_index: set to override the host_index for a single
|
|
222
|
+
request; this effectively ignores the host_index
|
|
223
|
+
in the spec for a single request.
|
|
224
|
+
:type _host_index: int, optional
|
|
225
|
+
:return: Returns the result object.
|
|
226
|
+
""" # noqa: E501
|
|
227
|
+
|
|
228
|
+
_param = self._create_embedder_endpoint_v2_serialize(
|
|
229
|
+
embedding_endpoint_create=embedding_endpoint_create,
|
|
230
|
+
_request_auth=_request_auth,
|
|
231
|
+
_content_type=_content_type,
|
|
232
|
+
_headers=_headers,
|
|
233
|
+
_host_index=_host_index
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
237
|
+
'200': "EmbeddingEndpoint",
|
|
238
|
+
'404': None,
|
|
239
|
+
'422': "HTTPValidationError",
|
|
240
|
+
}
|
|
241
|
+
response_data = self.api_client.call_api(
|
|
242
|
+
*_param,
|
|
243
|
+
_request_timeout=_request_timeout
|
|
244
|
+
)
|
|
245
|
+
return response_data.response
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def _create_embedder_endpoint_v2_serialize(
|
|
249
|
+
self,
|
|
250
|
+
embedding_endpoint_create,
|
|
251
|
+
_request_auth,
|
|
252
|
+
_content_type,
|
|
253
|
+
_headers,
|
|
254
|
+
_host_index,
|
|
255
|
+
) -> RequestSerialized:
|
|
256
|
+
|
|
257
|
+
_host = None
|
|
258
|
+
|
|
259
|
+
_collection_formats: Dict[str, str] = {
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
_path_params: Dict[str, str] = {}
|
|
263
|
+
_query_params: List[Tuple[str, str]] = []
|
|
264
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
265
|
+
_form_params: List[Tuple[str, str]] = []
|
|
266
|
+
_files: Dict[
|
|
267
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
268
|
+
] = {}
|
|
269
|
+
_body_params: Optional[bytes] = None
|
|
270
|
+
|
|
271
|
+
# process the path parameters
|
|
272
|
+
# process the query parameters
|
|
273
|
+
# process the header parameters
|
|
274
|
+
# process the form parameters
|
|
275
|
+
# process the body parameter
|
|
276
|
+
if embedding_endpoint_create is not None:
|
|
277
|
+
_body_params = embedding_endpoint_create
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# set the HTTP header `Accept`
|
|
281
|
+
if 'Accept' not in _header_params:
|
|
282
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
283
|
+
[
|
|
284
|
+
'application/json'
|
|
285
|
+
]
|
|
286
|
+
)
|
|
287
|
+
|
|
288
|
+
# set the HTTP header `Content-Type`
|
|
289
|
+
if _content_type:
|
|
290
|
+
_header_params['Content-Type'] = _content_type
|
|
291
|
+
else:
|
|
292
|
+
_default_content_type = (
|
|
293
|
+
self.api_client.select_header_content_type(
|
|
294
|
+
[
|
|
295
|
+
'application/json'
|
|
296
|
+
]
|
|
297
|
+
)
|
|
298
|
+
)
|
|
299
|
+
if _default_content_type is not None:
|
|
300
|
+
_header_params['Content-Type'] = _default_content_type
|
|
301
|
+
|
|
302
|
+
# authentication setting
|
|
303
|
+
_auth_settings: List[str] = [
|
|
304
|
+
'QAnswer-Api-Key',
|
|
305
|
+
'Bearer token'
|
|
306
|
+
]
|
|
307
|
+
|
|
308
|
+
return self.api_client.param_serialize(
|
|
309
|
+
method='POST',
|
|
310
|
+
resource_path='/backend/api/embedder-endpoint',
|
|
311
|
+
path_params=_path_params,
|
|
312
|
+
query_params=_query_params,
|
|
313
|
+
header_params=_header_params,
|
|
314
|
+
body=_body_params,
|
|
315
|
+
post_params=_form_params,
|
|
316
|
+
files=_files,
|
|
317
|
+
auth_settings=_auth_settings,
|
|
318
|
+
collection_formats=_collection_formats,
|
|
319
|
+
_host=_host,
|
|
320
|
+
_request_auth=_request_auth
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
@validate_call
|
|
327
|
+
def create_embeddings(
|
|
328
|
+
self,
|
|
329
|
+
embedder_id: StrictInt,
|
|
330
|
+
request_body: Dict[str, Any],
|
|
331
|
+
_request_timeout: Union[
|
|
332
|
+
None,
|
|
333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
334
|
+
Tuple[
|
|
335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
336
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
337
|
+
]
|
|
338
|
+
] = None,
|
|
339
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
340
|
+
_content_type: Optional[StrictStr] = None,
|
|
341
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
342
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
343
|
+
) -> object:
|
|
344
|
+
"""Create Embeddings
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
:param embedder_id: (required)
|
|
348
|
+
:type embedder_id: int
|
|
349
|
+
:param request_body: (required)
|
|
350
|
+
:type request_body: Dict[str, object]
|
|
351
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
352
|
+
number provided, it will be total request
|
|
353
|
+
timeout. It can also be a pair (tuple) of
|
|
354
|
+
(connection, read) timeouts.
|
|
355
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
356
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
357
|
+
request; this effectively ignores the
|
|
358
|
+
authentication in the spec for a single request.
|
|
359
|
+
:type _request_auth: dict, optional
|
|
360
|
+
:param _content_type: force content-type for the request.
|
|
361
|
+
:type _content_type: str, Optional
|
|
362
|
+
:param _headers: set to override the headers for a single
|
|
363
|
+
request; this effectively ignores the headers
|
|
364
|
+
in the spec for a single request.
|
|
365
|
+
:type _headers: dict, optional
|
|
366
|
+
:param _host_index: set to override the host_index for a single
|
|
367
|
+
request; this effectively ignores the host_index
|
|
368
|
+
in the spec for a single request.
|
|
369
|
+
:type _host_index: int, optional
|
|
370
|
+
:return: Returns the result object.
|
|
371
|
+
""" # noqa: E501
|
|
372
|
+
|
|
373
|
+
_param = self._create_embeddings_serialize(
|
|
374
|
+
embedder_id=embedder_id,
|
|
375
|
+
request_body=request_body,
|
|
376
|
+
_request_auth=_request_auth,
|
|
377
|
+
_content_type=_content_type,
|
|
378
|
+
_headers=_headers,
|
|
379
|
+
_host_index=_host_index
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
383
|
+
'200': "object",
|
|
384
|
+
'404': None,
|
|
385
|
+
'422': "HTTPValidationError",
|
|
386
|
+
}
|
|
387
|
+
response_data = self.api_client.call_api(
|
|
388
|
+
*_param,
|
|
389
|
+
_request_timeout=_request_timeout
|
|
390
|
+
)
|
|
391
|
+
response_data.read()
|
|
392
|
+
return self.api_client.response_deserialize(
|
|
393
|
+
response_data=response_data,
|
|
394
|
+
response_types_map=_response_types_map,
|
|
395
|
+
).data
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
@validate_call
|
|
399
|
+
def create_embeddings_with_http_info(
|
|
400
|
+
self,
|
|
401
|
+
embedder_id: StrictInt,
|
|
402
|
+
request_body: Dict[str, Any],
|
|
403
|
+
_request_timeout: Union[
|
|
404
|
+
None,
|
|
405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
406
|
+
Tuple[
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
408
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
409
|
+
]
|
|
410
|
+
] = None,
|
|
411
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
412
|
+
_content_type: Optional[StrictStr] = None,
|
|
413
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
414
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
415
|
+
) -> ApiResponse[object]:
|
|
416
|
+
"""Create Embeddings
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
:param embedder_id: (required)
|
|
420
|
+
:type embedder_id: int
|
|
421
|
+
:param request_body: (required)
|
|
422
|
+
:type request_body: Dict[str, object]
|
|
423
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
424
|
+
number provided, it will be total request
|
|
425
|
+
timeout. It can also be a pair (tuple) of
|
|
426
|
+
(connection, read) timeouts.
|
|
427
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
428
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
429
|
+
request; this effectively ignores the
|
|
430
|
+
authentication in the spec for a single request.
|
|
431
|
+
:type _request_auth: dict, optional
|
|
432
|
+
:param _content_type: force content-type for the request.
|
|
433
|
+
:type _content_type: str, Optional
|
|
434
|
+
:param _headers: set to override the headers for a single
|
|
435
|
+
request; this effectively ignores the headers
|
|
436
|
+
in the spec for a single request.
|
|
437
|
+
:type _headers: dict, optional
|
|
438
|
+
:param _host_index: set to override the host_index for a single
|
|
439
|
+
request; this effectively ignores the host_index
|
|
440
|
+
in the spec for a single request.
|
|
441
|
+
:type _host_index: int, optional
|
|
442
|
+
:return: Returns the result object.
|
|
443
|
+
""" # noqa: E501
|
|
444
|
+
|
|
445
|
+
_param = self._create_embeddings_serialize(
|
|
446
|
+
embedder_id=embedder_id,
|
|
447
|
+
request_body=request_body,
|
|
448
|
+
_request_auth=_request_auth,
|
|
449
|
+
_content_type=_content_type,
|
|
450
|
+
_headers=_headers,
|
|
451
|
+
_host_index=_host_index
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
455
|
+
'200': "object",
|
|
456
|
+
'404': None,
|
|
457
|
+
'422': "HTTPValidationError",
|
|
458
|
+
}
|
|
459
|
+
response_data = self.api_client.call_api(
|
|
460
|
+
*_param,
|
|
461
|
+
_request_timeout=_request_timeout
|
|
462
|
+
)
|
|
463
|
+
response_data.read()
|
|
464
|
+
return self.api_client.response_deserialize(
|
|
465
|
+
response_data=response_data,
|
|
466
|
+
response_types_map=_response_types_map,
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
@validate_call
|
|
471
|
+
def create_embeddings_without_preload_content(
|
|
472
|
+
self,
|
|
473
|
+
embedder_id: StrictInt,
|
|
474
|
+
request_body: Dict[str, Any],
|
|
475
|
+
_request_timeout: Union[
|
|
476
|
+
None,
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
478
|
+
Tuple[
|
|
479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
480
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
481
|
+
]
|
|
482
|
+
] = None,
|
|
483
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
484
|
+
_content_type: Optional[StrictStr] = None,
|
|
485
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
486
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
487
|
+
) -> RESTResponseType:
|
|
488
|
+
"""Create Embeddings
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
:param embedder_id: (required)
|
|
492
|
+
:type embedder_id: int
|
|
493
|
+
:param request_body: (required)
|
|
494
|
+
:type request_body: Dict[str, object]
|
|
495
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
496
|
+
number provided, it will be total request
|
|
497
|
+
timeout. It can also be a pair (tuple) of
|
|
498
|
+
(connection, read) timeouts.
|
|
499
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
500
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
501
|
+
request; this effectively ignores the
|
|
502
|
+
authentication in the spec for a single request.
|
|
503
|
+
:type _request_auth: dict, optional
|
|
504
|
+
:param _content_type: force content-type for the request.
|
|
505
|
+
:type _content_type: str, Optional
|
|
506
|
+
:param _headers: set to override the headers for a single
|
|
507
|
+
request; this effectively ignores the headers
|
|
508
|
+
in the spec for a single request.
|
|
509
|
+
:type _headers: dict, optional
|
|
510
|
+
:param _host_index: set to override the host_index for a single
|
|
511
|
+
request; this effectively ignores the host_index
|
|
512
|
+
in the spec for a single request.
|
|
513
|
+
:type _host_index: int, optional
|
|
514
|
+
:return: Returns the result object.
|
|
515
|
+
""" # noqa: E501
|
|
516
|
+
|
|
517
|
+
_param = self._create_embeddings_serialize(
|
|
518
|
+
embedder_id=embedder_id,
|
|
519
|
+
request_body=request_body,
|
|
520
|
+
_request_auth=_request_auth,
|
|
521
|
+
_content_type=_content_type,
|
|
522
|
+
_headers=_headers,
|
|
523
|
+
_host_index=_host_index
|
|
524
|
+
)
|
|
525
|
+
|
|
526
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
527
|
+
'200': "object",
|
|
528
|
+
'404': None,
|
|
529
|
+
'422': "HTTPValidationError",
|
|
530
|
+
}
|
|
531
|
+
response_data = self.api_client.call_api(
|
|
532
|
+
*_param,
|
|
533
|
+
_request_timeout=_request_timeout
|
|
534
|
+
)
|
|
535
|
+
return response_data.response
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
def _create_embeddings_serialize(
|
|
539
|
+
self,
|
|
540
|
+
embedder_id,
|
|
541
|
+
request_body,
|
|
542
|
+
_request_auth,
|
|
543
|
+
_content_type,
|
|
544
|
+
_headers,
|
|
545
|
+
_host_index,
|
|
546
|
+
) -> RequestSerialized:
|
|
547
|
+
|
|
548
|
+
_host = None
|
|
549
|
+
|
|
550
|
+
_collection_formats: Dict[str, str] = {
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
_path_params: Dict[str, str] = {}
|
|
554
|
+
_query_params: List[Tuple[str, str]] = []
|
|
555
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
556
|
+
_form_params: List[Tuple[str, str]] = []
|
|
557
|
+
_files: Dict[
|
|
558
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
559
|
+
] = {}
|
|
560
|
+
_body_params: Optional[bytes] = None
|
|
561
|
+
|
|
562
|
+
# process the path parameters
|
|
563
|
+
if embedder_id is not None:
|
|
564
|
+
_path_params['embedder_id'] = embedder_id
|
|
565
|
+
# process the query parameters
|
|
566
|
+
# process the header parameters
|
|
567
|
+
# process the form parameters
|
|
568
|
+
# process the body parameter
|
|
569
|
+
if request_body is not None:
|
|
570
|
+
_body_params = request_body
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
# set the HTTP header `Accept`
|
|
574
|
+
if 'Accept' not in _header_params:
|
|
575
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
576
|
+
[
|
|
577
|
+
'application/json'
|
|
578
|
+
]
|
|
579
|
+
)
|
|
580
|
+
|
|
581
|
+
# set the HTTP header `Content-Type`
|
|
582
|
+
if _content_type:
|
|
583
|
+
_header_params['Content-Type'] = _content_type
|
|
584
|
+
else:
|
|
585
|
+
_default_content_type = (
|
|
586
|
+
self.api_client.select_header_content_type(
|
|
587
|
+
[
|
|
588
|
+
'application/json'
|
|
589
|
+
]
|
|
590
|
+
)
|
|
591
|
+
)
|
|
592
|
+
if _default_content_type is not None:
|
|
593
|
+
_header_params['Content-Type'] = _default_content_type
|
|
594
|
+
|
|
595
|
+
# authentication setting
|
|
596
|
+
_auth_settings: List[str] = [
|
|
597
|
+
'QAnswer-Api-Key',
|
|
598
|
+
'Bearer token'
|
|
599
|
+
]
|
|
600
|
+
|
|
601
|
+
return self.api_client.param_serialize(
|
|
602
|
+
method='POST',
|
|
603
|
+
resource_path='/backend/api/embedder-endpoint/{embedder_id}/embeddings',
|
|
604
|
+
path_params=_path_params,
|
|
605
|
+
query_params=_query_params,
|
|
606
|
+
header_params=_header_params,
|
|
607
|
+
body=_body_params,
|
|
608
|
+
post_params=_form_params,
|
|
609
|
+
files=_files,
|
|
610
|
+
auth_settings=_auth_settings,
|
|
611
|
+
collection_formats=_collection_formats,
|
|
612
|
+
_host=_host,
|
|
613
|
+
_request_auth=_request_auth
|
|
614
|
+
)
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
@validate_call
|
|
620
|
+
def delete_embedder_endpoint_v2(
|
|
621
|
+
self,
|
|
622
|
+
id: StrictInt,
|
|
623
|
+
_request_timeout: Union[
|
|
624
|
+
None,
|
|
625
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
626
|
+
Tuple[
|
|
627
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
628
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
629
|
+
]
|
|
630
|
+
] = None,
|
|
631
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
632
|
+
_content_type: Optional[StrictStr] = None,
|
|
633
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
634
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
635
|
+
) -> object:
|
|
636
|
+
"""Delete Embedder Endpoint V2
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
:param id: (required)
|
|
640
|
+
:type id: int
|
|
641
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
642
|
+
number provided, it will be total request
|
|
643
|
+
timeout. It can also be a pair (tuple) of
|
|
644
|
+
(connection, read) timeouts.
|
|
645
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
646
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
647
|
+
request; this effectively ignores the
|
|
648
|
+
authentication in the spec for a single request.
|
|
649
|
+
:type _request_auth: dict, optional
|
|
650
|
+
:param _content_type: force content-type for the request.
|
|
651
|
+
:type _content_type: str, Optional
|
|
652
|
+
:param _headers: set to override the headers for a single
|
|
653
|
+
request; this effectively ignores the headers
|
|
654
|
+
in the spec for a single request.
|
|
655
|
+
:type _headers: dict, optional
|
|
656
|
+
:param _host_index: set to override the host_index for a single
|
|
657
|
+
request; this effectively ignores the host_index
|
|
658
|
+
in the spec for a single request.
|
|
659
|
+
:type _host_index: int, optional
|
|
660
|
+
:return: Returns the result object.
|
|
661
|
+
""" # noqa: E501
|
|
662
|
+
|
|
663
|
+
_param = self._delete_embedder_endpoint_v2_serialize(
|
|
664
|
+
id=id,
|
|
665
|
+
_request_auth=_request_auth,
|
|
666
|
+
_content_type=_content_type,
|
|
667
|
+
_headers=_headers,
|
|
668
|
+
_host_index=_host_index
|
|
669
|
+
)
|
|
670
|
+
|
|
671
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
672
|
+
'200': "object",
|
|
673
|
+
'404': None,
|
|
674
|
+
'422': "HTTPValidationError",
|
|
675
|
+
}
|
|
676
|
+
response_data = self.api_client.call_api(
|
|
677
|
+
*_param,
|
|
678
|
+
_request_timeout=_request_timeout
|
|
679
|
+
)
|
|
680
|
+
response_data.read()
|
|
681
|
+
return self.api_client.response_deserialize(
|
|
682
|
+
response_data=response_data,
|
|
683
|
+
response_types_map=_response_types_map,
|
|
684
|
+
).data
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
@validate_call
|
|
688
|
+
def delete_embedder_endpoint_v2_with_http_info(
|
|
689
|
+
self,
|
|
690
|
+
id: StrictInt,
|
|
691
|
+
_request_timeout: Union[
|
|
692
|
+
None,
|
|
693
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
694
|
+
Tuple[
|
|
695
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
696
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
697
|
+
]
|
|
698
|
+
] = None,
|
|
699
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
700
|
+
_content_type: Optional[StrictStr] = None,
|
|
701
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
702
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
703
|
+
) -> ApiResponse[object]:
|
|
704
|
+
"""Delete Embedder Endpoint V2
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
:param id: (required)
|
|
708
|
+
:type id: int
|
|
709
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
710
|
+
number provided, it will be total request
|
|
711
|
+
timeout. It can also be a pair (tuple) of
|
|
712
|
+
(connection, read) timeouts.
|
|
713
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
714
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
715
|
+
request; this effectively ignores the
|
|
716
|
+
authentication in the spec for a single request.
|
|
717
|
+
:type _request_auth: dict, optional
|
|
718
|
+
:param _content_type: force content-type for the request.
|
|
719
|
+
:type _content_type: str, Optional
|
|
720
|
+
:param _headers: set to override the headers for a single
|
|
721
|
+
request; this effectively ignores the headers
|
|
722
|
+
in the spec for a single request.
|
|
723
|
+
:type _headers: dict, optional
|
|
724
|
+
:param _host_index: set to override the host_index for a single
|
|
725
|
+
request; this effectively ignores the host_index
|
|
726
|
+
in the spec for a single request.
|
|
727
|
+
:type _host_index: int, optional
|
|
728
|
+
:return: Returns the result object.
|
|
729
|
+
""" # noqa: E501
|
|
730
|
+
|
|
731
|
+
_param = self._delete_embedder_endpoint_v2_serialize(
|
|
732
|
+
id=id,
|
|
733
|
+
_request_auth=_request_auth,
|
|
734
|
+
_content_type=_content_type,
|
|
735
|
+
_headers=_headers,
|
|
736
|
+
_host_index=_host_index
|
|
737
|
+
)
|
|
738
|
+
|
|
739
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
740
|
+
'200': "object",
|
|
741
|
+
'404': None,
|
|
742
|
+
'422': "HTTPValidationError",
|
|
743
|
+
}
|
|
744
|
+
response_data = self.api_client.call_api(
|
|
745
|
+
*_param,
|
|
746
|
+
_request_timeout=_request_timeout
|
|
747
|
+
)
|
|
748
|
+
response_data.read()
|
|
749
|
+
return self.api_client.response_deserialize(
|
|
750
|
+
response_data=response_data,
|
|
751
|
+
response_types_map=_response_types_map,
|
|
752
|
+
)
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
@validate_call
|
|
756
|
+
def delete_embedder_endpoint_v2_without_preload_content(
|
|
757
|
+
self,
|
|
758
|
+
id: StrictInt,
|
|
759
|
+
_request_timeout: Union[
|
|
760
|
+
None,
|
|
761
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
762
|
+
Tuple[
|
|
763
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
764
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
765
|
+
]
|
|
766
|
+
] = None,
|
|
767
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
768
|
+
_content_type: Optional[StrictStr] = None,
|
|
769
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
770
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
771
|
+
) -> RESTResponseType:
|
|
772
|
+
"""Delete Embedder Endpoint V2
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
:param id: (required)
|
|
776
|
+
:type id: int
|
|
777
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
778
|
+
number provided, it will be total request
|
|
779
|
+
timeout. It can also be a pair (tuple) of
|
|
780
|
+
(connection, read) timeouts.
|
|
781
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
782
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
783
|
+
request; this effectively ignores the
|
|
784
|
+
authentication in the spec for a single request.
|
|
785
|
+
:type _request_auth: dict, optional
|
|
786
|
+
:param _content_type: force content-type for the request.
|
|
787
|
+
:type _content_type: str, Optional
|
|
788
|
+
:param _headers: set to override the headers for a single
|
|
789
|
+
request; this effectively ignores the headers
|
|
790
|
+
in the spec for a single request.
|
|
791
|
+
:type _headers: dict, optional
|
|
792
|
+
:param _host_index: set to override the host_index for a single
|
|
793
|
+
request; this effectively ignores the host_index
|
|
794
|
+
in the spec for a single request.
|
|
795
|
+
:type _host_index: int, optional
|
|
796
|
+
:return: Returns the result object.
|
|
797
|
+
""" # noqa: E501
|
|
798
|
+
|
|
799
|
+
_param = self._delete_embedder_endpoint_v2_serialize(
|
|
800
|
+
id=id,
|
|
801
|
+
_request_auth=_request_auth,
|
|
802
|
+
_content_type=_content_type,
|
|
803
|
+
_headers=_headers,
|
|
804
|
+
_host_index=_host_index
|
|
805
|
+
)
|
|
806
|
+
|
|
807
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
808
|
+
'200': "object",
|
|
809
|
+
'404': None,
|
|
810
|
+
'422': "HTTPValidationError",
|
|
811
|
+
}
|
|
812
|
+
response_data = self.api_client.call_api(
|
|
813
|
+
*_param,
|
|
814
|
+
_request_timeout=_request_timeout
|
|
815
|
+
)
|
|
816
|
+
return response_data.response
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
def _delete_embedder_endpoint_v2_serialize(
|
|
820
|
+
self,
|
|
821
|
+
id,
|
|
822
|
+
_request_auth,
|
|
823
|
+
_content_type,
|
|
824
|
+
_headers,
|
|
825
|
+
_host_index,
|
|
826
|
+
) -> RequestSerialized:
|
|
827
|
+
|
|
828
|
+
_host = None
|
|
829
|
+
|
|
830
|
+
_collection_formats: Dict[str, str] = {
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
_path_params: Dict[str, str] = {}
|
|
834
|
+
_query_params: List[Tuple[str, str]] = []
|
|
835
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
836
|
+
_form_params: List[Tuple[str, str]] = []
|
|
837
|
+
_files: Dict[
|
|
838
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
839
|
+
] = {}
|
|
840
|
+
_body_params: Optional[bytes] = None
|
|
841
|
+
|
|
842
|
+
# process the path parameters
|
|
843
|
+
if id is not None:
|
|
844
|
+
_path_params['id'] = id
|
|
845
|
+
# process the query parameters
|
|
846
|
+
# process the header parameters
|
|
847
|
+
# process the form parameters
|
|
848
|
+
# process the body parameter
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
# set the HTTP header `Accept`
|
|
852
|
+
if 'Accept' not in _header_params:
|
|
853
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
854
|
+
[
|
|
855
|
+
'application/json'
|
|
856
|
+
]
|
|
857
|
+
)
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
# authentication setting
|
|
861
|
+
_auth_settings: List[str] = [
|
|
862
|
+
'QAnswer-Api-Key',
|
|
863
|
+
'Bearer token'
|
|
864
|
+
]
|
|
865
|
+
|
|
866
|
+
return self.api_client.param_serialize(
|
|
867
|
+
method='DELETE',
|
|
868
|
+
resource_path='/backend/api/embedder-endpoint/{id}',
|
|
869
|
+
path_params=_path_params,
|
|
870
|
+
query_params=_query_params,
|
|
871
|
+
header_params=_header_params,
|
|
872
|
+
body=_body_params,
|
|
873
|
+
post_params=_form_params,
|
|
874
|
+
files=_files,
|
|
875
|
+
auth_settings=_auth_settings,
|
|
876
|
+
collection_formats=_collection_formats,
|
|
877
|
+
_host=_host,
|
|
878
|
+
_request_auth=_request_auth
|
|
879
|
+
)
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
@validate_call
|
|
885
|
+
def export_embedder_endpoints_v2(
|
|
886
|
+
self,
|
|
887
|
+
embedding_endpoint_export_payload: EmbeddingEndpointExportPayload,
|
|
888
|
+
_request_timeout: Union[
|
|
889
|
+
None,
|
|
890
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
891
|
+
Tuple[
|
|
892
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
893
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
894
|
+
]
|
|
895
|
+
] = None,
|
|
896
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
897
|
+
_content_type: Optional[StrictStr] = None,
|
|
898
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
899
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
900
|
+
) -> object:
|
|
901
|
+
"""Export Embedder Endpoints V2
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
:param embedding_endpoint_export_payload: (required)
|
|
905
|
+
:type embedding_endpoint_export_payload: EmbeddingEndpointExportPayload
|
|
906
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
907
|
+
number provided, it will be total request
|
|
908
|
+
timeout. It can also be a pair (tuple) of
|
|
909
|
+
(connection, read) timeouts.
|
|
910
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
911
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
912
|
+
request; this effectively ignores the
|
|
913
|
+
authentication in the spec for a single request.
|
|
914
|
+
:type _request_auth: dict, optional
|
|
915
|
+
:param _content_type: force content-type for the request.
|
|
916
|
+
:type _content_type: str, Optional
|
|
917
|
+
:param _headers: set to override the headers for a single
|
|
918
|
+
request; this effectively ignores the headers
|
|
919
|
+
in the spec for a single request.
|
|
920
|
+
:type _headers: dict, optional
|
|
921
|
+
:param _host_index: set to override the host_index for a single
|
|
922
|
+
request; this effectively ignores the host_index
|
|
923
|
+
in the spec for a single request.
|
|
924
|
+
:type _host_index: int, optional
|
|
925
|
+
:return: Returns the result object.
|
|
926
|
+
""" # noqa: E501
|
|
927
|
+
|
|
928
|
+
_param = self._export_embedder_endpoints_v2_serialize(
|
|
929
|
+
embedding_endpoint_export_payload=embedding_endpoint_export_payload,
|
|
930
|
+
_request_auth=_request_auth,
|
|
931
|
+
_content_type=_content_type,
|
|
932
|
+
_headers=_headers,
|
|
933
|
+
_host_index=_host_index
|
|
934
|
+
)
|
|
935
|
+
|
|
936
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
937
|
+
'200': "object",
|
|
938
|
+
'404': None,
|
|
939
|
+
'422': "HTTPValidationError",
|
|
940
|
+
}
|
|
941
|
+
response_data = self.api_client.call_api(
|
|
942
|
+
*_param,
|
|
943
|
+
_request_timeout=_request_timeout
|
|
944
|
+
)
|
|
945
|
+
response_data.read()
|
|
946
|
+
return self.api_client.response_deserialize(
|
|
947
|
+
response_data=response_data,
|
|
948
|
+
response_types_map=_response_types_map,
|
|
949
|
+
).data
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
@validate_call
|
|
953
|
+
def export_embedder_endpoints_v2_with_http_info(
|
|
954
|
+
self,
|
|
955
|
+
embedding_endpoint_export_payload: EmbeddingEndpointExportPayload,
|
|
956
|
+
_request_timeout: Union[
|
|
957
|
+
None,
|
|
958
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
959
|
+
Tuple[
|
|
960
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
961
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
962
|
+
]
|
|
963
|
+
] = None,
|
|
964
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
965
|
+
_content_type: Optional[StrictStr] = None,
|
|
966
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
967
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
968
|
+
) -> ApiResponse[object]:
|
|
969
|
+
"""Export Embedder Endpoints V2
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
:param embedding_endpoint_export_payload: (required)
|
|
973
|
+
:type embedding_endpoint_export_payload: EmbeddingEndpointExportPayload
|
|
974
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
975
|
+
number provided, it will be total request
|
|
976
|
+
timeout. It can also be a pair (tuple) of
|
|
977
|
+
(connection, read) timeouts.
|
|
978
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
979
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
980
|
+
request; this effectively ignores the
|
|
981
|
+
authentication in the spec for a single request.
|
|
982
|
+
:type _request_auth: dict, optional
|
|
983
|
+
:param _content_type: force content-type for the request.
|
|
984
|
+
:type _content_type: str, Optional
|
|
985
|
+
:param _headers: set to override the headers for a single
|
|
986
|
+
request; this effectively ignores the headers
|
|
987
|
+
in the spec for a single request.
|
|
988
|
+
:type _headers: dict, optional
|
|
989
|
+
:param _host_index: set to override the host_index for a single
|
|
990
|
+
request; this effectively ignores the host_index
|
|
991
|
+
in the spec for a single request.
|
|
992
|
+
:type _host_index: int, optional
|
|
993
|
+
:return: Returns the result object.
|
|
994
|
+
""" # noqa: E501
|
|
995
|
+
|
|
996
|
+
_param = self._export_embedder_endpoints_v2_serialize(
|
|
997
|
+
embedding_endpoint_export_payload=embedding_endpoint_export_payload,
|
|
998
|
+
_request_auth=_request_auth,
|
|
999
|
+
_content_type=_content_type,
|
|
1000
|
+
_headers=_headers,
|
|
1001
|
+
_host_index=_host_index
|
|
1002
|
+
)
|
|
1003
|
+
|
|
1004
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1005
|
+
'200': "object",
|
|
1006
|
+
'404': None,
|
|
1007
|
+
'422': "HTTPValidationError",
|
|
1008
|
+
}
|
|
1009
|
+
response_data = self.api_client.call_api(
|
|
1010
|
+
*_param,
|
|
1011
|
+
_request_timeout=_request_timeout
|
|
1012
|
+
)
|
|
1013
|
+
response_data.read()
|
|
1014
|
+
return self.api_client.response_deserialize(
|
|
1015
|
+
response_data=response_data,
|
|
1016
|
+
response_types_map=_response_types_map,
|
|
1017
|
+
)
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
@validate_call
|
|
1021
|
+
def export_embedder_endpoints_v2_without_preload_content(
|
|
1022
|
+
self,
|
|
1023
|
+
embedding_endpoint_export_payload: EmbeddingEndpointExportPayload,
|
|
1024
|
+
_request_timeout: Union[
|
|
1025
|
+
None,
|
|
1026
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1027
|
+
Tuple[
|
|
1028
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1029
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1030
|
+
]
|
|
1031
|
+
] = None,
|
|
1032
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1033
|
+
_content_type: Optional[StrictStr] = None,
|
|
1034
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1035
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1036
|
+
) -> RESTResponseType:
|
|
1037
|
+
"""Export Embedder Endpoints V2
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
:param embedding_endpoint_export_payload: (required)
|
|
1041
|
+
:type embedding_endpoint_export_payload: EmbeddingEndpointExportPayload
|
|
1042
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1043
|
+
number provided, it will be total request
|
|
1044
|
+
timeout. It can also be a pair (tuple) of
|
|
1045
|
+
(connection, read) timeouts.
|
|
1046
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1047
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1048
|
+
request; this effectively ignores the
|
|
1049
|
+
authentication in the spec for a single request.
|
|
1050
|
+
:type _request_auth: dict, optional
|
|
1051
|
+
:param _content_type: force content-type for the request.
|
|
1052
|
+
:type _content_type: str, Optional
|
|
1053
|
+
:param _headers: set to override the headers for a single
|
|
1054
|
+
request; this effectively ignores the headers
|
|
1055
|
+
in the spec for a single request.
|
|
1056
|
+
:type _headers: dict, optional
|
|
1057
|
+
:param _host_index: set to override the host_index for a single
|
|
1058
|
+
request; this effectively ignores the host_index
|
|
1059
|
+
in the spec for a single request.
|
|
1060
|
+
:type _host_index: int, optional
|
|
1061
|
+
:return: Returns the result object.
|
|
1062
|
+
""" # noqa: E501
|
|
1063
|
+
|
|
1064
|
+
_param = self._export_embedder_endpoints_v2_serialize(
|
|
1065
|
+
embedding_endpoint_export_payload=embedding_endpoint_export_payload,
|
|
1066
|
+
_request_auth=_request_auth,
|
|
1067
|
+
_content_type=_content_type,
|
|
1068
|
+
_headers=_headers,
|
|
1069
|
+
_host_index=_host_index
|
|
1070
|
+
)
|
|
1071
|
+
|
|
1072
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1073
|
+
'200': "object",
|
|
1074
|
+
'404': None,
|
|
1075
|
+
'422': "HTTPValidationError",
|
|
1076
|
+
}
|
|
1077
|
+
response_data = self.api_client.call_api(
|
|
1078
|
+
*_param,
|
|
1079
|
+
_request_timeout=_request_timeout
|
|
1080
|
+
)
|
|
1081
|
+
return response_data.response
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
def _export_embedder_endpoints_v2_serialize(
|
|
1085
|
+
self,
|
|
1086
|
+
embedding_endpoint_export_payload,
|
|
1087
|
+
_request_auth,
|
|
1088
|
+
_content_type,
|
|
1089
|
+
_headers,
|
|
1090
|
+
_host_index,
|
|
1091
|
+
) -> RequestSerialized:
|
|
1092
|
+
|
|
1093
|
+
_host = None
|
|
1094
|
+
|
|
1095
|
+
_collection_formats: Dict[str, str] = {
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
_path_params: Dict[str, str] = {}
|
|
1099
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1100
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1101
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1102
|
+
_files: Dict[
|
|
1103
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1104
|
+
] = {}
|
|
1105
|
+
_body_params: Optional[bytes] = None
|
|
1106
|
+
|
|
1107
|
+
# process the path parameters
|
|
1108
|
+
# process the query parameters
|
|
1109
|
+
# process the header parameters
|
|
1110
|
+
# process the form parameters
|
|
1111
|
+
# process the body parameter
|
|
1112
|
+
if embedding_endpoint_export_payload is not None:
|
|
1113
|
+
_body_params = embedding_endpoint_export_payload
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
# set the HTTP header `Accept`
|
|
1117
|
+
if 'Accept' not in _header_params:
|
|
1118
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1119
|
+
[
|
|
1120
|
+
'application/json'
|
|
1121
|
+
]
|
|
1122
|
+
)
|
|
1123
|
+
|
|
1124
|
+
# set the HTTP header `Content-Type`
|
|
1125
|
+
if _content_type:
|
|
1126
|
+
_header_params['Content-Type'] = _content_type
|
|
1127
|
+
else:
|
|
1128
|
+
_default_content_type = (
|
|
1129
|
+
self.api_client.select_header_content_type(
|
|
1130
|
+
[
|
|
1131
|
+
'application/json'
|
|
1132
|
+
]
|
|
1133
|
+
)
|
|
1134
|
+
)
|
|
1135
|
+
if _default_content_type is not None:
|
|
1136
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1137
|
+
|
|
1138
|
+
# authentication setting
|
|
1139
|
+
_auth_settings: List[str] = [
|
|
1140
|
+
'QAnswer-Api-Key',
|
|
1141
|
+
'Bearer token'
|
|
1142
|
+
]
|
|
1143
|
+
|
|
1144
|
+
return self.api_client.param_serialize(
|
|
1145
|
+
method='POST',
|
|
1146
|
+
resource_path='/backend/api/embedder-endpoint/export',
|
|
1147
|
+
path_params=_path_params,
|
|
1148
|
+
query_params=_query_params,
|
|
1149
|
+
header_params=_header_params,
|
|
1150
|
+
body=_body_params,
|
|
1151
|
+
post_params=_form_params,
|
|
1152
|
+
files=_files,
|
|
1153
|
+
auth_settings=_auth_settings,
|
|
1154
|
+
collection_formats=_collection_formats,
|
|
1155
|
+
_host=_host,
|
|
1156
|
+
_request_auth=_request_auth
|
|
1157
|
+
)
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
|
|
1162
|
+
@validate_call
|
|
1163
|
+
def import_embedder_endpoints_v2(
|
|
1164
|
+
self,
|
|
1165
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
1166
|
+
_request_timeout: Union[
|
|
1167
|
+
None,
|
|
1168
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1169
|
+
Tuple[
|
|
1170
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1171
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1172
|
+
]
|
|
1173
|
+
] = None,
|
|
1174
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1175
|
+
_content_type: Optional[StrictStr] = None,
|
|
1176
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1177
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1178
|
+
) -> EmbeddingEndpointImportResponse:
|
|
1179
|
+
"""Import Embedder Endpoints V2
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
:param file: (required)
|
|
1183
|
+
:type file: bytearray
|
|
1184
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1185
|
+
number provided, it will be total request
|
|
1186
|
+
timeout. It can also be a pair (tuple) of
|
|
1187
|
+
(connection, read) timeouts.
|
|
1188
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1189
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1190
|
+
request; this effectively ignores the
|
|
1191
|
+
authentication in the spec for a single request.
|
|
1192
|
+
:type _request_auth: dict, optional
|
|
1193
|
+
:param _content_type: force content-type for the request.
|
|
1194
|
+
:type _content_type: str, Optional
|
|
1195
|
+
:param _headers: set to override the headers for a single
|
|
1196
|
+
request; this effectively ignores the headers
|
|
1197
|
+
in the spec for a single request.
|
|
1198
|
+
:type _headers: dict, optional
|
|
1199
|
+
:param _host_index: set to override the host_index for a single
|
|
1200
|
+
request; this effectively ignores the host_index
|
|
1201
|
+
in the spec for a single request.
|
|
1202
|
+
:type _host_index: int, optional
|
|
1203
|
+
:return: Returns the result object.
|
|
1204
|
+
""" # noqa: E501
|
|
1205
|
+
|
|
1206
|
+
_param = self._import_embedder_endpoints_v2_serialize(
|
|
1207
|
+
file=file,
|
|
1208
|
+
_request_auth=_request_auth,
|
|
1209
|
+
_content_type=_content_type,
|
|
1210
|
+
_headers=_headers,
|
|
1211
|
+
_host_index=_host_index
|
|
1212
|
+
)
|
|
1213
|
+
|
|
1214
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1215
|
+
'200': "EmbeddingEndpointImportResponse",
|
|
1216
|
+
'404': None,
|
|
1217
|
+
'422': "HTTPValidationError",
|
|
1218
|
+
}
|
|
1219
|
+
response_data = self.api_client.call_api(
|
|
1220
|
+
*_param,
|
|
1221
|
+
_request_timeout=_request_timeout
|
|
1222
|
+
)
|
|
1223
|
+
response_data.read()
|
|
1224
|
+
return self.api_client.response_deserialize(
|
|
1225
|
+
response_data=response_data,
|
|
1226
|
+
response_types_map=_response_types_map,
|
|
1227
|
+
).data
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
@validate_call
|
|
1231
|
+
def import_embedder_endpoints_v2_with_http_info(
|
|
1232
|
+
self,
|
|
1233
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
1234
|
+
_request_timeout: Union[
|
|
1235
|
+
None,
|
|
1236
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1237
|
+
Tuple[
|
|
1238
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1239
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1240
|
+
]
|
|
1241
|
+
] = None,
|
|
1242
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1243
|
+
_content_type: Optional[StrictStr] = None,
|
|
1244
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1245
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1246
|
+
) -> ApiResponse[EmbeddingEndpointImportResponse]:
|
|
1247
|
+
"""Import Embedder Endpoints V2
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
:param file: (required)
|
|
1251
|
+
:type file: bytearray
|
|
1252
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1253
|
+
number provided, it will be total request
|
|
1254
|
+
timeout. It can also be a pair (tuple) of
|
|
1255
|
+
(connection, read) timeouts.
|
|
1256
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1257
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1258
|
+
request; this effectively ignores the
|
|
1259
|
+
authentication in the spec for a single request.
|
|
1260
|
+
:type _request_auth: dict, optional
|
|
1261
|
+
:param _content_type: force content-type for the request.
|
|
1262
|
+
:type _content_type: str, Optional
|
|
1263
|
+
:param _headers: set to override the headers for a single
|
|
1264
|
+
request; this effectively ignores the headers
|
|
1265
|
+
in the spec for a single request.
|
|
1266
|
+
:type _headers: dict, optional
|
|
1267
|
+
:param _host_index: set to override the host_index for a single
|
|
1268
|
+
request; this effectively ignores the host_index
|
|
1269
|
+
in the spec for a single request.
|
|
1270
|
+
:type _host_index: int, optional
|
|
1271
|
+
:return: Returns the result object.
|
|
1272
|
+
""" # noqa: E501
|
|
1273
|
+
|
|
1274
|
+
_param = self._import_embedder_endpoints_v2_serialize(
|
|
1275
|
+
file=file,
|
|
1276
|
+
_request_auth=_request_auth,
|
|
1277
|
+
_content_type=_content_type,
|
|
1278
|
+
_headers=_headers,
|
|
1279
|
+
_host_index=_host_index
|
|
1280
|
+
)
|
|
1281
|
+
|
|
1282
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1283
|
+
'200': "EmbeddingEndpointImportResponse",
|
|
1284
|
+
'404': None,
|
|
1285
|
+
'422': "HTTPValidationError",
|
|
1286
|
+
}
|
|
1287
|
+
response_data = self.api_client.call_api(
|
|
1288
|
+
*_param,
|
|
1289
|
+
_request_timeout=_request_timeout
|
|
1290
|
+
)
|
|
1291
|
+
response_data.read()
|
|
1292
|
+
return self.api_client.response_deserialize(
|
|
1293
|
+
response_data=response_data,
|
|
1294
|
+
response_types_map=_response_types_map,
|
|
1295
|
+
)
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
@validate_call
|
|
1299
|
+
def import_embedder_endpoints_v2_without_preload_content(
|
|
1300
|
+
self,
|
|
1301
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
1302
|
+
_request_timeout: Union[
|
|
1303
|
+
None,
|
|
1304
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1305
|
+
Tuple[
|
|
1306
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1307
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1308
|
+
]
|
|
1309
|
+
] = None,
|
|
1310
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1311
|
+
_content_type: Optional[StrictStr] = None,
|
|
1312
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1313
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1314
|
+
) -> RESTResponseType:
|
|
1315
|
+
"""Import Embedder Endpoints V2
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
:param file: (required)
|
|
1319
|
+
:type file: bytearray
|
|
1320
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1321
|
+
number provided, it will be total request
|
|
1322
|
+
timeout. It can also be a pair (tuple) of
|
|
1323
|
+
(connection, read) timeouts.
|
|
1324
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1325
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1326
|
+
request; this effectively ignores the
|
|
1327
|
+
authentication in the spec for a single request.
|
|
1328
|
+
:type _request_auth: dict, optional
|
|
1329
|
+
:param _content_type: force content-type for the request.
|
|
1330
|
+
:type _content_type: str, Optional
|
|
1331
|
+
:param _headers: set to override the headers for a single
|
|
1332
|
+
request; this effectively ignores the headers
|
|
1333
|
+
in the spec for a single request.
|
|
1334
|
+
:type _headers: dict, optional
|
|
1335
|
+
:param _host_index: set to override the host_index for a single
|
|
1336
|
+
request; this effectively ignores the host_index
|
|
1337
|
+
in the spec for a single request.
|
|
1338
|
+
:type _host_index: int, optional
|
|
1339
|
+
:return: Returns the result object.
|
|
1340
|
+
""" # noqa: E501
|
|
1341
|
+
|
|
1342
|
+
_param = self._import_embedder_endpoints_v2_serialize(
|
|
1343
|
+
file=file,
|
|
1344
|
+
_request_auth=_request_auth,
|
|
1345
|
+
_content_type=_content_type,
|
|
1346
|
+
_headers=_headers,
|
|
1347
|
+
_host_index=_host_index
|
|
1348
|
+
)
|
|
1349
|
+
|
|
1350
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1351
|
+
'200': "EmbeddingEndpointImportResponse",
|
|
1352
|
+
'404': None,
|
|
1353
|
+
'422': "HTTPValidationError",
|
|
1354
|
+
}
|
|
1355
|
+
response_data = self.api_client.call_api(
|
|
1356
|
+
*_param,
|
|
1357
|
+
_request_timeout=_request_timeout
|
|
1358
|
+
)
|
|
1359
|
+
return response_data.response
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
def _import_embedder_endpoints_v2_serialize(
|
|
1363
|
+
self,
|
|
1364
|
+
file,
|
|
1365
|
+
_request_auth,
|
|
1366
|
+
_content_type,
|
|
1367
|
+
_headers,
|
|
1368
|
+
_host_index,
|
|
1369
|
+
) -> RequestSerialized:
|
|
1370
|
+
|
|
1371
|
+
_host = None
|
|
1372
|
+
|
|
1373
|
+
_collection_formats: Dict[str, str] = {
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
_path_params: Dict[str, str] = {}
|
|
1377
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1378
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1379
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1380
|
+
_files: Dict[
|
|
1381
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1382
|
+
] = {}
|
|
1383
|
+
_body_params: Optional[bytes] = None
|
|
1384
|
+
|
|
1385
|
+
# process the path parameters
|
|
1386
|
+
# process the query parameters
|
|
1387
|
+
# process the header parameters
|
|
1388
|
+
# process the form parameters
|
|
1389
|
+
if file is not None:
|
|
1390
|
+
_files['file'] = file
|
|
1391
|
+
# process the body parameter
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
# set the HTTP header `Accept`
|
|
1395
|
+
if 'Accept' not in _header_params:
|
|
1396
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1397
|
+
[
|
|
1398
|
+
'application/json'
|
|
1399
|
+
]
|
|
1400
|
+
)
|
|
1401
|
+
|
|
1402
|
+
# set the HTTP header `Content-Type`
|
|
1403
|
+
if _content_type:
|
|
1404
|
+
_header_params['Content-Type'] = _content_type
|
|
1405
|
+
else:
|
|
1406
|
+
_default_content_type = (
|
|
1407
|
+
self.api_client.select_header_content_type(
|
|
1408
|
+
[
|
|
1409
|
+
'multipart/form-data'
|
|
1410
|
+
]
|
|
1411
|
+
)
|
|
1412
|
+
)
|
|
1413
|
+
if _default_content_type is not None:
|
|
1414
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1415
|
+
|
|
1416
|
+
# authentication setting
|
|
1417
|
+
_auth_settings: List[str] = [
|
|
1418
|
+
'QAnswer-Api-Key',
|
|
1419
|
+
'Bearer token'
|
|
1420
|
+
]
|
|
1421
|
+
|
|
1422
|
+
return self.api_client.param_serialize(
|
|
1423
|
+
method='POST',
|
|
1424
|
+
resource_path='/backend/api/embedder-endpoint/import',
|
|
1425
|
+
path_params=_path_params,
|
|
1426
|
+
query_params=_query_params,
|
|
1427
|
+
header_params=_header_params,
|
|
1428
|
+
body=_body_params,
|
|
1429
|
+
post_params=_form_params,
|
|
1430
|
+
files=_files,
|
|
1431
|
+
auth_settings=_auth_settings,
|
|
1432
|
+
collection_formats=_collection_formats,
|
|
1433
|
+
_host=_host,
|
|
1434
|
+
_request_auth=_request_auth
|
|
1435
|
+
)
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
|
|
1440
|
+
@validate_call
|
|
1441
|
+
def read_embedder_endpoint_by_id(
|
|
1442
|
+
self,
|
|
1443
|
+
id: StrictInt,
|
|
1444
|
+
_request_timeout: Union[
|
|
1445
|
+
None,
|
|
1446
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1447
|
+
Tuple[
|
|
1448
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1449
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1450
|
+
]
|
|
1451
|
+
] = None,
|
|
1452
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1453
|
+
_content_type: Optional[StrictStr] = None,
|
|
1454
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1455
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1456
|
+
) -> EmbeddingEndpoint:
|
|
1457
|
+
"""Read Embedder Endpoint By Id
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
:param id: (required)
|
|
1461
|
+
:type id: int
|
|
1462
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1463
|
+
number provided, it will be total request
|
|
1464
|
+
timeout. It can also be a pair (tuple) of
|
|
1465
|
+
(connection, read) timeouts.
|
|
1466
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1467
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1468
|
+
request; this effectively ignores the
|
|
1469
|
+
authentication in the spec for a single request.
|
|
1470
|
+
:type _request_auth: dict, optional
|
|
1471
|
+
:param _content_type: force content-type for the request.
|
|
1472
|
+
:type _content_type: str, Optional
|
|
1473
|
+
:param _headers: set to override the headers for a single
|
|
1474
|
+
request; this effectively ignores the headers
|
|
1475
|
+
in the spec for a single request.
|
|
1476
|
+
:type _headers: dict, optional
|
|
1477
|
+
:param _host_index: set to override the host_index for a single
|
|
1478
|
+
request; this effectively ignores the host_index
|
|
1479
|
+
in the spec for a single request.
|
|
1480
|
+
:type _host_index: int, optional
|
|
1481
|
+
:return: Returns the result object.
|
|
1482
|
+
""" # noqa: E501
|
|
1483
|
+
|
|
1484
|
+
_param = self._read_embedder_endpoint_by_id_serialize(
|
|
1485
|
+
id=id,
|
|
1486
|
+
_request_auth=_request_auth,
|
|
1487
|
+
_content_type=_content_type,
|
|
1488
|
+
_headers=_headers,
|
|
1489
|
+
_host_index=_host_index
|
|
1490
|
+
)
|
|
1491
|
+
|
|
1492
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1493
|
+
'200': "EmbeddingEndpoint",
|
|
1494
|
+
'404': None,
|
|
1495
|
+
'422': "HTTPValidationError",
|
|
1496
|
+
}
|
|
1497
|
+
response_data = self.api_client.call_api(
|
|
1498
|
+
*_param,
|
|
1499
|
+
_request_timeout=_request_timeout
|
|
1500
|
+
)
|
|
1501
|
+
response_data.read()
|
|
1502
|
+
return self.api_client.response_deserialize(
|
|
1503
|
+
response_data=response_data,
|
|
1504
|
+
response_types_map=_response_types_map,
|
|
1505
|
+
).data
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
@validate_call
|
|
1509
|
+
def read_embedder_endpoint_by_id_with_http_info(
|
|
1510
|
+
self,
|
|
1511
|
+
id: StrictInt,
|
|
1512
|
+
_request_timeout: Union[
|
|
1513
|
+
None,
|
|
1514
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1515
|
+
Tuple[
|
|
1516
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1517
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1518
|
+
]
|
|
1519
|
+
] = None,
|
|
1520
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1521
|
+
_content_type: Optional[StrictStr] = None,
|
|
1522
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1523
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1524
|
+
) -> ApiResponse[EmbeddingEndpoint]:
|
|
1525
|
+
"""Read Embedder Endpoint By Id
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
:param id: (required)
|
|
1529
|
+
:type id: int
|
|
1530
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1531
|
+
number provided, it will be total request
|
|
1532
|
+
timeout. It can also be a pair (tuple) of
|
|
1533
|
+
(connection, read) timeouts.
|
|
1534
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1535
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1536
|
+
request; this effectively ignores the
|
|
1537
|
+
authentication in the spec for a single request.
|
|
1538
|
+
:type _request_auth: dict, optional
|
|
1539
|
+
:param _content_type: force content-type for the request.
|
|
1540
|
+
:type _content_type: str, Optional
|
|
1541
|
+
:param _headers: set to override the headers for a single
|
|
1542
|
+
request; this effectively ignores the headers
|
|
1543
|
+
in the spec for a single request.
|
|
1544
|
+
:type _headers: dict, optional
|
|
1545
|
+
:param _host_index: set to override the host_index for a single
|
|
1546
|
+
request; this effectively ignores the host_index
|
|
1547
|
+
in the spec for a single request.
|
|
1548
|
+
:type _host_index: int, optional
|
|
1549
|
+
:return: Returns the result object.
|
|
1550
|
+
""" # noqa: E501
|
|
1551
|
+
|
|
1552
|
+
_param = self._read_embedder_endpoint_by_id_serialize(
|
|
1553
|
+
id=id,
|
|
1554
|
+
_request_auth=_request_auth,
|
|
1555
|
+
_content_type=_content_type,
|
|
1556
|
+
_headers=_headers,
|
|
1557
|
+
_host_index=_host_index
|
|
1558
|
+
)
|
|
1559
|
+
|
|
1560
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1561
|
+
'200': "EmbeddingEndpoint",
|
|
1562
|
+
'404': None,
|
|
1563
|
+
'422': "HTTPValidationError",
|
|
1564
|
+
}
|
|
1565
|
+
response_data = self.api_client.call_api(
|
|
1566
|
+
*_param,
|
|
1567
|
+
_request_timeout=_request_timeout
|
|
1568
|
+
)
|
|
1569
|
+
response_data.read()
|
|
1570
|
+
return self.api_client.response_deserialize(
|
|
1571
|
+
response_data=response_data,
|
|
1572
|
+
response_types_map=_response_types_map,
|
|
1573
|
+
)
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
@validate_call
|
|
1577
|
+
def read_embedder_endpoint_by_id_without_preload_content(
|
|
1578
|
+
self,
|
|
1579
|
+
id: StrictInt,
|
|
1580
|
+
_request_timeout: Union[
|
|
1581
|
+
None,
|
|
1582
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1583
|
+
Tuple[
|
|
1584
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1585
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1586
|
+
]
|
|
1587
|
+
] = None,
|
|
1588
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1589
|
+
_content_type: Optional[StrictStr] = None,
|
|
1590
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1591
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1592
|
+
) -> RESTResponseType:
|
|
1593
|
+
"""Read Embedder Endpoint By Id
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
:param id: (required)
|
|
1597
|
+
:type id: int
|
|
1598
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1599
|
+
number provided, it will be total request
|
|
1600
|
+
timeout. It can also be a pair (tuple) of
|
|
1601
|
+
(connection, read) timeouts.
|
|
1602
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1603
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1604
|
+
request; this effectively ignores the
|
|
1605
|
+
authentication in the spec for a single request.
|
|
1606
|
+
:type _request_auth: dict, optional
|
|
1607
|
+
:param _content_type: force content-type for the request.
|
|
1608
|
+
:type _content_type: str, Optional
|
|
1609
|
+
:param _headers: set to override the headers for a single
|
|
1610
|
+
request; this effectively ignores the headers
|
|
1611
|
+
in the spec for a single request.
|
|
1612
|
+
:type _headers: dict, optional
|
|
1613
|
+
:param _host_index: set to override the host_index for a single
|
|
1614
|
+
request; this effectively ignores the host_index
|
|
1615
|
+
in the spec for a single request.
|
|
1616
|
+
:type _host_index: int, optional
|
|
1617
|
+
:return: Returns the result object.
|
|
1618
|
+
""" # noqa: E501
|
|
1619
|
+
|
|
1620
|
+
_param = self._read_embedder_endpoint_by_id_serialize(
|
|
1621
|
+
id=id,
|
|
1622
|
+
_request_auth=_request_auth,
|
|
1623
|
+
_content_type=_content_type,
|
|
1624
|
+
_headers=_headers,
|
|
1625
|
+
_host_index=_host_index
|
|
1626
|
+
)
|
|
1627
|
+
|
|
1628
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1629
|
+
'200': "EmbeddingEndpoint",
|
|
1630
|
+
'404': None,
|
|
1631
|
+
'422': "HTTPValidationError",
|
|
1632
|
+
}
|
|
1633
|
+
response_data = self.api_client.call_api(
|
|
1634
|
+
*_param,
|
|
1635
|
+
_request_timeout=_request_timeout
|
|
1636
|
+
)
|
|
1637
|
+
return response_data.response
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
def _read_embedder_endpoint_by_id_serialize(
|
|
1641
|
+
self,
|
|
1642
|
+
id,
|
|
1643
|
+
_request_auth,
|
|
1644
|
+
_content_type,
|
|
1645
|
+
_headers,
|
|
1646
|
+
_host_index,
|
|
1647
|
+
) -> RequestSerialized:
|
|
1648
|
+
|
|
1649
|
+
_host = None
|
|
1650
|
+
|
|
1651
|
+
_collection_formats: Dict[str, str] = {
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
_path_params: Dict[str, str] = {}
|
|
1655
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1656
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1657
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1658
|
+
_files: Dict[
|
|
1659
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1660
|
+
] = {}
|
|
1661
|
+
_body_params: Optional[bytes] = None
|
|
1662
|
+
|
|
1663
|
+
# process the path parameters
|
|
1664
|
+
if id is not None:
|
|
1665
|
+
_path_params['id'] = id
|
|
1666
|
+
# process the query parameters
|
|
1667
|
+
# process the header parameters
|
|
1668
|
+
# process the form parameters
|
|
1669
|
+
# process the body parameter
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
# set the HTTP header `Accept`
|
|
1673
|
+
if 'Accept' not in _header_params:
|
|
1674
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1675
|
+
[
|
|
1676
|
+
'application/json'
|
|
1677
|
+
]
|
|
1678
|
+
)
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
# authentication setting
|
|
1682
|
+
_auth_settings: List[str] = [
|
|
1683
|
+
'QAnswer-Api-Key',
|
|
1684
|
+
'Bearer token'
|
|
1685
|
+
]
|
|
1686
|
+
|
|
1687
|
+
return self.api_client.param_serialize(
|
|
1688
|
+
method='GET',
|
|
1689
|
+
resource_path='/backend/api/embedder-endpoint/{id}',
|
|
1690
|
+
path_params=_path_params,
|
|
1691
|
+
query_params=_query_params,
|
|
1692
|
+
header_params=_header_params,
|
|
1693
|
+
body=_body_params,
|
|
1694
|
+
post_params=_form_params,
|
|
1695
|
+
files=_files,
|
|
1696
|
+
auth_settings=_auth_settings,
|
|
1697
|
+
collection_formats=_collection_formats,
|
|
1698
|
+
_host=_host,
|
|
1699
|
+
_request_auth=_request_auth
|
|
1700
|
+
)
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
@validate_call
|
|
1706
|
+
def read_embedder_endpoint_by_name(
|
|
1707
|
+
self,
|
|
1708
|
+
name: Annotated[StrictStr, Field(description="Embedder endpoint name")],
|
|
1709
|
+
_request_timeout: Union[
|
|
1710
|
+
None,
|
|
1711
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1712
|
+
Tuple[
|
|
1713
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1714
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1715
|
+
]
|
|
1716
|
+
] = None,
|
|
1717
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1718
|
+
_content_type: Optional[StrictStr] = None,
|
|
1719
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1720
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1721
|
+
) -> EmbeddingEndpoint:
|
|
1722
|
+
"""Read Embedder Endpoint By Name
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
:param name: Embedder endpoint name (required)
|
|
1726
|
+
:type name: str
|
|
1727
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1728
|
+
number provided, it will be total request
|
|
1729
|
+
timeout. It can also be a pair (tuple) of
|
|
1730
|
+
(connection, read) timeouts.
|
|
1731
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1732
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1733
|
+
request; this effectively ignores the
|
|
1734
|
+
authentication in the spec for a single request.
|
|
1735
|
+
:type _request_auth: dict, optional
|
|
1736
|
+
:param _content_type: force content-type for the request.
|
|
1737
|
+
:type _content_type: str, Optional
|
|
1738
|
+
:param _headers: set to override the headers for a single
|
|
1739
|
+
request; this effectively ignores the headers
|
|
1740
|
+
in the spec for a single request.
|
|
1741
|
+
:type _headers: dict, optional
|
|
1742
|
+
:param _host_index: set to override the host_index for a single
|
|
1743
|
+
request; this effectively ignores the host_index
|
|
1744
|
+
in the spec for a single request.
|
|
1745
|
+
:type _host_index: int, optional
|
|
1746
|
+
:return: Returns the result object.
|
|
1747
|
+
""" # noqa: E501
|
|
1748
|
+
|
|
1749
|
+
_param = self._read_embedder_endpoint_by_name_serialize(
|
|
1750
|
+
name=name,
|
|
1751
|
+
_request_auth=_request_auth,
|
|
1752
|
+
_content_type=_content_type,
|
|
1753
|
+
_headers=_headers,
|
|
1754
|
+
_host_index=_host_index
|
|
1755
|
+
)
|
|
1756
|
+
|
|
1757
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1758
|
+
'200': "EmbeddingEndpoint",
|
|
1759
|
+
'404': None,
|
|
1760
|
+
'422': "HTTPValidationError",
|
|
1761
|
+
}
|
|
1762
|
+
response_data = self.api_client.call_api(
|
|
1763
|
+
*_param,
|
|
1764
|
+
_request_timeout=_request_timeout
|
|
1765
|
+
)
|
|
1766
|
+
response_data.read()
|
|
1767
|
+
return self.api_client.response_deserialize(
|
|
1768
|
+
response_data=response_data,
|
|
1769
|
+
response_types_map=_response_types_map,
|
|
1770
|
+
).data
|
|
1771
|
+
|
|
1772
|
+
|
|
1773
|
+
@validate_call
|
|
1774
|
+
def read_embedder_endpoint_by_name_with_http_info(
|
|
1775
|
+
self,
|
|
1776
|
+
name: Annotated[StrictStr, Field(description="Embedder endpoint name")],
|
|
1777
|
+
_request_timeout: Union[
|
|
1778
|
+
None,
|
|
1779
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1780
|
+
Tuple[
|
|
1781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1782
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1783
|
+
]
|
|
1784
|
+
] = None,
|
|
1785
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1786
|
+
_content_type: Optional[StrictStr] = None,
|
|
1787
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1788
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1789
|
+
) -> ApiResponse[EmbeddingEndpoint]:
|
|
1790
|
+
"""Read Embedder Endpoint By Name
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
:param name: Embedder endpoint name (required)
|
|
1794
|
+
:type name: str
|
|
1795
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1796
|
+
number provided, it will be total request
|
|
1797
|
+
timeout. It can also be a pair (tuple) of
|
|
1798
|
+
(connection, read) timeouts.
|
|
1799
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1800
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1801
|
+
request; this effectively ignores the
|
|
1802
|
+
authentication in the spec for a single request.
|
|
1803
|
+
:type _request_auth: dict, optional
|
|
1804
|
+
:param _content_type: force content-type for the request.
|
|
1805
|
+
:type _content_type: str, Optional
|
|
1806
|
+
:param _headers: set to override the headers for a single
|
|
1807
|
+
request; this effectively ignores the headers
|
|
1808
|
+
in the spec for a single request.
|
|
1809
|
+
:type _headers: dict, optional
|
|
1810
|
+
:param _host_index: set to override the host_index for a single
|
|
1811
|
+
request; this effectively ignores the host_index
|
|
1812
|
+
in the spec for a single request.
|
|
1813
|
+
:type _host_index: int, optional
|
|
1814
|
+
:return: Returns the result object.
|
|
1815
|
+
""" # noqa: E501
|
|
1816
|
+
|
|
1817
|
+
_param = self._read_embedder_endpoint_by_name_serialize(
|
|
1818
|
+
name=name,
|
|
1819
|
+
_request_auth=_request_auth,
|
|
1820
|
+
_content_type=_content_type,
|
|
1821
|
+
_headers=_headers,
|
|
1822
|
+
_host_index=_host_index
|
|
1823
|
+
)
|
|
1824
|
+
|
|
1825
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1826
|
+
'200': "EmbeddingEndpoint",
|
|
1827
|
+
'404': None,
|
|
1828
|
+
'422': "HTTPValidationError",
|
|
1829
|
+
}
|
|
1830
|
+
response_data = self.api_client.call_api(
|
|
1831
|
+
*_param,
|
|
1832
|
+
_request_timeout=_request_timeout
|
|
1833
|
+
)
|
|
1834
|
+
response_data.read()
|
|
1835
|
+
return self.api_client.response_deserialize(
|
|
1836
|
+
response_data=response_data,
|
|
1837
|
+
response_types_map=_response_types_map,
|
|
1838
|
+
)
|
|
1839
|
+
|
|
1840
|
+
|
|
1841
|
+
@validate_call
|
|
1842
|
+
def read_embedder_endpoint_by_name_without_preload_content(
|
|
1843
|
+
self,
|
|
1844
|
+
name: Annotated[StrictStr, Field(description="Embedder endpoint name")],
|
|
1845
|
+
_request_timeout: Union[
|
|
1846
|
+
None,
|
|
1847
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1848
|
+
Tuple[
|
|
1849
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1850
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1851
|
+
]
|
|
1852
|
+
] = None,
|
|
1853
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1854
|
+
_content_type: Optional[StrictStr] = None,
|
|
1855
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1856
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1857
|
+
) -> RESTResponseType:
|
|
1858
|
+
"""Read Embedder Endpoint By Name
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
:param name: Embedder endpoint name (required)
|
|
1862
|
+
:type name: str
|
|
1863
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1864
|
+
number provided, it will be total request
|
|
1865
|
+
timeout. It can also be a pair (tuple) of
|
|
1866
|
+
(connection, read) timeouts.
|
|
1867
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1868
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1869
|
+
request; this effectively ignores the
|
|
1870
|
+
authentication in the spec for a single request.
|
|
1871
|
+
:type _request_auth: dict, optional
|
|
1872
|
+
:param _content_type: force content-type for the request.
|
|
1873
|
+
:type _content_type: str, Optional
|
|
1874
|
+
:param _headers: set to override the headers for a single
|
|
1875
|
+
request; this effectively ignores the headers
|
|
1876
|
+
in the spec for a single request.
|
|
1877
|
+
:type _headers: dict, optional
|
|
1878
|
+
:param _host_index: set to override the host_index for a single
|
|
1879
|
+
request; this effectively ignores the host_index
|
|
1880
|
+
in the spec for a single request.
|
|
1881
|
+
:type _host_index: int, optional
|
|
1882
|
+
:return: Returns the result object.
|
|
1883
|
+
""" # noqa: E501
|
|
1884
|
+
|
|
1885
|
+
_param = self._read_embedder_endpoint_by_name_serialize(
|
|
1886
|
+
name=name,
|
|
1887
|
+
_request_auth=_request_auth,
|
|
1888
|
+
_content_type=_content_type,
|
|
1889
|
+
_headers=_headers,
|
|
1890
|
+
_host_index=_host_index
|
|
1891
|
+
)
|
|
1892
|
+
|
|
1893
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1894
|
+
'200': "EmbeddingEndpoint",
|
|
1895
|
+
'404': None,
|
|
1896
|
+
'422': "HTTPValidationError",
|
|
1897
|
+
}
|
|
1898
|
+
response_data = self.api_client.call_api(
|
|
1899
|
+
*_param,
|
|
1900
|
+
_request_timeout=_request_timeout
|
|
1901
|
+
)
|
|
1902
|
+
return response_data.response
|
|
1903
|
+
|
|
1904
|
+
|
|
1905
|
+
def _read_embedder_endpoint_by_name_serialize(
|
|
1906
|
+
self,
|
|
1907
|
+
name,
|
|
1908
|
+
_request_auth,
|
|
1909
|
+
_content_type,
|
|
1910
|
+
_headers,
|
|
1911
|
+
_host_index,
|
|
1912
|
+
) -> RequestSerialized:
|
|
1913
|
+
|
|
1914
|
+
_host = None
|
|
1915
|
+
|
|
1916
|
+
_collection_formats: Dict[str, str] = {
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
_path_params: Dict[str, str] = {}
|
|
1920
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1921
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1922
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1923
|
+
_files: Dict[
|
|
1924
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1925
|
+
] = {}
|
|
1926
|
+
_body_params: Optional[bytes] = None
|
|
1927
|
+
|
|
1928
|
+
# process the path parameters
|
|
1929
|
+
# process the query parameters
|
|
1930
|
+
if name is not None:
|
|
1931
|
+
|
|
1932
|
+
_query_params.append(('name', name))
|
|
1933
|
+
|
|
1934
|
+
# process the header parameters
|
|
1935
|
+
# process the form parameters
|
|
1936
|
+
# process the body parameter
|
|
1937
|
+
|
|
1938
|
+
|
|
1939
|
+
# set the HTTP header `Accept`
|
|
1940
|
+
if 'Accept' not in _header_params:
|
|
1941
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1942
|
+
[
|
|
1943
|
+
'application/json'
|
|
1944
|
+
]
|
|
1945
|
+
)
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
# authentication setting
|
|
1949
|
+
_auth_settings: List[str] = [
|
|
1950
|
+
'QAnswer-Api-Key',
|
|
1951
|
+
'Bearer token'
|
|
1952
|
+
]
|
|
1953
|
+
|
|
1954
|
+
return self.api_client.param_serialize(
|
|
1955
|
+
method='GET',
|
|
1956
|
+
resource_path='/backend/api/embedder-endpoint/by-name',
|
|
1957
|
+
path_params=_path_params,
|
|
1958
|
+
query_params=_query_params,
|
|
1959
|
+
header_params=_header_params,
|
|
1960
|
+
body=_body_params,
|
|
1961
|
+
post_params=_form_params,
|
|
1962
|
+
files=_files,
|
|
1963
|
+
auth_settings=_auth_settings,
|
|
1964
|
+
collection_formats=_collection_formats,
|
|
1965
|
+
_host=_host,
|
|
1966
|
+
_request_auth=_request_auth
|
|
1967
|
+
)
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
|
|
1972
|
+
@validate_call
|
|
1973
|
+
def read_embedder_endpoints(
|
|
1974
|
+
self,
|
|
1975
|
+
_request_timeout: Union[
|
|
1976
|
+
None,
|
|
1977
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1978
|
+
Tuple[
|
|
1979
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1980
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1981
|
+
]
|
|
1982
|
+
] = None,
|
|
1983
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1984
|
+
_content_type: Optional[StrictStr] = None,
|
|
1985
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1986
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1987
|
+
) -> List[EmbeddingEndpoint]:
|
|
1988
|
+
"""Read Embedder Endpoints
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1992
|
+
number provided, it will be total request
|
|
1993
|
+
timeout. It can also be a pair (tuple) of
|
|
1994
|
+
(connection, read) timeouts.
|
|
1995
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1996
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1997
|
+
request; this effectively ignores the
|
|
1998
|
+
authentication in the spec for a single request.
|
|
1999
|
+
:type _request_auth: dict, optional
|
|
2000
|
+
:param _content_type: force content-type for the request.
|
|
2001
|
+
:type _content_type: str, Optional
|
|
2002
|
+
:param _headers: set to override the headers for a single
|
|
2003
|
+
request; this effectively ignores the headers
|
|
2004
|
+
in the spec for a single request.
|
|
2005
|
+
:type _headers: dict, optional
|
|
2006
|
+
:param _host_index: set to override the host_index for a single
|
|
2007
|
+
request; this effectively ignores the host_index
|
|
2008
|
+
in the spec for a single request.
|
|
2009
|
+
:type _host_index: int, optional
|
|
2010
|
+
:return: Returns the result object.
|
|
2011
|
+
""" # noqa: E501
|
|
2012
|
+
|
|
2013
|
+
_param = self._read_embedder_endpoints_serialize(
|
|
2014
|
+
_request_auth=_request_auth,
|
|
2015
|
+
_content_type=_content_type,
|
|
2016
|
+
_headers=_headers,
|
|
2017
|
+
_host_index=_host_index
|
|
2018
|
+
)
|
|
2019
|
+
|
|
2020
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2021
|
+
'200': "List[EmbeddingEndpoint]",
|
|
2022
|
+
'404': None,
|
|
2023
|
+
}
|
|
2024
|
+
response_data = self.api_client.call_api(
|
|
2025
|
+
*_param,
|
|
2026
|
+
_request_timeout=_request_timeout
|
|
2027
|
+
)
|
|
2028
|
+
response_data.read()
|
|
2029
|
+
return self.api_client.response_deserialize(
|
|
2030
|
+
response_data=response_data,
|
|
2031
|
+
response_types_map=_response_types_map,
|
|
2032
|
+
).data
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
@validate_call
|
|
2036
|
+
def read_embedder_endpoints_with_http_info(
|
|
2037
|
+
self,
|
|
2038
|
+
_request_timeout: Union[
|
|
2039
|
+
None,
|
|
2040
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2041
|
+
Tuple[
|
|
2042
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2043
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2044
|
+
]
|
|
2045
|
+
] = None,
|
|
2046
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2047
|
+
_content_type: Optional[StrictStr] = None,
|
|
2048
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2049
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2050
|
+
) -> ApiResponse[List[EmbeddingEndpoint]]:
|
|
2051
|
+
"""Read Embedder Endpoints
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2055
|
+
number provided, it will be total request
|
|
2056
|
+
timeout. It can also be a pair (tuple) of
|
|
2057
|
+
(connection, read) timeouts.
|
|
2058
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2059
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2060
|
+
request; this effectively ignores the
|
|
2061
|
+
authentication in the spec for a single request.
|
|
2062
|
+
:type _request_auth: dict, optional
|
|
2063
|
+
:param _content_type: force content-type for the request.
|
|
2064
|
+
:type _content_type: str, Optional
|
|
2065
|
+
:param _headers: set to override the headers for a single
|
|
2066
|
+
request; this effectively ignores the headers
|
|
2067
|
+
in the spec for a single request.
|
|
2068
|
+
:type _headers: dict, optional
|
|
2069
|
+
:param _host_index: set to override the host_index for a single
|
|
2070
|
+
request; this effectively ignores the host_index
|
|
2071
|
+
in the spec for a single request.
|
|
2072
|
+
:type _host_index: int, optional
|
|
2073
|
+
:return: Returns the result object.
|
|
2074
|
+
""" # noqa: E501
|
|
2075
|
+
|
|
2076
|
+
_param = self._read_embedder_endpoints_serialize(
|
|
2077
|
+
_request_auth=_request_auth,
|
|
2078
|
+
_content_type=_content_type,
|
|
2079
|
+
_headers=_headers,
|
|
2080
|
+
_host_index=_host_index
|
|
2081
|
+
)
|
|
2082
|
+
|
|
2083
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2084
|
+
'200': "List[EmbeddingEndpoint]",
|
|
2085
|
+
'404': None,
|
|
2086
|
+
}
|
|
2087
|
+
response_data = self.api_client.call_api(
|
|
2088
|
+
*_param,
|
|
2089
|
+
_request_timeout=_request_timeout
|
|
2090
|
+
)
|
|
2091
|
+
response_data.read()
|
|
2092
|
+
return self.api_client.response_deserialize(
|
|
2093
|
+
response_data=response_data,
|
|
2094
|
+
response_types_map=_response_types_map,
|
|
2095
|
+
)
|
|
2096
|
+
|
|
2097
|
+
|
|
2098
|
+
@validate_call
|
|
2099
|
+
def read_embedder_endpoints_without_preload_content(
|
|
2100
|
+
self,
|
|
2101
|
+
_request_timeout: Union[
|
|
2102
|
+
None,
|
|
2103
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2104
|
+
Tuple[
|
|
2105
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2106
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2107
|
+
]
|
|
2108
|
+
] = None,
|
|
2109
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2110
|
+
_content_type: Optional[StrictStr] = None,
|
|
2111
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2112
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2113
|
+
) -> RESTResponseType:
|
|
2114
|
+
"""Read Embedder Endpoints
|
|
2115
|
+
|
|
2116
|
+
|
|
2117
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2118
|
+
number provided, it will be total request
|
|
2119
|
+
timeout. It can also be a pair (tuple) of
|
|
2120
|
+
(connection, read) timeouts.
|
|
2121
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2122
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2123
|
+
request; this effectively ignores the
|
|
2124
|
+
authentication in the spec for a single request.
|
|
2125
|
+
:type _request_auth: dict, optional
|
|
2126
|
+
:param _content_type: force content-type for the request.
|
|
2127
|
+
:type _content_type: str, Optional
|
|
2128
|
+
:param _headers: set to override the headers for a single
|
|
2129
|
+
request; this effectively ignores the headers
|
|
2130
|
+
in the spec for a single request.
|
|
2131
|
+
:type _headers: dict, optional
|
|
2132
|
+
:param _host_index: set to override the host_index for a single
|
|
2133
|
+
request; this effectively ignores the host_index
|
|
2134
|
+
in the spec for a single request.
|
|
2135
|
+
:type _host_index: int, optional
|
|
2136
|
+
:return: Returns the result object.
|
|
2137
|
+
""" # noqa: E501
|
|
2138
|
+
|
|
2139
|
+
_param = self._read_embedder_endpoints_serialize(
|
|
2140
|
+
_request_auth=_request_auth,
|
|
2141
|
+
_content_type=_content_type,
|
|
2142
|
+
_headers=_headers,
|
|
2143
|
+
_host_index=_host_index
|
|
2144
|
+
)
|
|
2145
|
+
|
|
2146
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2147
|
+
'200': "List[EmbeddingEndpoint]",
|
|
2148
|
+
'404': None,
|
|
2149
|
+
}
|
|
2150
|
+
response_data = self.api_client.call_api(
|
|
2151
|
+
*_param,
|
|
2152
|
+
_request_timeout=_request_timeout
|
|
2153
|
+
)
|
|
2154
|
+
return response_data.response
|
|
2155
|
+
|
|
2156
|
+
|
|
2157
|
+
def _read_embedder_endpoints_serialize(
|
|
2158
|
+
self,
|
|
2159
|
+
_request_auth,
|
|
2160
|
+
_content_type,
|
|
2161
|
+
_headers,
|
|
2162
|
+
_host_index,
|
|
2163
|
+
) -> RequestSerialized:
|
|
2164
|
+
|
|
2165
|
+
_host = None
|
|
2166
|
+
|
|
2167
|
+
_collection_formats: Dict[str, str] = {
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
_path_params: Dict[str, str] = {}
|
|
2171
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2172
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2173
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2174
|
+
_files: Dict[
|
|
2175
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2176
|
+
] = {}
|
|
2177
|
+
_body_params: Optional[bytes] = None
|
|
2178
|
+
|
|
2179
|
+
# process the path parameters
|
|
2180
|
+
# process the query parameters
|
|
2181
|
+
# process the header parameters
|
|
2182
|
+
# process the form parameters
|
|
2183
|
+
# process the body parameter
|
|
2184
|
+
|
|
2185
|
+
|
|
2186
|
+
# set the HTTP header `Accept`
|
|
2187
|
+
if 'Accept' not in _header_params:
|
|
2188
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2189
|
+
[
|
|
2190
|
+
'application/json'
|
|
2191
|
+
]
|
|
2192
|
+
)
|
|
2193
|
+
|
|
2194
|
+
|
|
2195
|
+
# authentication setting
|
|
2196
|
+
_auth_settings: List[str] = [
|
|
2197
|
+
'QAnswer-Api-Key',
|
|
2198
|
+
'Bearer token'
|
|
2199
|
+
]
|
|
2200
|
+
|
|
2201
|
+
return self.api_client.param_serialize(
|
|
2202
|
+
method='GET',
|
|
2203
|
+
resource_path='/backend/api/embedder-endpoint/list',
|
|
2204
|
+
path_params=_path_params,
|
|
2205
|
+
query_params=_query_params,
|
|
2206
|
+
header_params=_header_params,
|
|
2207
|
+
body=_body_params,
|
|
2208
|
+
post_params=_form_params,
|
|
2209
|
+
files=_files,
|
|
2210
|
+
auth_settings=_auth_settings,
|
|
2211
|
+
collection_formats=_collection_formats,
|
|
2212
|
+
_host=_host,
|
|
2213
|
+
_request_auth=_request_auth
|
|
2214
|
+
)
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
@validate_call
|
|
2220
|
+
def update_embedder_endpoint_v2(
|
|
2221
|
+
self,
|
|
2222
|
+
id: StrictInt,
|
|
2223
|
+
embedding_endpoint_update: EmbeddingEndpointUpdate,
|
|
2224
|
+
_request_timeout: Union[
|
|
2225
|
+
None,
|
|
2226
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2227
|
+
Tuple[
|
|
2228
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2229
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2230
|
+
]
|
|
2231
|
+
] = None,
|
|
2232
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2233
|
+
_content_type: Optional[StrictStr] = None,
|
|
2234
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2235
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2236
|
+
) -> EmbeddingEndpoint:
|
|
2237
|
+
"""Update Embedder Endpoint V2
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
:param id: (required)
|
|
2241
|
+
:type id: int
|
|
2242
|
+
:param embedding_endpoint_update: (required)
|
|
2243
|
+
:type embedding_endpoint_update: EmbeddingEndpointUpdate
|
|
2244
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2245
|
+
number provided, it will be total request
|
|
2246
|
+
timeout. It can also be a pair (tuple) of
|
|
2247
|
+
(connection, read) timeouts.
|
|
2248
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2249
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2250
|
+
request; this effectively ignores the
|
|
2251
|
+
authentication in the spec for a single request.
|
|
2252
|
+
:type _request_auth: dict, optional
|
|
2253
|
+
:param _content_type: force content-type for the request.
|
|
2254
|
+
:type _content_type: str, Optional
|
|
2255
|
+
:param _headers: set to override the headers for a single
|
|
2256
|
+
request; this effectively ignores the headers
|
|
2257
|
+
in the spec for a single request.
|
|
2258
|
+
:type _headers: dict, optional
|
|
2259
|
+
:param _host_index: set to override the host_index for a single
|
|
2260
|
+
request; this effectively ignores the host_index
|
|
2261
|
+
in the spec for a single request.
|
|
2262
|
+
:type _host_index: int, optional
|
|
2263
|
+
:return: Returns the result object.
|
|
2264
|
+
""" # noqa: E501
|
|
2265
|
+
|
|
2266
|
+
_param = self._update_embedder_endpoint_v2_serialize(
|
|
2267
|
+
id=id,
|
|
2268
|
+
embedding_endpoint_update=embedding_endpoint_update,
|
|
2269
|
+
_request_auth=_request_auth,
|
|
2270
|
+
_content_type=_content_type,
|
|
2271
|
+
_headers=_headers,
|
|
2272
|
+
_host_index=_host_index
|
|
2273
|
+
)
|
|
2274
|
+
|
|
2275
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2276
|
+
'200': "EmbeddingEndpoint",
|
|
2277
|
+
'404': None,
|
|
2278
|
+
'422': "HTTPValidationError",
|
|
2279
|
+
}
|
|
2280
|
+
response_data = self.api_client.call_api(
|
|
2281
|
+
*_param,
|
|
2282
|
+
_request_timeout=_request_timeout
|
|
2283
|
+
)
|
|
2284
|
+
response_data.read()
|
|
2285
|
+
return self.api_client.response_deserialize(
|
|
2286
|
+
response_data=response_data,
|
|
2287
|
+
response_types_map=_response_types_map,
|
|
2288
|
+
).data
|
|
2289
|
+
|
|
2290
|
+
|
|
2291
|
+
@validate_call
|
|
2292
|
+
def update_embedder_endpoint_v2_with_http_info(
|
|
2293
|
+
self,
|
|
2294
|
+
id: StrictInt,
|
|
2295
|
+
embedding_endpoint_update: EmbeddingEndpointUpdate,
|
|
2296
|
+
_request_timeout: Union[
|
|
2297
|
+
None,
|
|
2298
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2299
|
+
Tuple[
|
|
2300
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2301
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2302
|
+
]
|
|
2303
|
+
] = None,
|
|
2304
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2305
|
+
_content_type: Optional[StrictStr] = None,
|
|
2306
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2307
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2308
|
+
) -> ApiResponse[EmbeddingEndpoint]:
|
|
2309
|
+
"""Update Embedder Endpoint V2
|
|
2310
|
+
|
|
2311
|
+
|
|
2312
|
+
:param id: (required)
|
|
2313
|
+
:type id: int
|
|
2314
|
+
:param embedding_endpoint_update: (required)
|
|
2315
|
+
:type embedding_endpoint_update: EmbeddingEndpointUpdate
|
|
2316
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2317
|
+
number provided, it will be total request
|
|
2318
|
+
timeout. It can also be a pair (tuple) of
|
|
2319
|
+
(connection, read) timeouts.
|
|
2320
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2321
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2322
|
+
request; this effectively ignores the
|
|
2323
|
+
authentication in the spec for a single request.
|
|
2324
|
+
:type _request_auth: dict, optional
|
|
2325
|
+
:param _content_type: force content-type for the request.
|
|
2326
|
+
:type _content_type: str, Optional
|
|
2327
|
+
:param _headers: set to override the headers for a single
|
|
2328
|
+
request; this effectively ignores the headers
|
|
2329
|
+
in the spec for a single request.
|
|
2330
|
+
:type _headers: dict, optional
|
|
2331
|
+
:param _host_index: set to override the host_index for a single
|
|
2332
|
+
request; this effectively ignores the host_index
|
|
2333
|
+
in the spec for a single request.
|
|
2334
|
+
:type _host_index: int, optional
|
|
2335
|
+
:return: Returns the result object.
|
|
2336
|
+
""" # noqa: E501
|
|
2337
|
+
|
|
2338
|
+
_param = self._update_embedder_endpoint_v2_serialize(
|
|
2339
|
+
id=id,
|
|
2340
|
+
embedding_endpoint_update=embedding_endpoint_update,
|
|
2341
|
+
_request_auth=_request_auth,
|
|
2342
|
+
_content_type=_content_type,
|
|
2343
|
+
_headers=_headers,
|
|
2344
|
+
_host_index=_host_index
|
|
2345
|
+
)
|
|
2346
|
+
|
|
2347
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2348
|
+
'200': "EmbeddingEndpoint",
|
|
2349
|
+
'404': None,
|
|
2350
|
+
'422': "HTTPValidationError",
|
|
2351
|
+
}
|
|
2352
|
+
response_data = self.api_client.call_api(
|
|
2353
|
+
*_param,
|
|
2354
|
+
_request_timeout=_request_timeout
|
|
2355
|
+
)
|
|
2356
|
+
response_data.read()
|
|
2357
|
+
return self.api_client.response_deserialize(
|
|
2358
|
+
response_data=response_data,
|
|
2359
|
+
response_types_map=_response_types_map,
|
|
2360
|
+
)
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
@validate_call
|
|
2364
|
+
def update_embedder_endpoint_v2_without_preload_content(
|
|
2365
|
+
self,
|
|
2366
|
+
id: StrictInt,
|
|
2367
|
+
embedding_endpoint_update: EmbeddingEndpointUpdate,
|
|
2368
|
+
_request_timeout: Union[
|
|
2369
|
+
None,
|
|
2370
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2371
|
+
Tuple[
|
|
2372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2373
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2374
|
+
]
|
|
2375
|
+
] = None,
|
|
2376
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2377
|
+
_content_type: Optional[StrictStr] = None,
|
|
2378
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2379
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2380
|
+
) -> RESTResponseType:
|
|
2381
|
+
"""Update Embedder Endpoint V2
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
:param id: (required)
|
|
2385
|
+
:type id: int
|
|
2386
|
+
:param embedding_endpoint_update: (required)
|
|
2387
|
+
:type embedding_endpoint_update: EmbeddingEndpointUpdate
|
|
2388
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2389
|
+
number provided, it will be total request
|
|
2390
|
+
timeout. It can also be a pair (tuple) of
|
|
2391
|
+
(connection, read) timeouts.
|
|
2392
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2393
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2394
|
+
request; this effectively ignores the
|
|
2395
|
+
authentication in the spec for a single request.
|
|
2396
|
+
:type _request_auth: dict, optional
|
|
2397
|
+
:param _content_type: force content-type for the request.
|
|
2398
|
+
:type _content_type: str, Optional
|
|
2399
|
+
:param _headers: set to override the headers for a single
|
|
2400
|
+
request; this effectively ignores the headers
|
|
2401
|
+
in the spec for a single request.
|
|
2402
|
+
:type _headers: dict, optional
|
|
2403
|
+
:param _host_index: set to override the host_index for a single
|
|
2404
|
+
request; this effectively ignores the host_index
|
|
2405
|
+
in the spec for a single request.
|
|
2406
|
+
:type _host_index: int, optional
|
|
2407
|
+
:return: Returns the result object.
|
|
2408
|
+
""" # noqa: E501
|
|
2409
|
+
|
|
2410
|
+
_param = self._update_embedder_endpoint_v2_serialize(
|
|
2411
|
+
id=id,
|
|
2412
|
+
embedding_endpoint_update=embedding_endpoint_update,
|
|
2413
|
+
_request_auth=_request_auth,
|
|
2414
|
+
_content_type=_content_type,
|
|
2415
|
+
_headers=_headers,
|
|
2416
|
+
_host_index=_host_index
|
|
2417
|
+
)
|
|
2418
|
+
|
|
2419
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2420
|
+
'200': "EmbeddingEndpoint",
|
|
2421
|
+
'404': None,
|
|
2422
|
+
'422': "HTTPValidationError",
|
|
2423
|
+
}
|
|
2424
|
+
response_data = self.api_client.call_api(
|
|
2425
|
+
*_param,
|
|
2426
|
+
_request_timeout=_request_timeout
|
|
2427
|
+
)
|
|
2428
|
+
return response_data.response
|
|
2429
|
+
|
|
2430
|
+
|
|
2431
|
+
def _update_embedder_endpoint_v2_serialize(
|
|
2432
|
+
self,
|
|
2433
|
+
id,
|
|
2434
|
+
embedding_endpoint_update,
|
|
2435
|
+
_request_auth,
|
|
2436
|
+
_content_type,
|
|
2437
|
+
_headers,
|
|
2438
|
+
_host_index,
|
|
2439
|
+
) -> RequestSerialized:
|
|
2440
|
+
|
|
2441
|
+
_host = None
|
|
2442
|
+
|
|
2443
|
+
_collection_formats: Dict[str, str] = {
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
_path_params: Dict[str, str] = {}
|
|
2447
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2448
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2449
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2450
|
+
_files: Dict[
|
|
2451
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2452
|
+
] = {}
|
|
2453
|
+
_body_params: Optional[bytes] = None
|
|
2454
|
+
|
|
2455
|
+
# process the path parameters
|
|
2456
|
+
if id is not None:
|
|
2457
|
+
_path_params['id'] = id
|
|
2458
|
+
# process the query parameters
|
|
2459
|
+
# process the header parameters
|
|
2460
|
+
# process the form parameters
|
|
2461
|
+
# process the body parameter
|
|
2462
|
+
if embedding_endpoint_update is not None:
|
|
2463
|
+
_body_params = embedding_endpoint_update
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
# set the HTTP header `Accept`
|
|
2467
|
+
if 'Accept' not in _header_params:
|
|
2468
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2469
|
+
[
|
|
2470
|
+
'application/json'
|
|
2471
|
+
]
|
|
2472
|
+
)
|
|
2473
|
+
|
|
2474
|
+
# set the HTTP header `Content-Type`
|
|
2475
|
+
if _content_type:
|
|
2476
|
+
_header_params['Content-Type'] = _content_type
|
|
2477
|
+
else:
|
|
2478
|
+
_default_content_type = (
|
|
2479
|
+
self.api_client.select_header_content_type(
|
|
2480
|
+
[
|
|
2481
|
+
'application/json'
|
|
2482
|
+
]
|
|
2483
|
+
)
|
|
2484
|
+
)
|
|
2485
|
+
if _default_content_type is not None:
|
|
2486
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2487
|
+
|
|
2488
|
+
# authentication setting
|
|
2489
|
+
_auth_settings: List[str] = [
|
|
2490
|
+
'QAnswer-Api-Key',
|
|
2491
|
+
'Bearer token'
|
|
2492
|
+
]
|
|
2493
|
+
|
|
2494
|
+
return self.api_client.param_serialize(
|
|
2495
|
+
method='PUT',
|
|
2496
|
+
resource_path='/backend/api/embedder-endpoint/{id}',
|
|
2497
|
+
path_params=_path_params,
|
|
2498
|
+
query_params=_query_params,
|
|
2499
|
+
header_params=_header_params,
|
|
2500
|
+
body=_body_params,
|
|
2501
|
+
post_params=_form_params,
|
|
2502
|
+
files=_files,
|
|
2503
|
+
auth_settings=_auth_settings,
|
|
2504
|
+
collection_formats=_collection_formats,
|
|
2505
|
+
_host=_host,
|
|
2506
|
+
_request_auth=_request_auth
|
|
2507
|
+
)
|
|
2508
|
+
|
|
2509
|
+
|
|
2510
|
+
|
|
2511
|
+
|
|
2512
|
+
@validate_call
|
|
2513
|
+
def validate_embedder_endpoint_before_creation_in_db(
|
|
2514
|
+
self,
|
|
2515
|
+
embedding_endpoint: EmbeddingEndpoint,
|
|
2516
|
+
_request_timeout: Union[
|
|
2517
|
+
None,
|
|
2518
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2519
|
+
Tuple[
|
|
2520
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2521
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2522
|
+
]
|
|
2523
|
+
] = None,
|
|
2524
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2525
|
+
_content_type: Optional[StrictStr] = None,
|
|
2526
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2527
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2528
|
+
) -> EmbeddingEndpointValidationResponse:
|
|
2529
|
+
"""Validate Embedder Endpoint Before Creation In Db
|
|
2530
|
+
|
|
2531
|
+
|
|
2532
|
+
:param embedding_endpoint: (required)
|
|
2533
|
+
:type embedding_endpoint: EmbeddingEndpoint
|
|
2534
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2535
|
+
number provided, it will be total request
|
|
2536
|
+
timeout. It can also be a pair (tuple) of
|
|
2537
|
+
(connection, read) timeouts.
|
|
2538
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2539
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2540
|
+
request; this effectively ignores the
|
|
2541
|
+
authentication in the spec for a single request.
|
|
2542
|
+
:type _request_auth: dict, optional
|
|
2543
|
+
:param _content_type: force content-type for the request.
|
|
2544
|
+
:type _content_type: str, Optional
|
|
2545
|
+
:param _headers: set to override the headers for a single
|
|
2546
|
+
request; this effectively ignores the headers
|
|
2547
|
+
in the spec for a single request.
|
|
2548
|
+
:type _headers: dict, optional
|
|
2549
|
+
:param _host_index: set to override the host_index for a single
|
|
2550
|
+
request; this effectively ignores the host_index
|
|
2551
|
+
in the spec for a single request.
|
|
2552
|
+
:type _host_index: int, optional
|
|
2553
|
+
:return: Returns the result object.
|
|
2554
|
+
""" # noqa: E501
|
|
2555
|
+
|
|
2556
|
+
_param = self._validate_embedder_endpoint_before_creation_in_db_serialize(
|
|
2557
|
+
embedding_endpoint=embedding_endpoint,
|
|
2558
|
+
_request_auth=_request_auth,
|
|
2559
|
+
_content_type=_content_type,
|
|
2560
|
+
_headers=_headers,
|
|
2561
|
+
_host_index=_host_index
|
|
2562
|
+
)
|
|
2563
|
+
|
|
2564
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2565
|
+
'200': "EmbeddingEndpointValidationResponse",
|
|
2566
|
+
'404': None,
|
|
2567
|
+
'422': "HTTPValidationError",
|
|
2568
|
+
}
|
|
2569
|
+
response_data = self.api_client.call_api(
|
|
2570
|
+
*_param,
|
|
2571
|
+
_request_timeout=_request_timeout
|
|
2572
|
+
)
|
|
2573
|
+
response_data.read()
|
|
2574
|
+
return self.api_client.response_deserialize(
|
|
2575
|
+
response_data=response_data,
|
|
2576
|
+
response_types_map=_response_types_map,
|
|
2577
|
+
).data
|
|
2578
|
+
|
|
2579
|
+
|
|
2580
|
+
@validate_call
|
|
2581
|
+
def validate_embedder_endpoint_before_creation_in_db_with_http_info(
|
|
2582
|
+
self,
|
|
2583
|
+
embedding_endpoint: EmbeddingEndpoint,
|
|
2584
|
+
_request_timeout: Union[
|
|
2585
|
+
None,
|
|
2586
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2587
|
+
Tuple[
|
|
2588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2589
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2590
|
+
]
|
|
2591
|
+
] = None,
|
|
2592
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2593
|
+
_content_type: Optional[StrictStr] = None,
|
|
2594
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2595
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2596
|
+
) -> ApiResponse[EmbeddingEndpointValidationResponse]:
|
|
2597
|
+
"""Validate Embedder Endpoint Before Creation In Db
|
|
2598
|
+
|
|
2599
|
+
|
|
2600
|
+
:param embedding_endpoint: (required)
|
|
2601
|
+
:type embedding_endpoint: EmbeddingEndpoint
|
|
2602
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2603
|
+
number provided, it will be total request
|
|
2604
|
+
timeout. It can also be a pair (tuple) of
|
|
2605
|
+
(connection, read) timeouts.
|
|
2606
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2607
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2608
|
+
request; this effectively ignores the
|
|
2609
|
+
authentication in the spec for a single request.
|
|
2610
|
+
:type _request_auth: dict, optional
|
|
2611
|
+
:param _content_type: force content-type for the request.
|
|
2612
|
+
:type _content_type: str, Optional
|
|
2613
|
+
:param _headers: set to override the headers for a single
|
|
2614
|
+
request; this effectively ignores the headers
|
|
2615
|
+
in the spec for a single request.
|
|
2616
|
+
:type _headers: dict, optional
|
|
2617
|
+
:param _host_index: set to override the host_index for a single
|
|
2618
|
+
request; this effectively ignores the host_index
|
|
2619
|
+
in the spec for a single request.
|
|
2620
|
+
:type _host_index: int, optional
|
|
2621
|
+
:return: Returns the result object.
|
|
2622
|
+
""" # noqa: E501
|
|
2623
|
+
|
|
2624
|
+
_param = self._validate_embedder_endpoint_before_creation_in_db_serialize(
|
|
2625
|
+
embedding_endpoint=embedding_endpoint,
|
|
2626
|
+
_request_auth=_request_auth,
|
|
2627
|
+
_content_type=_content_type,
|
|
2628
|
+
_headers=_headers,
|
|
2629
|
+
_host_index=_host_index
|
|
2630
|
+
)
|
|
2631
|
+
|
|
2632
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2633
|
+
'200': "EmbeddingEndpointValidationResponse",
|
|
2634
|
+
'404': None,
|
|
2635
|
+
'422': "HTTPValidationError",
|
|
2636
|
+
}
|
|
2637
|
+
response_data = self.api_client.call_api(
|
|
2638
|
+
*_param,
|
|
2639
|
+
_request_timeout=_request_timeout
|
|
2640
|
+
)
|
|
2641
|
+
response_data.read()
|
|
2642
|
+
return self.api_client.response_deserialize(
|
|
2643
|
+
response_data=response_data,
|
|
2644
|
+
response_types_map=_response_types_map,
|
|
2645
|
+
)
|
|
2646
|
+
|
|
2647
|
+
|
|
2648
|
+
@validate_call
|
|
2649
|
+
def validate_embedder_endpoint_before_creation_in_db_without_preload_content(
|
|
2650
|
+
self,
|
|
2651
|
+
embedding_endpoint: EmbeddingEndpoint,
|
|
2652
|
+
_request_timeout: Union[
|
|
2653
|
+
None,
|
|
2654
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2655
|
+
Tuple[
|
|
2656
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2657
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2658
|
+
]
|
|
2659
|
+
] = None,
|
|
2660
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2661
|
+
_content_type: Optional[StrictStr] = None,
|
|
2662
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2663
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2664
|
+
) -> RESTResponseType:
|
|
2665
|
+
"""Validate Embedder Endpoint Before Creation In Db
|
|
2666
|
+
|
|
2667
|
+
|
|
2668
|
+
:param embedding_endpoint: (required)
|
|
2669
|
+
:type embedding_endpoint: EmbeddingEndpoint
|
|
2670
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2671
|
+
number provided, it will be total request
|
|
2672
|
+
timeout. It can also be a pair (tuple) of
|
|
2673
|
+
(connection, read) timeouts.
|
|
2674
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2675
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2676
|
+
request; this effectively ignores the
|
|
2677
|
+
authentication in the spec for a single request.
|
|
2678
|
+
:type _request_auth: dict, optional
|
|
2679
|
+
:param _content_type: force content-type for the request.
|
|
2680
|
+
:type _content_type: str, Optional
|
|
2681
|
+
:param _headers: set to override the headers for a single
|
|
2682
|
+
request; this effectively ignores the headers
|
|
2683
|
+
in the spec for a single request.
|
|
2684
|
+
:type _headers: dict, optional
|
|
2685
|
+
:param _host_index: set to override the host_index for a single
|
|
2686
|
+
request; this effectively ignores the host_index
|
|
2687
|
+
in the spec for a single request.
|
|
2688
|
+
:type _host_index: int, optional
|
|
2689
|
+
:return: Returns the result object.
|
|
2690
|
+
""" # noqa: E501
|
|
2691
|
+
|
|
2692
|
+
_param = self._validate_embedder_endpoint_before_creation_in_db_serialize(
|
|
2693
|
+
embedding_endpoint=embedding_endpoint,
|
|
2694
|
+
_request_auth=_request_auth,
|
|
2695
|
+
_content_type=_content_type,
|
|
2696
|
+
_headers=_headers,
|
|
2697
|
+
_host_index=_host_index
|
|
2698
|
+
)
|
|
2699
|
+
|
|
2700
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2701
|
+
'200': "EmbeddingEndpointValidationResponse",
|
|
2702
|
+
'404': None,
|
|
2703
|
+
'422': "HTTPValidationError",
|
|
2704
|
+
}
|
|
2705
|
+
response_data = self.api_client.call_api(
|
|
2706
|
+
*_param,
|
|
2707
|
+
_request_timeout=_request_timeout
|
|
2708
|
+
)
|
|
2709
|
+
return response_data.response
|
|
2710
|
+
|
|
2711
|
+
|
|
2712
|
+
def _validate_embedder_endpoint_before_creation_in_db_serialize(
|
|
2713
|
+
self,
|
|
2714
|
+
embedding_endpoint,
|
|
2715
|
+
_request_auth,
|
|
2716
|
+
_content_type,
|
|
2717
|
+
_headers,
|
|
2718
|
+
_host_index,
|
|
2719
|
+
) -> RequestSerialized:
|
|
2720
|
+
|
|
2721
|
+
_host = None
|
|
2722
|
+
|
|
2723
|
+
_collection_formats: Dict[str, str] = {
|
|
2724
|
+
}
|
|
2725
|
+
|
|
2726
|
+
_path_params: Dict[str, str] = {}
|
|
2727
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2728
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2729
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2730
|
+
_files: Dict[
|
|
2731
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2732
|
+
] = {}
|
|
2733
|
+
_body_params: Optional[bytes] = None
|
|
2734
|
+
|
|
2735
|
+
# process the path parameters
|
|
2736
|
+
# process the query parameters
|
|
2737
|
+
# process the header parameters
|
|
2738
|
+
# process the form parameters
|
|
2739
|
+
# process the body parameter
|
|
2740
|
+
if embedding_endpoint is not None:
|
|
2741
|
+
_body_params = embedding_endpoint
|
|
2742
|
+
|
|
2743
|
+
|
|
2744
|
+
# set the HTTP header `Accept`
|
|
2745
|
+
if 'Accept' not in _header_params:
|
|
2746
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2747
|
+
[
|
|
2748
|
+
'application/json'
|
|
2749
|
+
]
|
|
2750
|
+
)
|
|
2751
|
+
|
|
2752
|
+
# set the HTTP header `Content-Type`
|
|
2753
|
+
if _content_type:
|
|
2754
|
+
_header_params['Content-Type'] = _content_type
|
|
2755
|
+
else:
|
|
2756
|
+
_default_content_type = (
|
|
2757
|
+
self.api_client.select_header_content_type(
|
|
2758
|
+
[
|
|
2759
|
+
'application/json'
|
|
2760
|
+
]
|
|
2761
|
+
)
|
|
2762
|
+
)
|
|
2763
|
+
if _default_content_type is not None:
|
|
2764
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2765
|
+
|
|
2766
|
+
# authentication setting
|
|
2767
|
+
_auth_settings: List[str] = [
|
|
2768
|
+
'QAnswer-Api-Key',
|
|
2769
|
+
'Bearer token'
|
|
2770
|
+
]
|
|
2771
|
+
|
|
2772
|
+
return self.api_client.param_serialize(
|
|
2773
|
+
method='POST',
|
|
2774
|
+
resource_path='/backend/api/embedder-endpoint/validate-before-creation',
|
|
2775
|
+
path_params=_path_params,
|
|
2776
|
+
query_params=_query_params,
|
|
2777
|
+
header_params=_header_params,
|
|
2778
|
+
body=_body_params,
|
|
2779
|
+
post_params=_form_params,
|
|
2780
|
+
files=_files,
|
|
2781
|
+
auth_settings=_auth_settings,
|
|
2782
|
+
collection_formats=_collection_formats,
|
|
2783
|
+
_host=_host,
|
|
2784
|
+
_request_auth=_request_auth
|
|
2785
|
+
)
|
|
2786
|
+
|
|
2787
|
+
|
|
2788
|
+
|
|
2789
|
+
|
|
2790
|
+
@validate_call
|
|
2791
|
+
def validate_embedder_endpoint_names(
|
|
2792
|
+
self,
|
|
2793
|
+
embedding_endpoint_names_validation_payload: EmbeddingEndpointNamesValidationPayload,
|
|
2794
|
+
_request_timeout: Union[
|
|
2795
|
+
None,
|
|
2796
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2797
|
+
Tuple[
|
|
2798
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2799
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2800
|
+
]
|
|
2801
|
+
] = None,
|
|
2802
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2803
|
+
_content_type: Optional[StrictStr] = None,
|
|
2804
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2805
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2806
|
+
) -> bool:
|
|
2807
|
+
"""Validate Embedder Endpoint Names
|
|
2808
|
+
|
|
2809
|
+
|
|
2810
|
+
:param embedding_endpoint_names_validation_payload: (required)
|
|
2811
|
+
:type embedding_endpoint_names_validation_payload: EmbeddingEndpointNamesValidationPayload
|
|
2812
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2813
|
+
number provided, it will be total request
|
|
2814
|
+
timeout. It can also be a pair (tuple) of
|
|
2815
|
+
(connection, read) timeouts.
|
|
2816
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2817
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2818
|
+
request; this effectively ignores the
|
|
2819
|
+
authentication in the spec for a single request.
|
|
2820
|
+
:type _request_auth: dict, optional
|
|
2821
|
+
:param _content_type: force content-type for the request.
|
|
2822
|
+
:type _content_type: str, Optional
|
|
2823
|
+
:param _headers: set to override the headers for a single
|
|
2824
|
+
request; this effectively ignores the headers
|
|
2825
|
+
in the spec for a single request.
|
|
2826
|
+
:type _headers: dict, optional
|
|
2827
|
+
:param _host_index: set to override the host_index for a single
|
|
2828
|
+
request; this effectively ignores the host_index
|
|
2829
|
+
in the spec for a single request.
|
|
2830
|
+
:type _host_index: int, optional
|
|
2831
|
+
:return: Returns the result object.
|
|
2832
|
+
""" # noqa: E501
|
|
2833
|
+
|
|
2834
|
+
_param = self._validate_embedder_endpoint_names_serialize(
|
|
2835
|
+
embedding_endpoint_names_validation_payload=embedding_endpoint_names_validation_payload,
|
|
2836
|
+
_request_auth=_request_auth,
|
|
2837
|
+
_content_type=_content_type,
|
|
2838
|
+
_headers=_headers,
|
|
2839
|
+
_host_index=_host_index
|
|
2840
|
+
)
|
|
2841
|
+
|
|
2842
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2843
|
+
'200': "bool",
|
|
2844
|
+
'404': None,
|
|
2845
|
+
'422': "HTTPValidationError",
|
|
2846
|
+
}
|
|
2847
|
+
response_data = self.api_client.call_api(
|
|
2848
|
+
*_param,
|
|
2849
|
+
_request_timeout=_request_timeout
|
|
2850
|
+
)
|
|
2851
|
+
response_data.read()
|
|
2852
|
+
return self.api_client.response_deserialize(
|
|
2853
|
+
response_data=response_data,
|
|
2854
|
+
response_types_map=_response_types_map,
|
|
2855
|
+
).data
|
|
2856
|
+
|
|
2857
|
+
|
|
2858
|
+
@validate_call
|
|
2859
|
+
def validate_embedder_endpoint_names_with_http_info(
|
|
2860
|
+
self,
|
|
2861
|
+
embedding_endpoint_names_validation_payload: EmbeddingEndpointNamesValidationPayload,
|
|
2862
|
+
_request_timeout: Union[
|
|
2863
|
+
None,
|
|
2864
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2865
|
+
Tuple[
|
|
2866
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2867
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2868
|
+
]
|
|
2869
|
+
] = None,
|
|
2870
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2871
|
+
_content_type: Optional[StrictStr] = None,
|
|
2872
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2873
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2874
|
+
) -> ApiResponse[bool]:
|
|
2875
|
+
"""Validate Embedder Endpoint Names
|
|
2876
|
+
|
|
2877
|
+
|
|
2878
|
+
:param embedding_endpoint_names_validation_payload: (required)
|
|
2879
|
+
:type embedding_endpoint_names_validation_payload: EmbeddingEndpointNamesValidationPayload
|
|
2880
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2881
|
+
number provided, it will be total request
|
|
2882
|
+
timeout. It can also be a pair (tuple) of
|
|
2883
|
+
(connection, read) timeouts.
|
|
2884
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2885
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2886
|
+
request; this effectively ignores the
|
|
2887
|
+
authentication in the spec for a single request.
|
|
2888
|
+
:type _request_auth: dict, optional
|
|
2889
|
+
:param _content_type: force content-type for the request.
|
|
2890
|
+
:type _content_type: str, Optional
|
|
2891
|
+
:param _headers: set to override the headers for a single
|
|
2892
|
+
request; this effectively ignores the headers
|
|
2893
|
+
in the spec for a single request.
|
|
2894
|
+
:type _headers: dict, optional
|
|
2895
|
+
:param _host_index: set to override the host_index for a single
|
|
2896
|
+
request; this effectively ignores the host_index
|
|
2897
|
+
in the spec for a single request.
|
|
2898
|
+
:type _host_index: int, optional
|
|
2899
|
+
:return: Returns the result object.
|
|
2900
|
+
""" # noqa: E501
|
|
2901
|
+
|
|
2902
|
+
_param = self._validate_embedder_endpoint_names_serialize(
|
|
2903
|
+
embedding_endpoint_names_validation_payload=embedding_endpoint_names_validation_payload,
|
|
2904
|
+
_request_auth=_request_auth,
|
|
2905
|
+
_content_type=_content_type,
|
|
2906
|
+
_headers=_headers,
|
|
2907
|
+
_host_index=_host_index
|
|
2908
|
+
)
|
|
2909
|
+
|
|
2910
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2911
|
+
'200': "bool",
|
|
2912
|
+
'404': None,
|
|
2913
|
+
'422': "HTTPValidationError",
|
|
2914
|
+
}
|
|
2915
|
+
response_data = self.api_client.call_api(
|
|
2916
|
+
*_param,
|
|
2917
|
+
_request_timeout=_request_timeout
|
|
2918
|
+
)
|
|
2919
|
+
response_data.read()
|
|
2920
|
+
return self.api_client.response_deserialize(
|
|
2921
|
+
response_data=response_data,
|
|
2922
|
+
response_types_map=_response_types_map,
|
|
2923
|
+
)
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
@validate_call
|
|
2927
|
+
def validate_embedder_endpoint_names_without_preload_content(
|
|
2928
|
+
self,
|
|
2929
|
+
embedding_endpoint_names_validation_payload: EmbeddingEndpointNamesValidationPayload,
|
|
2930
|
+
_request_timeout: Union[
|
|
2931
|
+
None,
|
|
2932
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2933
|
+
Tuple[
|
|
2934
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2935
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2936
|
+
]
|
|
2937
|
+
] = None,
|
|
2938
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2939
|
+
_content_type: Optional[StrictStr] = None,
|
|
2940
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2941
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2942
|
+
) -> RESTResponseType:
|
|
2943
|
+
"""Validate Embedder Endpoint Names
|
|
2944
|
+
|
|
2945
|
+
|
|
2946
|
+
:param embedding_endpoint_names_validation_payload: (required)
|
|
2947
|
+
:type embedding_endpoint_names_validation_payload: EmbeddingEndpointNamesValidationPayload
|
|
2948
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2949
|
+
number provided, it will be total request
|
|
2950
|
+
timeout. It can also be a pair (tuple) of
|
|
2951
|
+
(connection, read) timeouts.
|
|
2952
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2953
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2954
|
+
request; this effectively ignores the
|
|
2955
|
+
authentication in the spec for a single request.
|
|
2956
|
+
:type _request_auth: dict, optional
|
|
2957
|
+
:param _content_type: force content-type for the request.
|
|
2958
|
+
:type _content_type: str, Optional
|
|
2959
|
+
:param _headers: set to override the headers for a single
|
|
2960
|
+
request; this effectively ignores the headers
|
|
2961
|
+
in the spec for a single request.
|
|
2962
|
+
:type _headers: dict, optional
|
|
2963
|
+
:param _host_index: set to override the host_index for a single
|
|
2964
|
+
request; this effectively ignores the host_index
|
|
2965
|
+
in the spec for a single request.
|
|
2966
|
+
:type _host_index: int, optional
|
|
2967
|
+
:return: Returns the result object.
|
|
2968
|
+
""" # noqa: E501
|
|
2969
|
+
|
|
2970
|
+
_param = self._validate_embedder_endpoint_names_serialize(
|
|
2971
|
+
embedding_endpoint_names_validation_payload=embedding_endpoint_names_validation_payload,
|
|
2972
|
+
_request_auth=_request_auth,
|
|
2973
|
+
_content_type=_content_type,
|
|
2974
|
+
_headers=_headers,
|
|
2975
|
+
_host_index=_host_index
|
|
2976
|
+
)
|
|
2977
|
+
|
|
2978
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2979
|
+
'200': "bool",
|
|
2980
|
+
'404': None,
|
|
2981
|
+
'422': "HTTPValidationError",
|
|
2982
|
+
}
|
|
2983
|
+
response_data = self.api_client.call_api(
|
|
2984
|
+
*_param,
|
|
2985
|
+
_request_timeout=_request_timeout
|
|
2986
|
+
)
|
|
2987
|
+
return response_data.response
|
|
2988
|
+
|
|
2989
|
+
|
|
2990
|
+
def _validate_embedder_endpoint_names_serialize(
|
|
2991
|
+
self,
|
|
2992
|
+
embedding_endpoint_names_validation_payload,
|
|
2993
|
+
_request_auth,
|
|
2994
|
+
_content_type,
|
|
2995
|
+
_headers,
|
|
2996
|
+
_host_index,
|
|
2997
|
+
) -> RequestSerialized:
|
|
2998
|
+
|
|
2999
|
+
_host = None
|
|
3000
|
+
|
|
3001
|
+
_collection_formats: Dict[str, str] = {
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
_path_params: Dict[str, str] = {}
|
|
3005
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3006
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3007
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3008
|
+
_files: Dict[
|
|
3009
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3010
|
+
] = {}
|
|
3011
|
+
_body_params: Optional[bytes] = None
|
|
3012
|
+
|
|
3013
|
+
# process the path parameters
|
|
3014
|
+
# process the query parameters
|
|
3015
|
+
# process the header parameters
|
|
3016
|
+
# process the form parameters
|
|
3017
|
+
# process the body parameter
|
|
3018
|
+
if embedding_endpoint_names_validation_payload is not None:
|
|
3019
|
+
_body_params = embedding_endpoint_names_validation_payload
|
|
3020
|
+
|
|
3021
|
+
|
|
3022
|
+
# set the HTTP header `Accept`
|
|
3023
|
+
if 'Accept' not in _header_params:
|
|
3024
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3025
|
+
[
|
|
3026
|
+
'application/json'
|
|
3027
|
+
]
|
|
3028
|
+
)
|
|
3029
|
+
|
|
3030
|
+
# set the HTTP header `Content-Type`
|
|
3031
|
+
if _content_type:
|
|
3032
|
+
_header_params['Content-Type'] = _content_type
|
|
3033
|
+
else:
|
|
3034
|
+
_default_content_type = (
|
|
3035
|
+
self.api_client.select_header_content_type(
|
|
3036
|
+
[
|
|
3037
|
+
'application/json'
|
|
3038
|
+
]
|
|
3039
|
+
)
|
|
3040
|
+
)
|
|
3041
|
+
if _default_content_type is not None:
|
|
3042
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3043
|
+
|
|
3044
|
+
# authentication setting
|
|
3045
|
+
_auth_settings: List[str] = [
|
|
3046
|
+
'QAnswer-Api-Key',
|
|
3047
|
+
'Bearer token'
|
|
3048
|
+
]
|
|
3049
|
+
|
|
3050
|
+
return self.api_client.param_serialize(
|
|
3051
|
+
method='POST',
|
|
3052
|
+
resource_path='/backend/api/embedder-endpoint/validate-names',
|
|
3053
|
+
path_params=_path_params,
|
|
3054
|
+
query_params=_query_params,
|
|
3055
|
+
header_params=_header_params,
|
|
3056
|
+
body=_body_params,
|
|
3057
|
+
post_params=_form_params,
|
|
3058
|
+
files=_files,
|
|
3059
|
+
auth_settings=_auth_settings,
|
|
3060
|
+
collection_formats=_collection_formats,
|
|
3061
|
+
_host=_host,
|
|
3062
|
+
_request_auth=_request_auth
|
|
3063
|
+
)
|
|
3064
|
+
|
|
3065
|
+
|
|
3066
|
+
|
|
3067
|
+
|
|
3068
|
+
@validate_call
|
|
3069
|
+
def validate_embedder_endpoint_v2(
|
|
3070
|
+
self,
|
|
3071
|
+
id: StrictInt,
|
|
3072
|
+
_request_timeout: Union[
|
|
3073
|
+
None,
|
|
3074
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3075
|
+
Tuple[
|
|
3076
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3077
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3078
|
+
]
|
|
3079
|
+
] = None,
|
|
3080
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3081
|
+
_content_type: Optional[StrictStr] = None,
|
|
3082
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3083
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3084
|
+
) -> EmbeddingEndpointValidationResponse:
|
|
3085
|
+
"""Validate Embedder Endpoint V2
|
|
3086
|
+
|
|
3087
|
+
|
|
3088
|
+
:param id: (required)
|
|
3089
|
+
:type id: int
|
|
3090
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3091
|
+
number provided, it will be total request
|
|
3092
|
+
timeout. It can also be a pair (tuple) of
|
|
3093
|
+
(connection, read) timeouts.
|
|
3094
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3095
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3096
|
+
request; this effectively ignores the
|
|
3097
|
+
authentication in the spec for a single request.
|
|
3098
|
+
:type _request_auth: dict, optional
|
|
3099
|
+
:param _content_type: force content-type for the request.
|
|
3100
|
+
:type _content_type: str, Optional
|
|
3101
|
+
:param _headers: set to override the headers for a single
|
|
3102
|
+
request; this effectively ignores the headers
|
|
3103
|
+
in the spec for a single request.
|
|
3104
|
+
:type _headers: dict, optional
|
|
3105
|
+
:param _host_index: set to override the host_index for a single
|
|
3106
|
+
request; this effectively ignores the host_index
|
|
3107
|
+
in the spec for a single request.
|
|
3108
|
+
:type _host_index: int, optional
|
|
3109
|
+
:return: Returns the result object.
|
|
3110
|
+
""" # noqa: E501
|
|
3111
|
+
|
|
3112
|
+
_param = self._validate_embedder_endpoint_v2_serialize(
|
|
3113
|
+
id=id,
|
|
3114
|
+
_request_auth=_request_auth,
|
|
3115
|
+
_content_type=_content_type,
|
|
3116
|
+
_headers=_headers,
|
|
3117
|
+
_host_index=_host_index
|
|
3118
|
+
)
|
|
3119
|
+
|
|
3120
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3121
|
+
'200': "EmbeddingEndpointValidationResponse",
|
|
3122
|
+
'404': None,
|
|
3123
|
+
'422': "HTTPValidationError",
|
|
3124
|
+
}
|
|
3125
|
+
response_data = self.api_client.call_api(
|
|
3126
|
+
*_param,
|
|
3127
|
+
_request_timeout=_request_timeout
|
|
3128
|
+
)
|
|
3129
|
+
response_data.read()
|
|
3130
|
+
return self.api_client.response_deserialize(
|
|
3131
|
+
response_data=response_data,
|
|
3132
|
+
response_types_map=_response_types_map,
|
|
3133
|
+
).data
|
|
3134
|
+
|
|
3135
|
+
|
|
3136
|
+
@validate_call
|
|
3137
|
+
def validate_embedder_endpoint_v2_with_http_info(
|
|
3138
|
+
self,
|
|
3139
|
+
id: StrictInt,
|
|
3140
|
+
_request_timeout: Union[
|
|
3141
|
+
None,
|
|
3142
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3143
|
+
Tuple[
|
|
3144
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3145
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3146
|
+
]
|
|
3147
|
+
] = None,
|
|
3148
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3149
|
+
_content_type: Optional[StrictStr] = None,
|
|
3150
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3151
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3152
|
+
) -> ApiResponse[EmbeddingEndpointValidationResponse]:
|
|
3153
|
+
"""Validate Embedder Endpoint V2
|
|
3154
|
+
|
|
3155
|
+
|
|
3156
|
+
:param id: (required)
|
|
3157
|
+
:type id: int
|
|
3158
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3159
|
+
number provided, it will be total request
|
|
3160
|
+
timeout. It can also be a pair (tuple) of
|
|
3161
|
+
(connection, read) timeouts.
|
|
3162
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3163
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3164
|
+
request; this effectively ignores the
|
|
3165
|
+
authentication in the spec for a single request.
|
|
3166
|
+
:type _request_auth: dict, optional
|
|
3167
|
+
:param _content_type: force content-type for the request.
|
|
3168
|
+
:type _content_type: str, Optional
|
|
3169
|
+
:param _headers: set to override the headers for a single
|
|
3170
|
+
request; this effectively ignores the headers
|
|
3171
|
+
in the spec for a single request.
|
|
3172
|
+
:type _headers: dict, optional
|
|
3173
|
+
:param _host_index: set to override the host_index for a single
|
|
3174
|
+
request; this effectively ignores the host_index
|
|
3175
|
+
in the spec for a single request.
|
|
3176
|
+
:type _host_index: int, optional
|
|
3177
|
+
:return: Returns the result object.
|
|
3178
|
+
""" # noqa: E501
|
|
3179
|
+
|
|
3180
|
+
_param = self._validate_embedder_endpoint_v2_serialize(
|
|
3181
|
+
id=id,
|
|
3182
|
+
_request_auth=_request_auth,
|
|
3183
|
+
_content_type=_content_type,
|
|
3184
|
+
_headers=_headers,
|
|
3185
|
+
_host_index=_host_index
|
|
3186
|
+
)
|
|
3187
|
+
|
|
3188
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3189
|
+
'200': "EmbeddingEndpointValidationResponse",
|
|
3190
|
+
'404': None,
|
|
3191
|
+
'422': "HTTPValidationError",
|
|
3192
|
+
}
|
|
3193
|
+
response_data = self.api_client.call_api(
|
|
3194
|
+
*_param,
|
|
3195
|
+
_request_timeout=_request_timeout
|
|
3196
|
+
)
|
|
3197
|
+
response_data.read()
|
|
3198
|
+
return self.api_client.response_deserialize(
|
|
3199
|
+
response_data=response_data,
|
|
3200
|
+
response_types_map=_response_types_map,
|
|
3201
|
+
)
|
|
3202
|
+
|
|
3203
|
+
|
|
3204
|
+
@validate_call
|
|
3205
|
+
def validate_embedder_endpoint_v2_without_preload_content(
|
|
3206
|
+
self,
|
|
3207
|
+
id: StrictInt,
|
|
3208
|
+
_request_timeout: Union[
|
|
3209
|
+
None,
|
|
3210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3211
|
+
Tuple[
|
|
3212
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3213
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3214
|
+
]
|
|
3215
|
+
] = None,
|
|
3216
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3217
|
+
_content_type: Optional[StrictStr] = None,
|
|
3218
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3219
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3220
|
+
) -> RESTResponseType:
|
|
3221
|
+
"""Validate Embedder Endpoint V2
|
|
3222
|
+
|
|
3223
|
+
|
|
3224
|
+
:param id: (required)
|
|
3225
|
+
:type id: int
|
|
3226
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3227
|
+
number provided, it will be total request
|
|
3228
|
+
timeout. It can also be a pair (tuple) of
|
|
3229
|
+
(connection, read) timeouts.
|
|
3230
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3231
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3232
|
+
request; this effectively ignores the
|
|
3233
|
+
authentication in the spec for a single request.
|
|
3234
|
+
:type _request_auth: dict, optional
|
|
3235
|
+
:param _content_type: force content-type for the request.
|
|
3236
|
+
:type _content_type: str, Optional
|
|
3237
|
+
:param _headers: set to override the headers for a single
|
|
3238
|
+
request; this effectively ignores the headers
|
|
3239
|
+
in the spec for a single request.
|
|
3240
|
+
:type _headers: dict, optional
|
|
3241
|
+
:param _host_index: set to override the host_index for a single
|
|
3242
|
+
request; this effectively ignores the host_index
|
|
3243
|
+
in the spec for a single request.
|
|
3244
|
+
:type _host_index: int, optional
|
|
3245
|
+
:return: Returns the result object.
|
|
3246
|
+
""" # noqa: E501
|
|
3247
|
+
|
|
3248
|
+
_param = self._validate_embedder_endpoint_v2_serialize(
|
|
3249
|
+
id=id,
|
|
3250
|
+
_request_auth=_request_auth,
|
|
3251
|
+
_content_type=_content_type,
|
|
3252
|
+
_headers=_headers,
|
|
3253
|
+
_host_index=_host_index
|
|
3254
|
+
)
|
|
3255
|
+
|
|
3256
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3257
|
+
'200': "EmbeddingEndpointValidationResponse",
|
|
3258
|
+
'404': None,
|
|
3259
|
+
'422': "HTTPValidationError",
|
|
3260
|
+
}
|
|
3261
|
+
response_data = self.api_client.call_api(
|
|
3262
|
+
*_param,
|
|
3263
|
+
_request_timeout=_request_timeout
|
|
3264
|
+
)
|
|
3265
|
+
return response_data.response
|
|
3266
|
+
|
|
3267
|
+
|
|
3268
|
+
def _validate_embedder_endpoint_v2_serialize(
|
|
3269
|
+
self,
|
|
3270
|
+
id,
|
|
3271
|
+
_request_auth,
|
|
3272
|
+
_content_type,
|
|
3273
|
+
_headers,
|
|
3274
|
+
_host_index,
|
|
3275
|
+
) -> RequestSerialized:
|
|
3276
|
+
|
|
3277
|
+
_host = None
|
|
3278
|
+
|
|
3279
|
+
_collection_formats: Dict[str, str] = {
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
_path_params: Dict[str, str] = {}
|
|
3283
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3284
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3285
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3286
|
+
_files: Dict[
|
|
3287
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3288
|
+
] = {}
|
|
3289
|
+
_body_params: Optional[bytes] = None
|
|
3290
|
+
|
|
3291
|
+
# process the path parameters
|
|
3292
|
+
if id is not None:
|
|
3293
|
+
_path_params['id'] = id
|
|
3294
|
+
# process the query parameters
|
|
3295
|
+
# process the header parameters
|
|
3296
|
+
# process the form parameters
|
|
3297
|
+
# process the body parameter
|
|
3298
|
+
|
|
3299
|
+
|
|
3300
|
+
# set the HTTP header `Accept`
|
|
3301
|
+
if 'Accept' not in _header_params:
|
|
3302
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3303
|
+
[
|
|
3304
|
+
'application/json'
|
|
3305
|
+
]
|
|
3306
|
+
)
|
|
3307
|
+
|
|
3308
|
+
|
|
3309
|
+
# authentication setting
|
|
3310
|
+
_auth_settings: List[str] = [
|
|
3311
|
+
'QAnswer-Api-Key',
|
|
3312
|
+
'Bearer token'
|
|
3313
|
+
]
|
|
3314
|
+
|
|
3315
|
+
return self.api_client.param_serialize(
|
|
3316
|
+
method='POST',
|
|
3317
|
+
resource_path='/backend/api/embedder-endpoint/validate/{id}',
|
|
3318
|
+
path_params=_path_params,
|
|
3319
|
+
query_params=_query_params,
|
|
3320
|
+
header_params=_header_params,
|
|
3321
|
+
body=_body_params,
|
|
3322
|
+
post_params=_form_params,
|
|
3323
|
+
files=_files,
|
|
3324
|
+
auth_settings=_auth_settings,
|
|
3325
|
+
collection_formats=_collection_formats,
|
|
3326
|
+
_host=_host,
|
|
3327
|
+
_request_auth=_request_auth
|
|
3328
|
+
)
|
|
3329
|
+
|
|
3330
|
+
|