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,4643 @@
|
|
|
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 List, Optional, Tuple, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from qanswer_sdk.models.add_synonyms import AddSynonyms
|
|
23
|
+
from qanswer_sdk.models.add_synonyms_resp import AddSynonymsResp
|
|
24
|
+
from qanswer_sdk.models.available_logs_visibility_policy import AvailableLogsVisibilityPolicy
|
|
25
|
+
from qanswer_sdk.models.available_storage_preference import AvailableStoragePreference
|
|
26
|
+
from qanswer_sdk.models.dataset_default_values_model import DatasetDefaultValuesModel
|
|
27
|
+
from qanswer_sdk.models.dataset_schema import DatasetSchema
|
|
28
|
+
from qanswer_sdk.models.delete_index import DeleteIndex
|
|
29
|
+
from qanswer_sdk.models.delete_index_resp import DeleteIndexResp
|
|
30
|
+
from qanswer_sdk.models.delete_synonym import DeleteSynonym
|
|
31
|
+
from qanswer_sdk.models.delete_synonym_resp import DeleteSynonymResp
|
|
32
|
+
from qanswer_sdk.models.delete_synonyms import DeleteSynonyms
|
|
33
|
+
from qanswer_sdk.models.prepare_synonyms_upload_resp import PrepareSynonymsUploadResp
|
|
34
|
+
from qanswer_sdk.models.retreive_all_synonyms_resp import RetreiveAllSynonymsResp
|
|
35
|
+
from qanswer_sdk.models.search_synonyms_resp import SearchSynonymsResp
|
|
36
|
+
from qanswer_sdk.models.update_synonyms import UpdateSynonyms
|
|
37
|
+
from qanswer_sdk.models.update_synonyms_resp import UpdateSynonymsResp
|
|
38
|
+
|
|
39
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
|
40
|
+
from qanswer_sdk.api_response import ApiResponse
|
|
41
|
+
from qanswer_sdk.rest import RESTResponseType
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class DatasetConfigApi:
|
|
45
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
46
|
+
Ref: https://openapi-generator.tech
|
|
47
|
+
|
|
48
|
+
Do not edit the class manually.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
def __init__(self, api_client=None) -> None:
|
|
52
|
+
if api_client is None:
|
|
53
|
+
api_client = ApiClient.get_default()
|
|
54
|
+
self.api_client = api_client
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@validate_call
|
|
58
|
+
def add_synonyms_compat(
|
|
59
|
+
self,
|
|
60
|
+
add_synonyms: AddSynonyms,
|
|
61
|
+
_request_timeout: Union[
|
|
62
|
+
None,
|
|
63
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
64
|
+
Tuple[
|
|
65
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
66
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
67
|
+
]
|
|
68
|
+
] = None,
|
|
69
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
70
|
+
_content_type: Optional[StrictStr] = None,
|
|
71
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
72
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
73
|
+
) -> AddSynonymsResp:
|
|
74
|
+
"""Add Synonyms Compat
|
|
75
|
+
|
|
76
|
+
Create synonyms specified for a dataset (Java compat path)
|
|
77
|
+
|
|
78
|
+
:param add_synonyms: (required)
|
|
79
|
+
:type add_synonyms: AddSynonyms
|
|
80
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
81
|
+
number provided, it will be total request
|
|
82
|
+
timeout. It can also be a pair (tuple) of
|
|
83
|
+
(connection, read) timeouts.
|
|
84
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
85
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
86
|
+
request; this effectively ignores the
|
|
87
|
+
authentication in the spec for a single request.
|
|
88
|
+
:type _request_auth: dict, optional
|
|
89
|
+
:param _content_type: force content-type for the request.
|
|
90
|
+
:type _content_type: str, Optional
|
|
91
|
+
:param _headers: set to override the headers for a single
|
|
92
|
+
request; this effectively ignores the headers
|
|
93
|
+
in the spec for a single request.
|
|
94
|
+
:type _headers: dict, optional
|
|
95
|
+
:param _host_index: set to override the host_index for a single
|
|
96
|
+
request; this effectively ignores the host_index
|
|
97
|
+
in the spec for a single request.
|
|
98
|
+
:type _host_index: int, optional
|
|
99
|
+
:return: Returns the result object.
|
|
100
|
+
""" # noqa: E501
|
|
101
|
+
|
|
102
|
+
_param = self._add_synonyms_compat_serialize(
|
|
103
|
+
add_synonyms=add_synonyms,
|
|
104
|
+
_request_auth=_request_auth,
|
|
105
|
+
_content_type=_content_type,
|
|
106
|
+
_headers=_headers,
|
|
107
|
+
_host_index=_host_index
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
111
|
+
'200': "AddSynonymsResp",
|
|
112
|
+
'422': "HTTPValidationError",
|
|
113
|
+
}
|
|
114
|
+
response_data = self.api_client.call_api(
|
|
115
|
+
*_param,
|
|
116
|
+
_request_timeout=_request_timeout
|
|
117
|
+
)
|
|
118
|
+
response_data.read()
|
|
119
|
+
return self.api_client.response_deserialize(
|
|
120
|
+
response_data=response_data,
|
|
121
|
+
response_types_map=_response_types_map,
|
|
122
|
+
).data
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
@validate_call
|
|
126
|
+
def add_synonyms_compat_with_http_info(
|
|
127
|
+
self,
|
|
128
|
+
add_synonyms: AddSynonyms,
|
|
129
|
+
_request_timeout: Union[
|
|
130
|
+
None,
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
132
|
+
Tuple[
|
|
133
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
135
|
+
]
|
|
136
|
+
] = None,
|
|
137
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
138
|
+
_content_type: Optional[StrictStr] = None,
|
|
139
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
140
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
141
|
+
) -> ApiResponse[AddSynonymsResp]:
|
|
142
|
+
"""Add Synonyms Compat
|
|
143
|
+
|
|
144
|
+
Create synonyms specified for a dataset (Java compat path)
|
|
145
|
+
|
|
146
|
+
:param add_synonyms: (required)
|
|
147
|
+
:type add_synonyms: AddSynonyms
|
|
148
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
149
|
+
number provided, it will be total request
|
|
150
|
+
timeout. It can also be a pair (tuple) of
|
|
151
|
+
(connection, read) timeouts.
|
|
152
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
153
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
154
|
+
request; this effectively ignores the
|
|
155
|
+
authentication in the spec for a single request.
|
|
156
|
+
:type _request_auth: dict, optional
|
|
157
|
+
:param _content_type: force content-type for the request.
|
|
158
|
+
:type _content_type: str, Optional
|
|
159
|
+
:param _headers: set to override the headers for a single
|
|
160
|
+
request; this effectively ignores the headers
|
|
161
|
+
in the spec for a single request.
|
|
162
|
+
:type _headers: dict, optional
|
|
163
|
+
:param _host_index: set to override the host_index for a single
|
|
164
|
+
request; this effectively ignores the host_index
|
|
165
|
+
in the spec for a single request.
|
|
166
|
+
:type _host_index: int, optional
|
|
167
|
+
:return: Returns the result object.
|
|
168
|
+
""" # noqa: E501
|
|
169
|
+
|
|
170
|
+
_param = self._add_synonyms_compat_serialize(
|
|
171
|
+
add_synonyms=add_synonyms,
|
|
172
|
+
_request_auth=_request_auth,
|
|
173
|
+
_content_type=_content_type,
|
|
174
|
+
_headers=_headers,
|
|
175
|
+
_host_index=_host_index
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
179
|
+
'200': "AddSynonymsResp",
|
|
180
|
+
'422': "HTTPValidationError",
|
|
181
|
+
}
|
|
182
|
+
response_data = self.api_client.call_api(
|
|
183
|
+
*_param,
|
|
184
|
+
_request_timeout=_request_timeout
|
|
185
|
+
)
|
|
186
|
+
response_data.read()
|
|
187
|
+
return self.api_client.response_deserialize(
|
|
188
|
+
response_data=response_data,
|
|
189
|
+
response_types_map=_response_types_map,
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
@validate_call
|
|
194
|
+
def add_synonyms_compat_without_preload_content(
|
|
195
|
+
self,
|
|
196
|
+
add_synonyms: AddSynonyms,
|
|
197
|
+
_request_timeout: Union[
|
|
198
|
+
None,
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Tuple[
|
|
201
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
203
|
+
]
|
|
204
|
+
] = None,
|
|
205
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_content_type: Optional[StrictStr] = None,
|
|
207
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
208
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
209
|
+
) -> RESTResponseType:
|
|
210
|
+
"""Add Synonyms Compat
|
|
211
|
+
|
|
212
|
+
Create synonyms specified for a dataset (Java compat path)
|
|
213
|
+
|
|
214
|
+
:param add_synonyms: (required)
|
|
215
|
+
:type add_synonyms: AddSynonyms
|
|
216
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
217
|
+
number provided, it will be total request
|
|
218
|
+
timeout. It can also be a pair (tuple) of
|
|
219
|
+
(connection, read) timeouts.
|
|
220
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
221
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
222
|
+
request; this effectively ignores the
|
|
223
|
+
authentication in the spec for a single request.
|
|
224
|
+
:type _request_auth: dict, optional
|
|
225
|
+
:param _content_type: force content-type for the request.
|
|
226
|
+
:type _content_type: str, Optional
|
|
227
|
+
:param _headers: set to override the headers for a single
|
|
228
|
+
request; this effectively ignores the headers
|
|
229
|
+
in the spec for a single request.
|
|
230
|
+
:type _headers: dict, optional
|
|
231
|
+
:param _host_index: set to override the host_index for a single
|
|
232
|
+
request; this effectively ignores the host_index
|
|
233
|
+
in the spec for a single request.
|
|
234
|
+
:type _host_index: int, optional
|
|
235
|
+
:return: Returns the result object.
|
|
236
|
+
""" # noqa: E501
|
|
237
|
+
|
|
238
|
+
_param = self._add_synonyms_compat_serialize(
|
|
239
|
+
add_synonyms=add_synonyms,
|
|
240
|
+
_request_auth=_request_auth,
|
|
241
|
+
_content_type=_content_type,
|
|
242
|
+
_headers=_headers,
|
|
243
|
+
_host_index=_host_index
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
247
|
+
'200': "AddSynonymsResp",
|
|
248
|
+
'422': "HTTPValidationError",
|
|
249
|
+
}
|
|
250
|
+
response_data = self.api_client.call_api(
|
|
251
|
+
*_param,
|
|
252
|
+
_request_timeout=_request_timeout
|
|
253
|
+
)
|
|
254
|
+
return response_data.response
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def _add_synonyms_compat_serialize(
|
|
258
|
+
self,
|
|
259
|
+
add_synonyms,
|
|
260
|
+
_request_auth,
|
|
261
|
+
_content_type,
|
|
262
|
+
_headers,
|
|
263
|
+
_host_index,
|
|
264
|
+
) -> RequestSerialized:
|
|
265
|
+
|
|
266
|
+
_host = None
|
|
267
|
+
|
|
268
|
+
_collection_formats: Dict[str, str] = {
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
_path_params: Dict[str, str] = {}
|
|
272
|
+
_query_params: List[Tuple[str, str]] = []
|
|
273
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
274
|
+
_form_params: List[Tuple[str, str]] = []
|
|
275
|
+
_files: Dict[
|
|
276
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
277
|
+
] = {}
|
|
278
|
+
_body_params: Optional[bytes] = None
|
|
279
|
+
|
|
280
|
+
# process the path parameters
|
|
281
|
+
# process the query parameters
|
|
282
|
+
# process the header parameters
|
|
283
|
+
# process the form parameters
|
|
284
|
+
# process the body parameter
|
|
285
|
+
if add_synonyms is not None:
|
|
286
|
+
_body_params = add_synonyms
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
# set the HTTP header `Accept`
|
|
290
|
+
if 'Accept' not in _header_params:
|
|
291
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
292
|
+
[
|
|
293
|
+
'application/json'
|
|
294
|
+
]
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
# set the HTTP header `Content-Type`
|
|
298
|
+
if _content_type:
|
|
299
|
+
_header_params['Content-Type'] = _content_type
|
|
300
|
+
else:
|
|
301
|
+
_default_content_type = (
|
|
302
|
+
self.api_client.select_header_content_type(
|
|
303
|
+
[
|
|
304
|
+
'application/json'
|
|
305
|
+
]
|
|
306
|
+
)
|
|
307
|
+
)
|
|
308
|
+
if _default_content_type is not None:
|
|
309
|
+
_header_params['Content-Type'] = _default_content_type
|
|
310
|
+
|
|
311
|
+
# authentication setting
|
|
312
|
+
_auth_settings: List[str] = [
|
|
313
|
+
'QAnswer-Api-Key',
|
|
314
|
+
'Bearer token'
|
|
315
|
+
]
|
|
316
|
+
|
|
317
|
+
return self.api_client.param_serialize(
|
|
318
|
+
method='POST',
|
|
319
|
+
resource_path='/backend/api/dataset/config/synonyms',
|
|
320
|
+
path_params=_path_params,
|
|
321
|
+
query_params=_query_params,
|
|
322
|
+
header_params=_header_params,
|
|
323
|
+
body=_body_params,
|
|
324
|
+
post_params=_form_params,
|
|
325
|
+
files=_files,
|
|
326
|
+
auth_settings=_auth_settings,
|
|
327
|
+
collection_formats=_collection_formats,
|
|
328
|
+
_host=_host,
|
|
329
|
+
_request_auth=_request_auth
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
@validate_call
|
|
336
|
+
def delete_all_synonyms(
|
|
337
|
+
self,
|
|
338
|
+
delete_synonyms: DeleteSynonyms,
|
|
339
|
+
_request_timeout: Union[
|
|
340
|
+
None,
|
|
341
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
342
|
+
Tuple[
|
|
343
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
344
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
345
|
+
]
|
|
346
|
+
] = None,
|
|
347
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
348
|
+
_content_type: Optional[StrictStr] = None,
|
|
349
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
350
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
351
|
+
) -> DeleteSynonymResp:
|
|
352
|
+
"""Delete All Synonyms
|
|
353
|
+
|
|
354
|
+
Delete all synonyms
|
|
355
|
+
|
|
356
|
+
:param delete_synonyms: (required)
|
|
357
|
+
:type delete_synonyms: DeleteSynonyms
|
|
358
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
359
|
+
number provided, it will be total request
|
|
360
|
+
timeout. It can also be a pair (tuple) of
|
|
361
|
+
(connection, read) timeouts.
|
|
362
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
363
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
364
|
+
request; this effectively ignores the
|
|
365
|
+
authentication in the spec for a single request.
|
|
366
|
+
:type _request_auth: dict, optional
|
|
367
|
+
:param _content_type: force content-type for the request.
|
|
368
|
+
:type _content_type: str, Optional
|
|
369
|
+
:param _headers: set to override the headers for a single
|
|
370
|
+
request; this effectively ignores the headers
|
|
371
|
+
in the spec for a single request.
|
|
372
|
+
:type _headers: dict, optional
|
|
373
|
+
:param _host_index: set to override the host_index for a single
|
|
374
|
+
request; this effectively ignores the host_index
|
|
375
|
+
in the spec for a single request.
|
|
376
|
+
:type _host_index: int, optional
|
|
377
|
+
:return: Returns the result object.
|
|
378
|
+
""" # noqa: E501
|
|
379
|
+
|
|
380
|
+
_param = self._delete_all_synonyms_serialize(
|
|
381
|
+
delete_synonyms=delete_synonyms,
|
|
382
|
+
_request_auth=_request_auth,
|
|
383
|
+
_content_type=_content_type,
|
|
384
|
+
_headers=_headers,
|
|
385
|
+
_host_index=_host_index
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
389
|
+
'200': "DeleteSynonymResp",
|
|
390
|
+
'422': "HTTPValidationError",
|
|
391
|
+
}
|
|
392
|
+
response_data = self.api_client.call_api(
|
|
393
|
+
*_param,
|
|
394
|
+
_request_timeout=_request_timeout
|
|
395
|
+
)
|
|
396
|
+
response_data.read()
|
|
397
|
+
return self.api_client.response_deserialize(
|
|
398
|
+
response_data=response_data,
|
|
399
|
+
response_types_map=_response_types_map,
|
|
400
|
+
).data
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
@validate_call
|
|
404
|
+
def delete_all_synonyms_with_http_info(
|
|
405
|
+
self,
|
|
406
|
+
delete_synonyms: DeleteSynonyms,
|
|
407
|
+
_request_timeout: Union[
|
|
408
|
+
None,
|
|
409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
410
|
+
Tuple[
|
|
411
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
412
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
413
|
+
]
|
|
414
|
+
] = None,
|
|
415
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
416
|
+
_content_type: Optional[StrictStr] = None,
|
|
417
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
418
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
419
|
+
) -> ApiResponse[DeleteSynonymResp]:
|
|
420
|
+
"""Delete All Synonyms
|
|
421
|
+
|
|
422
|
+
Delete all synonyms
|
|
423
|
+
|
|
424
|
+
:param delete_synonyms: (required)
|
|
425
|
+
:type delete_synonyms: DeleteSynonyms
|
|
426
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
427
|
+
number provided, it will be total request
|
|
428
|
+
timeout. It can also be a pair (tuple) of
|
|
429
|
+
(connection, read) timeouts.
|
|
430
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
431
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
432
|
+
request; this effectively ignores the
|
|
433
|
+
authentication in the spec for a single request.
|
|
434
|
+
:type _request_auth: dict, optional
|
|
435
|
+
:param _content_type: force content-type for the request.
|
|
436
|
+
:type _content_type: str, Optional
|
|
437
|
+
:param _headers: set to override the headers for a single
|
|
438
|
+
request; this effectively ignores the headers
|
|
439
|
+
in the spec for a single request.
|
|
440
|
+
:type _headers: dict, optional
|
|
441
|
+
:param _host_index: set to override the host_index for a single
|
|
442
|
+
request; this effectively ignores the host_index
|
|
443
|
+
in the spec for a single request.
|
|
444
|
+
:type _host_index: int, optional
|
|
445
|
+
:return: Returns the result object.
|
|
446
|
+
""" # noqa: E501
|
|
447
|
+
|
|
448
|
+
_param = self._delete_all_synonyms_serialize(
|
|
449
|
+
delete_synonyms=delete_synonyms,
|
|
450
|
+
_request_auth=_request_auth,
|
|
451
|
+
_content_type=_content_type,
|
|
452
|
+
_headers=_headers,
|
|
453
|
+
_host_index=_host_index
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
457
|
+
'200': "DeleteSynonymResp",
|
|
458
|
+
'422': "HTTPValidationError",
|
|
459
|
+
}
|
|
460
|
+
response_data = self.api_client.call_api(
|
|
461
|
+
*_param,
|
|
462
|
+
_request_timeout=_request_timeout
|
|
463
|
+
)
|
|
464
|
+
response_data.read()
|
|
465
|
+
return self.api_client.response_deserialize(
|
|
466
|
+
response_data=response_data,
|
|
467
|
+
response_types_map=_response_types_map,
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
@validate_call
|
|
472
|
+
def delete_all_synonyms_without_preload_content(
|
|
473
|
+
self,
|
|
474
|
+
delete_synonyms: DeleteSynonyms,
|
|
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
|
+
"""Delete All Synonyms
|
|
489
|
+
|
|
490
|
+
Delete all synonyms
|
|
491
|
+
|
|
492
|
+
:param delete_synonyms: (required)
|
|
493
|
+
:type delete_synonyms: DeleteSynonyms
|
|
494
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
495
|
+
number provided, it will be total request
|
|
496
|
+
timeout. It can also be a pair (tuple) of
|
|
497
|
+
(connection, read) timeouts.
|
|
498
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
499
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
500
|
+
request; this effectively ignores the
|
|
501
|
+
authentication in the spec for a single request.
|
|
502
|
+
:type _request_auth: dict, optional
|
|
503
|
+
:param _content_type: force content-type for the request.
|
|
504
|
+
:type _content_type: str, Optional
|
|
505
|
+
:param _headers: set to override the headers for a single
|
|
506
|
+
request; this effectively ignores the headers
|
|
507
|
+
in the spec for a single request.
|
|
508
|
+
:type _headers: dict, optional
|
|
509
|
+
:param _host_index: set to override the host_index for a single
|
|
510
|
+
request; this effectively ignores the host_index
|
|
511
|
+
in the spec for a single request.
|
|
512
|
+
:type _host_index: int, optional
|
|
513
|
+
:return: Returns the result object.
|
|
514
|
+
""" # noqa: E501
|
|
515
|
+
|
|
516
|
+
_param = self._delete_all_synonyms_serialize(
|
|
517
|
+
delete_synonyms=delete_synonyms,
|
|
518
|
+
_request_auth=_request_auth,
|
|
519
|
+
_content_type=_content_type,
|
|
520
|
+
_headers=_headers,
|
|
521
|
+
_host_index=_host_index
|
|
522
|
+
)
|
|
523
|
+
|
|
524
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
525
|
+
'200': "DeleteSynonymResp",
|
|
526
|
+
'422': "HTTPValidationError",
|
|
527
|
+
}
|
|
528
|
+
response_data = self.api_client.call_api(
|
|
529
|
+
*_param,
|
|
530
|
+
_request_timeout=_request_timeout
|
|
531
|
+
)
|
|
532
|
+
return response_data.response
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
def _delete_all_synonyms_serialize(
|
|
536
|
+
self,
|
|
537
|
+
delete_synonyms,
|
|
538
|
+
_request_auth,
|
|
539
|
+
_content_type,
|
|
540
|
+
_headers,
|
|
541
|
+
_host_index,
|
|
542
|
+
) -> RequestSerialized:
|
|
543
|
+
|
|
544
|
+
_host = None
|
|
545
|
+
|
|
546
|
+
_collection_formats: Dict[str, str] = {
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
_path_params: Dict[str, str] = {}
|
|
550
|
+
_query_params: List[Tuple[str, str]] = []
|
|
551
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
552
|
+
_form_params: List[Tuple[str, str]] = []
|
|
553
|
+
_files: Dict[
|
|
554
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
555
|
+
] = {}
|
|
556
|
+
_body_params: Optional[bytes] = None
|
|
557
|
+
|
|
558
|
+
# process the path parameters
|
|
559
|
+
# process the query parameters
|
|
560
|
+
# process the header parameters
|
|
561
|
+
# process the form parameters
|
|
562
|
+
# process the body parameter
|
|
563
|
+
if delete_synonyms is not None:
|
|
564
|
+
_body_params = delete_synonyms
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
# set the HTTP header `Accept`
|
|
568
|
+
if 'Accept' not in _header_params:
|
|
569
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
570
|
+
[
|
|
571
|
+
'application/json'
|
|
572
|
+
]
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
# set the HTTP header `Content-Type`
|
|
576
|
+
if _content_type:
|
|
577
|
+
_header_params['Content-Type'] = _content_type
|
|
578
|
+
else:
|
|
579
|
+
_default_content_type = (
|
|
580
|
+
self.api_client.select_header_content_type(
|
|
581
|
+
[
|
|
582
|
+
'application/json'
|
|
583
|
+
]
|
|
584
|
+
)
|
|
585
|
+
)
|
|
586
|
+
if _default_content_type is not None:
|
|
587
|
+
_header_params['Content-Type'] = _default_content_type
|
|
588
|
+
|
|
589
|
+
# authentication setting
|
|
590
|
+
_auth_settings: List[str] = [
|
|
591
|
+
'QAnswer-Api-Key',
|
|
592
|
+
'Bearer token'
|
|
593
|
+
]
|
|
594
|
+
|
|
595
|
+
return self.api_client.param_serialize(
|
|
596
|
+
method='POST',
|
|
597
|
+
resource_path='/backend/api/dataset/config/synonyms/delete-all',
|
|
598
|
+
path_params=_path_params,
|
|
599
|
+
query_params=_query_params,
|
|
600
|
+
header_params=_header_params,
|
|
601
|
+
body=_body_params,
|
|
602
|
+
post_params=_form_params,
|
|
603
|
+
files=_files,
|
|
604
|
+
auth_settings=_auth_settings,
|
|
605
|
+
collection_formats=_collection_formats,
|
|
606
|
+
_host=_host,
|
|
607
|
+
_request_auth=_request_auth
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
@validate_call
|
|
614
|
+
def delete_index(
|
|
615
|
+
self,
|
|
616
|
+
delete_index: DeleteIndex,
|
|
617
|
+
_request_timeout: Union[
|
|
618
|
+
None,
|
|
619
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
620
|
+
Tuple[
|
|
621
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
622
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
623
|
+
]
|
|
624
|
+
] = None,
|
|
625
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
626
|
+
_content_type: Optional[StrictStr] = None,
|
|
627
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
628
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
629
|
+
) -> DeleteIndexResp:
|
|
630
|
+
"""Delete Index
|
|
631
|
+
|
|
632
|
+
Delete Synonyms index
|
|
633
|
+
|
|
634
|
+
:param delete_index: (required)
|
|
635
|
+
:type delete_index: DeleteIndex
|
|
636
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
637
|
+
number provided, it will be total request
|
|
638
|
+
timeout. It can also be a pair (tuple) of
|
|
639
|
+
(connection, read) timeouts.
|
|
640
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
641
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
642
|
+
request; this effectively ignores the
|
|
643
|
+
authentication in the spec for a single request.
|
|
644
|
+
:type _request_auth: dict, optional
|
|
645
|
+
:param _content_type: force content-type for the request.
|
|
646
|
+
:type _content_type: str, Optional
|
|
647
|
+
:param _headers: set to override the headers for a single
|
|
648
|
+
request; this effectively ignores the headers
|
|
649
|
+
in the spec for a single request.
|
|
650
|
+
:type _headers: dict, optional
|
|
651
|
+
:param _host_index: set to override the host_index for a single
|
|
652
|
+
request; this effectively ignores the host_index
|
|
653
|
+
in the spec for a single request.
|
|
654
|
+
:type _host_index: int, optional
|
|
655
|
+
:return: Returns the result object.
|
|
656
|
+
""" # noqa: E501
|
|
657
|
+
|
|
658
|
+
_param = self._delete_index_serialize(
|
|
659
|
+
delete_index=delete_index,
|
|
660
|
+
_request_auth=_request_auth,
|
|
661
|
+
_content_type=_content_type,
|
|
662
|
+
_headers=_headers,
|
|
663
|
+
_host_index=_host_index
|
|
664
|
+
)
|
|
665
|
+
|
|
666
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
667
|
+
'200': "DeleteIndexResp",
|
|
668
|
+
'422': "HTTPValidationError",
|
|
669
|
+
}
|
|
670
|
+
response_data = self.api_client.call_api(
|
|
671
|
+
*_param,
|
|
672
|
+
_request_timeout=_request_timeout
|
|
673
|
+
)
|
|
674
|
+
response_data.read()
|
|
675
|
+
return self.api_client.response_deserialize(
|
|
676
|
+
response_data=response_data,
|
|
677
|
+
response_types_map=_response_types_map,
|
|
678
|
+
).data
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
@validate_call
|
|
682
|
+
def delete_index_with_http_info(
|
|
683
|
+
self,
|
|
684
|
+
delete_index: DeleteIndex,
|
|
685
|
+
_request_timeout: Union[
|
|
686
|
+
None,
|
|
687
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
688
|
+
Tuple[
|
|
689
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
690
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
691
|
+
]
|
|
692
|
+
] = None,
|
|
693
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
694
|
+
_content_type: Optional[StrictStr] = None,
|
|
695
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
696
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
697
|
+
) -> ApiResponse[DeleteIndexResp]:
|
|
698
|
+
"""Delete Index
|
|
699
|
+
|
|
700
|
+
Delete Synonyms index
|
|
701
|
+
|
|
702
|
+
:param delete_index: (required)
|
|
703
|
+
:type delete_index: DeleteIndex
|
|
704
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
705
|
+
number provided, it will be total request
|
|
706
|
+
timeout. It can also be a pair (tuple) of
|
|
707
|
+
(connection, read) timeouts.
|
|
708
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
709
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
710
|
+
request; this effectively ignores the
|
|
711
|
+
authentication in the spec for a single request.
|
|
712
|
+
:type _request_auth: dict, optional
|
|
713
|
+
:param _content_type: force content-type for the request.
|
|
714
|
+
:type _content_type: str, Optional
|
|
715
|
+
:param _headers: set to override the headers for a single
|
|
716
|
+
request; this effectively ignores the headers
|
|
717
|
+
in the spec for a single request.
|
|
718
|
+
:type _headers: dict, optional
|
|
719
|
+
:param _host_index: set to override the host_index for a single
|
|
720
|
+
request; this effectively ignores the host_index
|
|
721
|
+
in the spec for a single request.
|
|
722
|
+
:type _host_index: int, optional
|
|
723
|
+
:return: Returns the result object.
|
|
724
|
+
""" # noqa: E501
|
|
725
|
+
|
|
726
|
+
_param = self._delete_index_serialize(
|
|
727
|
+
delete_index=delete_index,
|
|
728
|
+
_request_auth=_request_auth,
|
|
729
|
+
_content_type=_content_type,
|
|
730
|
+
_headers=_headers,
|
|
731
|
+
_host_index=_host_index
|
|
732
|
+
)
|
|
733
|
+
|
|
734
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
735
|
+
'200': "DeleteIndexResp",
|
|
736
|
+
'422': "HTTPValidationError",
|
|
737
|
+
}
|
|
738
|
+
response_data = self.api_client.call_api(
|
|
739
|
+
*_param,
|
|
740
|
+
_request_timeout=_request_timeout
|
|
741
|
+
)
|
|
742
|
+
response_data.read()
|
|
743
|
+
return self.api_client.response_deserialize(
|
|
744
|
+
response_data=response_data,
|
|
745
|
+
response_types_map=_response_types_map,
|
|
746
|
+
)
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
@validate_call
|
|
750
|
+
def delete_index_without_preload_content(
|
|
751
|
+
self,
|
|
752
|
+
delete_index: DeleteIndex,
|
|
753
|
+
_request_timeout: Union[
|
|
754
|
+
None,
|
|
755
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
756
|
+
Tuple[
|
|
757
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
758
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
759
|
+
]
|
|
760
|
+
] = None,
|
|
761
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
762
|
+
_content_type: Optional[StrictStr] = None,
|
|
763
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
764
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
765
|
+
) -> RESTResponseType:
|
|
766
|
+
"""Delete Index
|
|
767
|
+
|
|
768
|
+
Delete Synonyms index
|
|
769
|
+
|
|
770
|
+
:param delete_index: (required)
|
|
771
|
+
:type delete_index: DeleteIndex
|
|
772
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
773
|
+
number provided, it will be total request
|
|
774
|
+
timeout. It can also be a pair (tuple) of
|
|
775
|
+
(connection, read) timeouts.
|
|
776
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
777
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
778
|
+
request; this effectively ignores the
|
|
779
|
+
authentication in the spec for a single request.
|
|
780
|
+
:type _request_auth: dict, optional
|
|
781
|
+
:param _content_type: force content-type for the request.
|
|
782
|
+
:type _content_type: str, Optional
|
|
783
|
+
:param _headers: set to override the headers for a single
|
|
784
|
+
request; this effectively ignores the headers
|
|
785
|
+
in the spec for a single request.
|
|
786
|
+
:type _headers: dict, optional
|
|
787
|
+
:param _host_index: set to override the host_index for a single
|
|
788
|
+
request; this effectively ignores the host_index
|
|
789
|
+
in the spec for a single request.
|
|
790
|
+
:type _host_index: int, optional
|
|
791
|
+
:return: Returns the result object.
|
|
792
|
+
""" # noqa: E501
|
|
793
|
+
|
|
794
|
+
_param = self._delete_index_serialize(
|
|
795
|
+
delete_index=delete_index,
|
|
796
|
+
_request_auth=_request_auth,
|
|
797
|
+
_content_type=_content_type,
|
|
798
|
+
_headers=_headers,
|
|
799
|
+
_host_index=_host_index
|
|
800
|
+
)
|
|
801
|
+
|
|
802
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
803
|
+
'200': "DeleteIndexResp",
|
|
804
|
+
'422': "HTTPValidationError",
|
|
805
|
+
}
|
|
806
|
+
response_data = self.api_client.call_api(
|
|
807
|
+
*_param,
|
|
808
|
+
_request_timeout=_request_timeout
|
|
809
|
+
)
|
|
810
|
+
return response_data.response
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
def _delete_index_serialize(
|
|
814
|
+
self,
|
|
815
|
+
delete_index,
|
|
816
|
+
_request_auth,
|
|
817
|
+
_content_type,
|
|
818
|
+
_headers,
|
|
819
|
+
_host_index,
|
|
820
|
+
) -> RequestSerialized:
|
|
821
|
+
|
|
822
|
+
_host = None
|
|
823
|
+
|
|
824
|
+
_collection_formats: Dict[str, str] = {
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
_path_params: Dict[str, str] = {}
|
|
828
|
+
_query_params: List[Tuple[str, str]] = []
|
|
829
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
830
|
+
_form_params: List[Tuple[str, str]] = []
|
|
831
|
+
_files: Dict[
|
|
832
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
833
|
+
] = {}
|
|
834
|
+
_body_params: Optional[bytes] = None
|
|
835
|
+
|
|
836
|
+
# process the path parameters
|
|
837
|
+
# process the query parameters
|
|
838
|
+
# process the header parameters
|
|
839
|
+
# process the form parameters
|
|
840
|
+
# process the body parameter
|
|
841
|
+
if delete_index is not None:
|
|
842
|
+
_body_params = delete_index
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
# set the HTTP header `Accept`
|
|
846
|
+
if 'Accept' not in _header_params:
|
|
847
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
848
|
+
[
|
|
849
|
+
'application/json'
|
|
850
|
+
]
|
|
851
|
+
)
|
|
852
|
+
|
|
853
|
+
# set the HTTP header `Content-Type`
|
|
854
|
+
if _content_type:
|
|
855
|
+
_header_params['Content-Type'] = _content_type
|
|
856
|
+
else:
|
|
857
|
+
_default_content_type = (
|
|
858
|
+
self.api_client.select_header_content_type(
|
|
859
|
+
[
|
|
860
|
+
'application/json'
|
|
861
|
+
]
|
|
862
|
+
)
|
|
863
|
+
)
|
|
864
|
+
if _default_content_type is not None:
|
|
865
|
+
_header_params['Content-Type'] = _default_content_type
|
|
866
|
+
|
|
867
|
+
# authentication setting
|
|
868
|
+
_auth_settings: List[str] = [
|
|
869
|
+
'QAnswer-Api-Key',
|
|
870
|
+
'Bearer token'
|
|
871
|
+
]
|
|
872
|
+
|
|
873
|
+
return self.api_client.param_serialize(
|
|
874
|
+
method='POST',
|
|
875
|
+
resource_path='/backend/api/dataset/config/synonyms/delete-index',
|
|
876
|
+
path_params=_path_params,
|
|
877
|
+
query_params=_query_params,
|
|
878
|
+
header_params=_header_params,
|
|
879
|
+
body=_body_params,
|
|
880
|
+
post_params=_form_params,
|
|
881
|
+
files=_files,
|
|
882
|
+
auth_settings=_auth_settings,
|
|
883
|
+
collection_formats=_collection_formats,
|
|
884
|
+
_host=_host,
|
|
885
|
+
_request_auth=_request_auth
|
|
886
|
+
)
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
@validate_call
|
|
892
|
+
def delete_synonyms_compat(
|
|
893
|
+
self,
|
|
894
|
+
delete_synonym: DeleteSynonym,
|
|
895
|
+
_request_timeout: Union[
|
|
896
|
+
None,
|
|
897
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
898
|
+
Tuple[
|
|
899
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
900
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
901
|
+
]
|
|
902
|
+
] = None,
|
|
903
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
904
|
+
_content_type: Optional[StrictStr] = None,
|
|
905
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
906
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
907
|
+
) -> DeleteSynonymResp:
|
|
908
|
+
"""Delete Synonyms Compat
|
|
909
|
+
|
|
910
|
+
Delete synonyms specified for a dataset (Java compat path)
|
|
911
|
+
|
|
912
|
+
:param delete_synonym: (required)
|
|
913
|
+
:type delete_synonym: DeleteSynonym
|
|
914
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
915
|
+
number provided, it will be total request
|
|
916
|
+
timeout. It can also be a pair (tuple) of
|
|
917
|
+
(connection, read) timeouts.
|
|
918
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
919
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
920
|
+
request; this effectively ignores the
|
|
921
|
+
authentication in the spec for a single request.
|
|
922
|
+
:type _request_auth: dict, optional
|
|
923
|
+
:param _content_type: force content-type for the request.
|
|
924
|
+
:type _content_type: str, Optional
|
|
925
|
+
:param _headers: set to override the headers for a single
|
|
926
|
+
request; this effectively ignores the headers
|
|
927
|
+
in the spec for a single request.
|
|
928
|
+
:type _headers: dict, optional
|
|
929
|
+
:param _host_index: set to override the host_index for a single
|
|
930
|
+
request; this effectively ignores the host_index
|
|
931
|
+
in the spec for a single request.
|
|
932
|
+
:type _host_index: int, optional
|
|
933
|
+
:return: Returns the result object.
|
|
934
|
+
""" # noqa: E501
|
|
935
|
+
|
|
936
|
+
_param = self._delete_synonyms_compat_serialize(
|
|
937
|
+
delete_synonym=delete_synonym,
|
|
938
|
+
_request_auth=_request_auth,
|
|
939
|
+
_content_type=_content_type,
|
|
940
|
+
_headers=_headers,
|
|
941
|
+
_host_index=_host_index
|
|
942
|
+
)
|
|
943
|
+
|
|
944
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
945
|
+
'200': "DeleteSynonymResp",
|
|
946
|
+
'422': "HTTPValidationError",
|
|
947
|
+
}
|
|
948
|
+
response_data = self.api_client.call_api(
|
|
949
|
+
*_param,
|
|
950
|
+
_request_timeout=_request_timeout
|
|
951
|
+
)
|
|
952
|
+
response_data.read()
|
|
953
|
+
return self.api_client.response_deserialize(
|
|
954
|
+
response_data=response_data,
|
|
955
|
+
response_types_map=_response_types_map,
|
|
956
|
+
).data
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
@validate_call
|
|
960
|
+
def delete_synonyms_compat_with_http_info(
|
|
961
|
+
self,
|
|
962
|
+
delete_synonym: DeleteSynonym,
|
|
963
|
+
_request_timeout: Union[
|
|
964
|
+
None,
|
|
965
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
966
|
+
Tuple[
|
|
967
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
968
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
969
|
+
]
|
|
970
|
+
] = None,
|
|
971
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
972
|
+
_content_type: Optional[StrictStr] = None,
|
|
973
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
974
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
975
|
+
) -> ApiResponse[DeleteSynonymResp]:
|
|
976
|
+
"""Delete Synonyms Compat
|
|
977
|
+
|
|
978
|
+
Delete synonyms specified for a dataset (Java compat path)
|
|
979
|
+
|
|
980
|
+
:param delete_synonym: (required)
|
|
981
|
+
:type delete_synonym: DeleteSynonym
|
|
982
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
983
|
+
number provided, it will be total request
|
|
984
|
+
timeout. It can also be a pair (tuple) of
|
|
985
|
+
(connection, read) timeouts.
|
|
986
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
987
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
988
|
+
request; this effectively ignores the
|
|
989
|
+
authentication in the spec for a single request.
|
|
990
|
+
:type _request_auth: dict, optional
|
|
991
|
+
:param _content_type: force content-type for the request.
|
|
992
|
+
:type _content_type: str, Optional
|
|
993
|
+
:param _headers: set to override the headers for a single
|
|
994
|
+
request; this effectively ignores the headers
|
|
995
|
+
in the spec for a single request.
|
|
996
|
+
:type _headers: dict, optional
|
|
997
|
+
:param _host_index: set to override the host_index for a single
|
|
998
|
+
request; this effectively ignores the host_index
|
|
999
|
+
in the spec for a single request.
|
|
1000
|
+
:type _host_index: int, optional
|
|
1001
|
+
:return: Returns the result object.
|
|
1002
|
+
""" # noqa: E501
|
|
1003
|
+
|
|
1004
|
+
_param = self._delete_synonyms_compat_serialize(
|
|
1005
|
+
delete_synonym=delete_synonym,
|
|
1006
|
+
_request_auth=_request_auth,
|
|
1007
|
+
_content_type=_content_type,
|
|
1008
|
+
_headers=_headers,
|
|
1009
|
+
_host_index=_host_index
|
|
1010
|
+
)
|
|
1011
|
+
|
|
1012
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1013
|
+
'200': "DeleteSynonymResp",
|
|
1014
|
+
'422': "HTTPValidationError",
|
|
1015
|
+
}
|
|
1016
|
+
response_data = self.api_client.call_api(
|
|
1017
|
+
*_param,
|
|
1018
|
+
_request_timeout=_request_timeout
|
|
1019
|
+
)
|
|
1020
|
+
response_data.read()
|
|
1021
|
+
return self.api_client.response_deserialize(
|
|
1022
|
+
response_data=response_data,
|
|
1023
|
+
response_types_map=_response_types_map,
|
|
1024
|
+
)
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
@validate_call
|
|
1028
|
+
def delete_synonyms_compat_without_preload_content(
|
|
1029
|
+
self,
|
|
1030
|
+
delete_synonym: DeleteSynonym,
|
|
1031
|
+
_request_timeout: Union[
|
|
1032
|
+
None,
|
|
1033
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1034
|
+
Tuple[
|
|
1035
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1036
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1037
|
+
]
|
|
1038
|
+
] = None,
|
|
1039
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1040
|
+
_content_type: Optional[StrictStr] = None,
|
|
1041
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1042
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1043
|
+
) -> RESTResponseType:
|
|
1044
|
+
"""Delete Synonyms Compat
|
|
1045
|
+
|
|
1046
|
+
Delete synonyms specified for a dataset (Java compat path)
|
|
1047
|
+
|
|
1048
|
+
:param delete_synonym: (required)
|
|
1049
|
+
:type delete_synonym: DeleteSynonym
|
|
1050
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1051
|
+
number provided, it will be total request
|
|
1052
|
+
timeout. It can also be a pair (tuple) of
|
|
1053
|
+
(connection, read) timeouts.
|
|
1054
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1055
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1056
|
+
request; this effectively ignores the
|
|
1057
|
+
authentication in the spec for a single request.
|
|
1058
|
+
:type _request_auth: dict, optional
|
|
1059
|
+
:param _content_type: force content-type for the request.
|
|
1060
|
+
:type _content_type: str, Optional
|
|
1061
|
+
:param _headers: set to override the headers for a single
|
|
1062
|
+
request; this effectively ignores the headers
|
|
1063
|
+
in the spec for a single request.
|
|
1064
|
+
:type _headers: dict, optional
|
|
1065
|
+
:param _host_index: set to override the host_index for a single
|
|
1066
|
+
request; this effectively ignores the host_index
|
|
1067
|
+
in the spec for a single request.
|
|
1068
|
+
:type _host_index: int, optional
|
|
1069
|
+
:return: Returns the result object.
|
|
1070
|
+
""" # noqa: E501
|
|
1071
|
+
|
|
1072
|
+
_param = self._delete_synonyms_compat_serialize(
|
|
1073
|
+
delete_synonym=delete_synonym,
|
|
1074
|
+
_request_auth=_request_auth,
|
|
1075
|
+
_content_type=_content_type,
|
|
1076
|
+
_headers=_headers,
|
|
1077
|
+
_host_index=_host_index
|
|
1078
|
+
)
|
|
1079
|
+
|
|
1080
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1081
|
+
'200': "DeleteSynonymResp",
|
|
1082
|
+
'422': "HTTPValidationError",
|
|
1083
|
+
}
|
|
1084
|
+
response_data = self.api_client.call_api(
|
|
1085
|
+
*_param,
|
|
1086
|
+
_request_timeout=_request_timeout
|
|
1087
|
+
)
|
|
1088
|
+
return response_data.response
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
def _delete_synonyms_compat_serialize(
|
|
1092
|
+
self,
|
|
1093
|
+
delete_synonym,
|
|
1094
|
+
_request_auth,
|
|
1095
|
+
_content_type,
|
|
1096
|
+
_headers,
|
|
1097
|
+
_host_index,
|
|
1098
|
+
) -> RequestSerialized:
|
|
1099
|
+
|
|
1100
|
+
_host = None
|
|
1101
|
+
|
|
1102
|
+
_collection_formats: Dict[str, str] = {
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
_path_params: Dict[str, str] = {}
|
|
1106
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1107
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1108
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1109
|
+
_files: Dict[
|
|
1110
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1111
|
+
] = {}
|
|
1112
|
+
_body_params: Optional[bytes] = None
|
|
1113
|
+
|
|
1114
|
+
# process the path parameters
|
|
1115
|
+
# process the query parameters
|
|
1116
|
+
# process the header parameters
|
|
1117
|
+
# process the form parameters
|
|
1118
|
+
# process the body parameter
|
|
1119
|
+
if delete_synonym is not None:
|
|
1120
|
+
_body_params = delete_synonym
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
# set the HTTP header `Accept`
|
|
1124
|
+
if 'Accept' not in _header_params:
|
|
1125
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1126
|
+
[
|
|
1127
|
+
'application/json'
|
|
1128
|
+
]
|
|
1129
|
+
)
|
|
1130
|
+
|
|
1131
|
+
# set the HTTP header `Content-Type`
|
|
1132
|
+
if _content_type:
|
|
1133
|
+
_header_params['Content-Type'] = _content_type
|
|
1134
|
+
else:
|
|
1135
|
+
_default_content_type = (
|
|
1136
|
+
self.api_client.select_header_content_type(
|
|
1137
|
+
[
|
|
1138
|
+
'application/json'
|
|
1139
|
+
]
|
|
1140
|
+
)
|
|
1141
|
+
)
|
|
1142
|
+
if _default_content_type is not None:
|
|
1143
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1144
|
+
|
|
1145
|
+
# authentication setting
|
|
1146
|
+
_auth_settings: List[str] = [
|
|
1147
|
+
'QAnswer-Api-Key',
|
|
1148
|
+
'Bearer token'
|
|
1149
|
+
]
|
|
1150
|
+
|
|
1151
|
+
return self.api_client.param_serialize(
|
|
1152
|
+
method='DELETE',
|
|
1153
|
+
resource_path='/backend/api/dataset/config/synonyms',
|
|
1154
|
+
path_params=_path_params,
|
|
1155
|
+
query_params=_query_params,
|
|
1156
|
+
header_params=_header_params,
|
|
1157
|
+
body=_body_params,
|
|
1158
|
+
post_params=_form_params,
|
|
1159
|
+
files=_files,
|
|
1160
|
+
auth_settings=_auth_settings,
|
|
1161
|
+
collection_formats=_collection_formats,
|
|
1162
|
+
_host=_host,
|
|
1163
|
+
_request_auth=_request_auth
|
|
1164
|
+
)
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
@validate_call
|
|
1170
|
+
def export_dataset_configuration(
|
|
1171
|
+
self,
|
|
1172
|
+
username: Annotated[StrictStr, Field(description="Username")],
|
|
1173
|
+
dataset: Annotated[StrictStr, Field(description="Dataset")],
|
|
1174
|
+
format: Annotated[Optional[StrictStr], Field(description="Output format for the configuration")] = None,
|
|
1175
|
+
include_files: Annotated[Optional[StrictBool], Field(description="If true, also package dataset files with connector-hashed folders")] = None,
|
|
1176
|
+
_request_timeout: Union[
|
|
1177
|
+
None,
|
|
1178
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1179
|
+
Tuple[
|
|
1180
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1181
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1182
|
+
]
|
|
1183
|
+
] = None,
|
|
1184
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1185
|
+
_content_type: Optional[StrictStr] = None,
|
|
1186
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1187
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1188
|
+
) -> None:
|
|
1189
|
+
"""Export Dataset Configuration
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
:param username: Username (required)
|
|
1193
|
+
:type username: str
|
|
1194
|
+
:param dataset: Dataset (required)
|
|
1195
|
+
:type dataset: str
|
|
1196
|
+
:param format: Output format for the configuration
|
|
1197
|
+
:type format: str
|
|
1198
|
+
:param include_files: If true, also package dataset files with connector-hashed folders
|
|
1199
|
+
:type include_files: bool
|
|
1200
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1201
|
+
number provided, it will be total request
|
|
1202
|
+
timeout. It can also be a pair (tuple) of
|
|
1203
|
+
(connection, read) timeouts.
|
|
1204
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1205
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1206
|
+
request; this effectively ignores the
|
|
1207
|
+
authentication in the spec for a single request.
|
|
1208
|
+
:type _request_auth: dict, optional
|
|
1209
|
+
:param _content_type: force content-type for the request.
|
|
1210
|
+
:type _content_type: str, Optional
|
|
1211
|
+
:param _headers: set to override the headers for a single
|
|
1212
|
+
request; this effectively ignores the headers
|
|
1213
|
+
in the spec for a single request.
|
|
1214
|
+
:type _headers: dict, optional
|
|
1215
|
+
:param _host_index: set to override the host_index for a single
|
|
1216
|
+
request; this effectively ignores the host_index
|
|
1217
|
+
in the spec for a single request.
|
|
1218
|
+
:type _host_index: int, optional
|
|
1219
|
+
:return: Returns the result object.
|
|
1220
|
+
""" # noqa: E501
|
|
1221
|
+
|
|
1222
|
+
_param = self._export_dataset_configuration_serialize(
|
|
1223
|
+
username=username,
|
|
1224
|
+
dataset=dataset,
|
|
1225
|
+
format=format,
|
|
1226
|
+
include_files=include_files,
|
|
1227
|
+
_request_auth=_request_auth,
|
|
1228
|
+
_content_type=_content_type,
|
|
1229
|
+
_headers=_headers,
|
|
1230
|
+
_host_index=_host_index
|
|
1231
|
+
)
|
|
1232
|
+
|
|
1233
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1234
|
+
'200': None,
|
|
1235
|
+
'404': None,
|
|
1236
|
+
'422': "HTTPValidationError",
|
|
1237
|
+
}
|
|
1238
|
+
response_data = self.api_client.call_api(
|
|
1239
|
+
*_param,
|
|
1240
|
+
_request_timeout=_request_timeout
|
|
1241
|
+
)
|
|
1242
|
+
response_data.read()
|
|
1243
|
+
return self.api_client.response_deserialize(
|
|
1244
|
+
response_data=response_data,
|
|
1245
|
+
response_types_map=_response_types_map,
|
|
1246
|
+
).data
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
@validate_call
|
|
1250
|
+
def export_dataset_configuration_with_http_info(
|
|
1251
|
+
self,
|
|
1252
|
+
username: Annotated[StrictStr, Field(description="Username")],
|
|
1253
|
+
dataset: Annotated[StrictStr, Field(description="Dataset")],
|
|
1254
|
+
format: Annotated[Optional[StrictStr], Field(description="Output format for the configuration")] = None,
|
|
1255
|
+
include_files: Annotated[Optional[StrictBool], Field(description="If true, also package dataset files with connector-hashed folders")] = None,
|
|
1256
|
+
_request_timeout: Union[
|
|
1257
|
+
None,
|
|
1258
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1259
|
+
Tuple[
|
|
1260
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1261
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1262
|
+
]
|
|
1263
|
+
] = None,
|
|
1264
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1265
|
+
_content_type: Optional[StrictStr] = None,
|
|
1266
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1267
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1268
|
+
) -> ApiResponse[None]:
|
|
1269
|
+
"""Export Dataset Configuration
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
:param username: Username (required)
|
|
1273
|
+
:type username: str
|
|
1274
|
+
:param dataset: Dataset (required)
|
|
1275
|
+
:type dataset: str
|
|
1276
|
+
:param format: Output format for the configuration
|
|
1277
|
+
:type format: str
|
|
1278
|
+
:param include_files: If true, also package dataset files with connector-hashed folders
|
|
1279
|
+
:type include_files: bool
|
|
1280
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1281
|
+
number provided, it will be total request
|
|
1282
|
+
timeout. It can also be a pair (tuple) of
|
|
1283
|
+
(connection, read) timeouts.
|
|
1284
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1285
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1286
|
+
request; this effectively ignores the
|
|
1287
|
+
authentication in the spec for a single request.
|
|
1288
|
+
:type _request_auth: dict, optional
|
|
1289
|
+
:param _content_type: force content-type for the request.
|
|
1290
|
+
:type _content_type: str, Optional
|
|
1291
|
+
:param _headers: set to override the headers for a single
|
|
1292
|
+
request; this effectively ignores the headers
|
|
1293
|
+
in the spec for a single request.
|
|
1294
|
+
:type _headers: dict, optional
|
|
1295
|
+
:param _host_index: set to override the host_index for a single
|
|
1296
|
+
request; this effectively ignores the host_index
|
|
1297
|
+
in the spec for a single request.
|
|
1298
|
+
:type _host_index: int, optional
|
|
1299
|
+
:return: Returns the result object.
|
|
1300
|
+
""" # noqa: E501
|
|
1301
|
+
|
|
1302
|
+
_param = self._export_dataset_configuration_serialize(
|
|
1303
|
+
username=username,
|
|
1304
|
+
dataset=dataset,
|
|
1305
|
+
format=format,
|
|
1306
|
+
include_files=include_files,
|
|
1307
|
+
_request_auth=_request_auth,
|
|
1308
|
+
_content_type=_content_type,
|
|
1309
|
+
_headers=_headers,
|
|
1310
|
+
_host_index=_host_index
|
|
1311
|
+
)
|
|
1312
|
+
|
|
1313
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1314
|
+
'200': None,
|
|
1315
|
+
'404': None,
|
|
1316
|
+
'422': "HTTPValidationError",
|
|
1317
|
+
}
|
|
1318
|
+
response_data = self.api_client.call_api(
|
|
1319
|
+
*_param,
|
|
1320
|
+
_request_timeout=_request_timeout
|
|
1321
|
+
)
|
|
1322
|
+
response_data.read()
|
|
1323
|
+
return self.api_client.response_deserialize(
|
|
1324
|
+
response_data=response_data,
|
|
1325
|
+
response_types_map=_response_types_map,
|
|
1326
|
+
)
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
@validate_call
|
|
1330
|
+
def export_dataset_configuration_without_preload_content(
|
|
1331
|
+
self,
|
|
1332
|
+
username: Annotated[StrictStr, Field(description="Username")],
|
|
1333
|
+
dataset: Annotated[StrictStr, Field(description="Dataset")],
|
|
1334
|
+
format: Annotated[Optional[StrictStr], Field(description="Output format for the configuration")] = None,
|
|
1335
|
+
include_files: Annotated[Optional[StrictBool], Field(description="If true, also package dataset files with connector-hashed folders")] = None,
|
|
1336
|
+
_request_timeout: Union[
|
|
1337
|
+
None,
|
|
1338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1339
|
+
Tuple[
|
|
1340
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1341
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1342
|
+
]
|
|
1343
|
+
] = None,
|
|
1344
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1345
|
+
_content_type: Optional[StrictStr] = None,
|
|
1346
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1347
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1348
|
+
) -> RESTResponseType:
|
|
1349
|
+
"""Export Dataset Configuration
|
|
1350
|
+
|
|
1351
|
+
|
|
1352
|
+
:param username: Username (required)
|
|
1353
|
+
:type username: str
|
|
1354
|
+
:param dataset: Dataset (required)
|
|
1355
|
+
:type dataset: str
|
|
1356
|
+
:param format: Output format for the configuration
|
|
1357
|
+
:type format: str
|
|
1358
|
+
:param include_files: If true, also package dataset files with connector-hashed folders
|
|
1359
|
+
:type include_files: bool
|
|
1360
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1361
|
+
number provided, it will be total request
|
|
1362
|
+
timeout. It can also be a pair (tuple) of
|
|
1363
|
+
(connection, read) timeouts.
|
|
1364
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1365
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1366
|
+
request; this effectively ignores the
|
|
1367
|
+
authentication in the spec for a single request.
|
|
1368
|
+
:type _request_auth: dict, optional
|
|
1369
|
+
:param _content_type: force content-type for the request.
|
|
1370
|
+
:type _content_type: str, Optional
|
|
1371
|
+
:param _headers: set to override the headers for a single
|
|
1372
|
+
request; this effectively ignores the headers
|
|
1373
|
+
in the spec for a single request.
|
|
1374
|
+
:type _headers: dict, optional
|
|
1375
|
+
:param _host_index: set to override the host_index for a single
|
|
1376
|
+
request; this effectively ignores the host_index
|
|
1377
|
+
in the spec for a single request.
|
|
1378
|
+
:type _host_index: int, optional
|
|
1379
|
+
:return: Returns the result object.
|
|
1380
|
+
""" # noqa: E501
|
|
1381
|
+
|
|
1382
|
+
_param = self._export_dataset_configuration_serialize(
|
|
1383
|
+
username=username,
|
|
1384
|
+
dataset=dataset,
|
|
1385
|
+
format=format,
|
|
1386
|
+
include_files=include_files,
|
|
1387
|
+
_request_auth=_request_auth,
|
|
1388
|
+
_content_type=_content_type,
|
|
1389
|
+
_headers=_headers,
|
|
1390
|
+
_host_index=_host_index
|
|
1391
|
+
)
|
|
1392
|
+
|
|
1393
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1394
|
+
'200': None,
|
|
1395
|
+
'404': None,
|
|
1396
|
+
'422': "HTTPValidationError",
|
|
1397
|
+
}
|
|
1398
|
+
response_data = self.api_client.call_api(
|
|
1399
|
+
*_param,
|
|
1400
|
+
_request_timeout=_request_timeout
|
|
1401
|
+
)
|
|
1402
|
+
return response_data.response
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
def _export_dataset_configuration_serialize(
|
|
1406
|
+
self,
|
|
1407
|
+
username,
|
|
1408
|
+
dataset,
|
|
1409
|
+
format,
|
|
1410
|
+
include_files,
|
|
1411
|
+
_request_auth,
|
|
1412
|
+
_content_type,
|
|
1413
|
+
_headers,
|
|
1414
|
+
_host_index,
|
|
1415
|
+
) -> RequestSerialized:
|
|
1416
|
+
|
|
1417
|
+
_host = None
|
|
1418
|
+
|
|
1419
|
+
_collection_formats: Dict[str, str] = {
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
_path_params: Dict[str, str] = {}
|
|
1423
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1424
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1425
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1426
|
+
_files: Dict[
|
|
1427
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1428
|
+
] = {}
|
|
1429
|
+
_body_params: Optional[bytes] = None
|
|
1430
|
+
|
|
1431
|
+
# process the path parameters
|
|
1432
|
+
# process the query parameters
|
|
1433
|
+
if username is not None:
|
|
1434
|
+
|
|
1435
|
+
_query_params.append(('username', username))
|
|
1436
|
+
|
|
1437
|
+
if dataset is not None:
|
|
1438
|
+
|
|
1439
|
+
_query_params.append(('dataset', dataset))
|
|
1440
|
+
|
|
1441
|
+
if format is not None:
|
|
1442
|
+
|
|
1443
|
+
_query_params.append(('format', format))
|
|
1444
|
+
|
|
1445
|
+
if include_files is not None:
|
|
1446
|
+
|
|
1447
|
+
_query_params.append(('include_files', include_files))
|
|
1448
|
+
|
|
1449
|
+
# process the header parameters
|
|
1450
|
+
# process the form parameters
|
|
1451
|
+
# process the body parameter
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
# set the HTTP header `Accept`
|
|
1455
|
+
if 'Accept' not in _header_params:
|
|
1456
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1457
|
+
[
|
|
1458
|
+
'application/json'
|
|
1459
|
+
]
|
|
1460
|
+
)
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
# authentication setting
|
|
1464
|
+
_auth_settings: List[str] = [
|
|
1465
|
+
'QAnswer-Api-Key',
|
|
1466
|
+
'Bearer token'
|
|
1467
|
+
]
|
|
1468
|
+
|
|
1469
|
+
return self.api_client.param_serialize(
|
|
1470
|
+
method='GET',
|
|
1471
|
+
resource_path='/backend/api/dataset/config/export',
|
|
1472
|
+
path_params=_path_params,
|
|
1473
|
+
query_params=_query_params,
|
|
1474
|
+
header_params=_header_params,
|
|
1475
|
+
body=_body_params,
|
|
1476
|
+
post_params=_form_params,
|
|
1477
|
+
files=_files,
|
|
1478
|
+
auth_settings=_auth_settings,
|
|
1479
|
+
collection_formats=_collection_formats,
|
|
1480
|
+
_host=_host,
|
|
1481
|
+
_request_auth=_request_auth
|
|
1482
|
+
)
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
@validate_call
|
|
1488
|
+
def free_text_dataset_add_synonyms(
|
|
1489
|
+
self,
|
|
1490
|
+
add_synonyms: AddSynonyms,
|
|
1491
|
+
_request_timeout: Union[
|
|
1492
|
+
None,
|
|
1493
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1494
|
+
Tuple[
|
|
1495
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1496
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1497
|
+
]
|
|
1498
|
+
] = None,
|
|
1499
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1500
|
+
_content_type: Optional[StrictStr] = None,
|
|
1501
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1502
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1503
|
+
) -> AddSynonymsResp:
|
|
1504
|
+
"""Add Synonyms
|
|
1505
|
+
|
|
1506
|
+
Add synonyms
|
|
1507
|
+
|
|
1508
|
+
:param add_synonyms: (required)
|
|
1509
|
+
:type add_synonyms: AddSynonyms
|
|
1510
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1511
|
+
number provided, it will be total request
|
|
1512
|
+
timeout. It can also be a pair (tuple) of
|
|
1513
|
+
(connection, read) timeouts.
|
|
1514
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1515
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1516
|
+
request; this effectively ignores the
|
|
1517
|
+
authentication in the spec for a single request.
|
|
1518
|
+
:type _request_auth: dict, optional
|
|
1519
|
+
:param _content_type: force content-type for the request.
|
|
1520
|
+
:type _content_type: str, Optional
|
|
1521
|
+
:param _headers: set to override the headers for a single
|
|
1522
|
+
request; this effectively ignores the headers
|
|
1523
|
+
in the spec for a single request.
|
|
1524
|
+
:type _headers: dict, optional
|
|
1525
|
+
:param _host_index: set to override the host_index for a single
|
|
1526
|
+
request; this effectively ignores the host_index
|
|
1527
|
+
in the spec for a single request.
|
|
1528
|
+
:type _host_index: int, optional
|
|
1529
|
+
:return: Returns the result object.
|
|
1530
|
+
""" # noqa: E501
|
|
1531
|
+
|
|
1532
|
+
_param = self._free_text_dataset_add_synonyms_serialize(
|
|
1533
|
+
add_synonyms=add_synonyms,
|
|
1534
|
+
_request_auth=_request_auth,
|
|
1535
|
+
_content_type=_content_type,
|
|
1536
|
+
_headers=_headers,
|
|
1537
|
+
_host_index=_host_index
|
|
1538
|
+
)
|
|
1539
|
+
|
|
1540
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1541
|
+
'200': "AddSynonymsResp",
|
|
1542
|
+
'422': "HTTPValidationError",
|
|
1543
|
+
}
|
|
1544
|
+
response_data = self.api_client.call_api(
|
|
1545
|
+
*_param,
|
|
1546
|
+
_request_timeout=_request_timeout
|
|
1547
|
+
)
|
|
1548
|
+
response_data.read()
|
|
1549
|
+
return self.api_client.response_deserialize(
|
|
1550
|
+
response_data=response_data,
|
|
1551
|
+
response_types_map=_response_types_map,
|
|
1552
|
+
).data
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
@validate_call
|
|
1556
|
+
def free_text_dataset_add_synonyms_with_http_info(
|
|
1557
|
+
self,
|
|
1558
|
+
add_synonyms: AddSynonyms,
|
|
1559
|
+
_request_timeout: Union[
|
|
1560
|
+
None,
|
|
1561
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1562
|
+
Tuple[
|
|
1563
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1564
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1565
|
+
]
|
|
1566
|
+
] = None,
|
|
1567
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1568
|
+
_content_type: Optional[StrictStr] = None,
|
|
1569
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1570
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1571
|
+
) -> ApiResponse[AddSynonymsResp]:
|
|
1572
|
+
"""Add Synonyms
|
|
1573
|
+
|
|
1574
|
+
Add synonyms
|
|
1575
|
+
|
|
1576
|
+
:param add_synonyms: (required)
|
|
1577
|
+
:type add_synonyms: AddSynonyms
|
|
1578
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1579
|
+
number provided, it will be total request
|
|
1580
|
+
timeout. It can also be a pair (tuple) of
|
|
1581
|
+
(connection, read) timeouts.
|
|
1582
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1583
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1584
|
+
request; this effectively ignores the
|
|
1585
|
+
authentication in the spec for a single request.
|
|
1586
|
+
:type _request_auth: dict, optional
|
|
1587
|
+
:param _content_type: force content-type for the request.
|
|
1588
|
+
:type _content_type: str, Optional
|
|
1589
|
+
:param _headers: set to override the headers for a single
|
|
1590
|
+
request; this effectively ignores the headers
|
|
1591
|
+
in the spec for a single request.
|
|
1592
|
+
:type _headers: dict, optional
|
|
1593
|
+
:param _host_index: set to override the host_index for a single
|
|
1594
|
+
request; this effectively ignores the host_index
|
|
1595
|
+
in the spec for a single request.
|
|
1596
|
+
:type _host_index: int, optional
|
|
1597
|
+
:return: Returns the result object.
|
|
1598
|
+
""" # noqa: E501
|
|
1599
|
+
|
|
1600
|
+
_param = self._free_text_dataset_add_synonyms_serialize(
|
|
1601
|
+
add_synonyms=add_synonyms,
|
|
1602
|
+
_request_auth=_request_auth,
|
|
1603
|
+
_content_type=_content_type,
|
|
1604
|
+
_headers=_headers,
|
|
1605
|
+
_host_index=_host_index
|
|
1606
|
+
)
|
|
1607
|
+
|
|
1608
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1609
|
+
'200': "AddSynonymsResp",
|
|
1610
|
+
'422': "HTTPValidationError",
|
|
1611
|
+
}
|
|
1612
|
+
response_data = self.api_client.call_api(
|
|
1613
|
+
*_param,
|
|
1614
|
+
_request_timeout=_request_timeout
|
|
1615
|
+
)
|
|
1616
|
+
response_data.read()
|
|
1617
|
+
return self.api_client.response_deserialize(
|
|
1618
|
+
response_data=response_data,
|
|
1619
|
+
response_types_map=_response_types_map,
|
|
1620
|
+
)
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
@validate_call
|
|
1624
|
+
def free_text_dataset_add_synonyms_without_preload_content(
|
|
1625
|
+
self,
|
|
1626
|
+
add_synonyms: AddSynonyms,
|
|
1627
|
+
_request_timeout: Union[
|
|
1628
|
+
None,
|
|
1629
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1630
|
+
Tuple[
|
|
1631
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1632
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1633
|
+
]
|
|
1634
|
+
] = None,
|
|
1635
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1636
|
+
_content_type: Optional[StrictStr] = None,
|
|
1637
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1638
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1639
|
+
) -> RESTResponseType:
|
|
1640
|
+
"""Add Synonyms
|
|
1641
|
+
|
|
1642
|
+
Add synonyms
|
|
1643
|
+
|
|
1644
|
+
:param add_synonyms: (required)
|
|
1645
|
+
:type add_synonyms: AddSynonyms
|
|
1646
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1647
|
+
number provided, it will be total request
|
|
1648
|
+
timeout. It can also be a pair (tuple) of
|
|
1649
|
+
(connection, read) timeouts.
|
|
1650
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1651
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1652
|
+
request; this effectively ignores the
|
|
1653
|
+
authentication in the spec for a single request.
|
|
1654
|
+
:type _request_auth: dict, optional
|
|
1655
|
+
:param _content_type: force content-type for the request.
|
|
1656
|
+
:type _content_type: str, Optional
|
|
1657
|
+
:param _headers: set to override the headers for a single
|
|
1658
|
+
request; this effectively ignores the headers
|
|
1659
|
+
in the spec for a single request.
|
|
1660
|
+
:type _headers: dict, optional
|
|
1661
|
+
:param _host_index: set to override the host_index for a single
|
|
1662
|
+
request; this effectively ignores the host_index
|
|
1663
|
+
in the spec for a single request.
|
|
1664
|
+
:type _host_index: int, optional
|
|
1665
|
+
:return: Returns the result object.
|
|
1666
|
+
""" # noqa: E501
|
|
1667
|
+
|
|
1668
|
+
_param = self._free_text_dataset_add_synonyms_serialize(
|
|
1669
|
+
add_synonyms=add_synonyms,
|
|
1670
|
+
_request_auth=_request_auth,
|
|
1671
|
+
_content_type=_content_type,
|
|
1672
|
+
_headers=_headers,
|
|
1673
|
+
_host_index=_host_index
|
|
1674
|
+
)
|
|
1675
|
+
|
|
1676
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1677
|
+
'200': "AddSynonymsResp",
|
|
1678
|
+
'422': "HTTPValidationError",
|
|
1679
|
+
}
|
|
1680
|
+
response_data = self.api_client.call_api(
|
|
1681
|
+
*_param,
|
|
1682
|
+
_request_timeout=_request_timeout
|
|
1683
|
+
)
|
|
1684
|
+
return response_data.response
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
def _free_text_dataset_add_synonyms_serialize(
|
|
1688
|
+
self,
|
|
1689
|
+
add_synonyms,
|
|
1690
|
+
_request_auth,
|
|
1691
|
+
_content_type,
|
|
1692
|
+
_headers,
|
|
1693
|
+
_host_index,
|
|
1694
|
+
) -> RequestSerialized:
|
|
1695
|
+
|
|
1696
|
+
_host = None
|
|
1697
|
+
|
|
1698
|
+
_collection_formats: Dict[str, str] = {
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
_path_params: Dict[str, str] = {}
|
|
1702
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1703
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1704
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1705
|
+
_files: Dict[
|
|
1706
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1707
|
+
] = {}
|
|
1708
|
+
_body_params: Optional[bytes] = None
|
|
1709
|
+
|
|
1710
|
+
# process the path parameters
|
|
1711
|
+
# process the query parameters
|
|
1712
|
+
# process the header parameters
|
|
1713
|
+
# process the form parameters
|
|
1714
|
+
# process the body parameter
|
|
1715
|
+
if add_synonyms is not None:
|
|
1716
|
+
_body_params = add_synonyms
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
# set the HTTP header `Accept`
|
|
1720
|
+
if 'Accept' not in _header_params:
|
|
1721
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1722
|
+
[
|
|
1723
|
+
'application/json'
|
|
1724
|
+
]
|
|
1725
|
+
)
|
|
1726
|
+
|
|
1727
|
+
# set the HTTP header `Content-Type`
|
|
1728
|
+
if _content_type:
|
|
1729
|
+
_header_params['Content-Type'] = _content_type
|
|
1730
|
+
else:
|
|
1731
|
+
_default_content_type = (
|
|
1732
|
+
self.api_client.select_header_content_type(
|
|
1733
|
+
[
|
|
1734
|
+
'application/json'
|
|
1735
|
+
]
|
|
1736
|
+
)
|
|
1737
|
+
)
|
|
1738
|
+
if _default_content_type is not None:
|
|
1739
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1740
|
+
|
|
1741
|
+
# authentication setting
|
|
1742
|
+
_auth_settings: List[str] = [
|
|
1743
|
+
'QAnswer-Api-Key',
|
|
1744
|
+
'Bearer token'
|
|
1745
|
+
]
|
|
1746
|
+
|
|
1747
|
+
return self.api_client.param_serialize(
|
|
1748
|
+
method='POST',
|
|
1749
|
+
resource_path='/backend/api/dataset/config/synonyms/add',
|
|
1750
|
+
path_params=_path_params,
|
|
1751
|
+
query_params=_query_params,
|
|
1752
|
+
header_params=_header_params,
|
|
1753
|
+
body=_body_params,
|
|
1754
|
+
post_params=_form_params,
|
|
1755
|
+
files=_files,
|
|
1756
|
+
auth_settings=_auth_settings,
|
|
1757
|
+
collection_formats=_collection_formats,
|
|
1758
|
+
_host=_host,
|
|
1759
|
+
_request_auth=_request_auth
|
|
1760
|
+
)
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
@validate_call
|
|
1766
|
+
def free_text_dataset_delete_synonyms_by_id(
|
|
1767
|
+
self,
|
|
1768
|
+
delete_synonym: DeleteSynonym,
|
|
1769
|
+
_request_timeout: Union[
|
|
1770
|
+
None,
|
|
1771
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1772
|
+
Tuple[
|
|
1773
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1774
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1775
|
+
]
|
|
1776
|
+
] = None,
|
|
1777
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1778
|
+
_content_type: Optional[StrictStr] = None,
|
|
1779
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1780
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1781
|
+
) -> DeleteSynonymResp:
|
|
1782
|
+
"""Delete Synonyms By Id
|
|
1783
|
+
|
|
1784
|
+
Delete synonyms by ID
|
|
1785
|
+
|
|
1786
|
+
:param delete_synonym: (required)
|
|
1787
|
+
:type delete_synonym: DeleteSynonym
|
|
1788
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1789
|
+
number provided, it will be total request
|
|
1790
|
+
timeout. It can also be a pair (tuple) of
|
|
1791
|
+
(connection, read) timeouts.
|
|
1792
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1793
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1794
|
+
request; this effectively ignores the
|
|
1795
|
+
authentication in the spec for a single request.
|
|
1796
|
+
:type _request_auth: dict, optional
|
|
1797
|
+
:param _content_type: force content-type for the request.
|
|
1798
|
+
:type _content_type: str, Optional
|
|
1799
|
+
:param _headers: set to override the headers for a single
|
|
1800
|
+
request; this effectively ignores the headers
|
|
1801
|
+
in the spec for a single request.
|
|
1802
|
+
:type _headers: dict, optional
|
|
1803
|
+
:param _host_index: set to override the host_index for a single
|
|
1804
|
+
request; this effectively ignores the host_index
|
|
1805
|
+
in the spec for a single request.
|
|
1806
|
+
:type _host_index: int, optional
|
|
1807
|
+
:return: Returns the result object.
|
|
1808
|
+
""" # noqa: E501
|
|
1809
|
+
|
|
1810
|
+
_param = self._free_text_dataset_delete_synonyms_by_id_serialize(
|
|
1811
|
+
delete_synonym=delete_synonym,
|
|
1812
|
+
_request_auth=_request_auth,
|
|
1813
|
+
_content_type=_content_type,
|
|
1814
|
+
_headers=_headers,
|
|
1815
|
+
_host_index=_host_index
|
|
1816
|
+
)
|
|
1817
|
+
|
|
1818
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1819
|
+
'200': "DeleteSynonymResp",
|
|
1820
|
+
'422': "HTTPValidationError",
|
|
1821
|
+
}
|
|
1822
|
+
response_data = self.api_client.call_api(
|
|
1823
|
+
*_param,
|
|
1824
|
+
_request_timeout=_request_timeout
|
|
1825
|
+
)
|
|
1826
|
+
response_data.read()
|
|
1827
|
+
return self.api_client.response_deserialize(
|
|
1828
|
+
response_data=response_data,
|
|
1829
|
+
response_types_map=_response_types_map,
|
|
1830
|
+
).data
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
@validate_call
|
|
1834
|
+
def free_text_dataset_delete_synonyms_by_id_with_http_info(
|
|
1835
|
+
self,
|
|
1836
|
+
delete_synonym: DeleteSynonym,
|
|
1837
|
+
_request_timeout: Union[
|
|
1838
|
+
None,
|
|
1839
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1840
|
+
Tuple[
|
|
1841
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1842
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1843
|
+
]
|
|
1844
|
+
] = None,
|
|
1845
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1846
|
+
_content_type: Optional[StrictStr] = None,
|
|
1847
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1848
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1849
|
+
) -> ApiResponse[DeleteSynonymResp]:
|
|
1850
|
+
"""Delete Synonyms By Id
|
|
1851
|
+
|
|
1852
|
+
Delete synonyms by ID
|
|
1853
|
+
|
|
1854
|
+
:param delete_synonym: (required)
|
|
1855
|
+
:type delete_synonym: DeleteSynonym
|
|
1856
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1857
|
+
number provided, it will be total request
|
|
1858
|
+
timeout. It can also be a pair (tuple) of
|
|
1859
|
+
(connection, read) timeouts.
|
|
1860
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1861
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1862
|
+
request; this effectively ignores the
|
|
1863
|
+
authentication in the spec for a single request.
|
|
1864
|
+
:type _request_auth: dict, optional
|
|
1865
|
+
:param _content_type: force content-type for the request.
|
|
1866
|
+
:type _content_type: str, Optional
|
|
1867
|
+
:param _headers: set to override the headers for a single
|
|
1868
|
+
request; this effectively ignores the headers
|
|
1869
|
+
in the spec for a single request.
|
|
1870
|
+
:type _headers: dict, optional
|
|
1871
|
+
:param _host_index: set to override the host_index for a single
|
|
1872
|
+
request; this effectively ignores the host_index
|
|
1873
|
+
in the spec for a single request.
|
|
1874
|
+
:type _host_index: int, optional
|
|
1875
|
+
:return: Returns the result object.
|
|
1876
|
+
""" # noqa: E501
|
|
1877
|
+
|
|
1878
|
+
_param = self._free_text_dataset_delete_synonyms_by_id_serialize(
|
|
1879
|
+
delete_synonym=delete_synonym,
|
|
1880
|
+
_request_auth=_request_auth,
|
|
1881
|
+
_content_type=_content_type,
|
|
1882
|
+
_headers=_headers,
|
|
1883
|
+
_host_index=_host_index
|
|
1884
|
+
)
|
|
1885
|
+
|
|
1886
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1887
|
+
'200': "DeleteSynonymResp",
|
|
1888
|
+
'422': "HTTPValidationError",
|
|
1889
|
+
}
|
|
1890
|
+
response_data = self.api_client.call_api(
|
|
1891
|
+
*_param,
|
|
1892
|
+
_request_timeout=_request_timeout
|
|
1893
|
+
)
|
|
1894
|
+
response_data.read()
|
|
1895
|
+
return self.api_client.response_deserialize(
|
|
1896
|
+
response_data=response_data,
|
|
1897
|
+
response_types_map=_response_types_map,
|
|
1898
|
+
)
|
|
1899
|
+
|
|
1900
|
+
|
|
1901
|
+
@validate_call
|
|
1902
|
+
def free_text_dataset_delete_synonyms_by_id_without_preload_content(
|
|
1903
|
+
self,
|
|
1904
|
+
delete_synonym: DeleteSynonym,
|
|
1905
|
+
_request_timeout: Union[
|
|
1906
|
+
None,
|
|
1907
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1908
|
+
Tuple[
|
|
1909
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1910
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1911
|
+
]
|
|
1912
|
+
] = None,
|
|
1913
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1914
|
+
_content_type: Optional[StrictStr] = None,
|
|
1915
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1916
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1917
|
+
) -> RESTResponseType:
|
|
1918
|
+
"""Delete Synonyms By Id
|
|
1919
|
+
|
|
1920
|
+
Delete synonyms by ID
|
|
1921
|
+
|
|
1922
|
+
:param delete_synonym: (required)
|
|
1923
|
+
:type delete_synonym: DeleteSynonym
|
|
1924
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1925
|
+
number provided, it will be total request
|
|
1926
|
+
timeout. It can also be a pair (tuple) of
|
|
1927
|
+
(connection, read) timeouts.
|
|
1928
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1929
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1930
|
+
request; this effectively ignores the
|
|
1931
|
+
authentication in the spec for a single request.
|
|
1932
|
+
:type _request_auth: dict, optional
|
|
1933
|
+
:param _content_type: force content-type for the request.
|
|
1934
|
+
:type _content_type: str, Optional
|
|
1935
|
+
:param _headers: set to override the headers for a single
|
|
1936
|
+
request; this effectively ignores the headers
|
|
1937
|
+
in the spec for a single request.
|
|
1938
|
+
:type _headers: dict, optional
|
|
1939
|
+
:param _host_index: set to override the host_index for a single
|
|
1940
|
+
request; this effectively ignores the host_index
|
|
1941
|
+
in the spec for a single request.
|
|
1942
|
+
:type _host_index: int, optional
|
|
1943
|
+
:return: Returns the result object.
|
|
1944
|
+
""" # noqa: E501
|
|
1945
|
+
|
|
1946
|
+
_param = self._free_text_dataset_delete_synonyms_by_id_serialize(
|
|
1947
|
+
delete_synonym=delete_synonym,
|
|
1948
|
+
_request_auth=_request_auth,
|
|
1949
|
+
_content_type=_content_type,
|
|
1950
|
+
_headers=_headers,
|
|
1951
|
+
_host_index=_host_index
|
|
1952
|
+
)
|
|
1953
|
+
|
|
1954
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1955
|
+
'200': "DeleteSynonymResp",
|
|
1956
|
+
'422': "HTTPValidationError",
|
|
1957
|
+
}
|
|
1958
|
+
response_data = self.api_client.call_api(
|
|
1959
|
+
*_param,
|
|
1960
|
+
_request_timeout=_request_timeout
|
|
1961
|
+
)
|
|
1962
|
+
return response_data.response
|
|
1963
|
+
|
|
1964
|
+
|
|
1965
|
+
def _free_text_dataset_delete_synonyms_by_id_serialize(
|
|
1966
|
+
self,
|
|
1967
|
+
delete_synonym,
|
|
1968
|
+
_request_auth,
|
|
1969
|
+
_content_type,
|
|
1970
|
+
_headers,
|
|
1971
|
+
_host_index,
|
|
1972
|
+
) -> RequestSerialized:
|
|
1973
|
+
|
|
1974
|
+
_host = None
|
|
1975
|
+
|
|
1976
|
+
_collection_formats: Dict[str, str] = {
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
_path_params: Dict[str, str] = {}
|
|
1980
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1981
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1982
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1983
|
+
_files: Dict[
|
|
1984
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1985
|
+
] = {}
|
|
1986
|
+
_body_params: Optional[bytes] = None
|
|
1987
|
+
|
|
1988
|
+
# process the path parameters
|
|
1989
|
+
# process the query parameters
|
|
1990
|
+
# process the header parameters
|
|
1991
|
+
# process the form parameters
|
|
1992
|
+
# process the body parameter
|
|
1993
|
+
if delete_synonym is not None:
|
|
1994
|
+
_body_params = delete_synonym
|
|
1995
|
+
|
|
1996
|
+
|
|
1997
|
+
# set the HTTP header `Accept`
|
|
1998
|
+
if 'Accept' not in _header_params:
|
|
1999
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2000
|
+
[
|
|
2001
|
+
'application/json'
|
|
2002
|
+
]
|
|
2003
|
+
)
|
|
2004
|
+
|
|
2005
|
+
# set the HTTP header `Content-Type`
|
|
2006
|
+
if _content_type:
|
|
2007
|
+
_header_params['Content-Type'] = _content_type
|
|
2008
|
+
else:
|
|
2009
|
+
_default_content_type = (
|
|
2010
|
+
self.api_client.select_header_content_type(
|
|
2011
|
+
[
|
|
2012
|
+
'application/json'
|
|
2013
|
+
]
|
|
2014
|
+
)
|
|
2015
|
+
)
|
|
2016
|
+
if _default_content_type is not None:
|
|
2017
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2018
|
+
|
|
2019
|
+
# authentication setting
|
|
2020
|
+
_auth_settings: List[str] = [
|
|
2021
|
+
'QAnswer-Api-Key',
|
|
2022
|
+
'Bearer token'
|
|
2023
|
+
]
|
|
2024
|
+
|
|
2025
|
+
return self.api_client.param_serialize(
|
|
2026
|
+
method='POST',
|
|
2027
|
+
resource_path='/backend/api/dataset/config/synonyms/delete-by-id',
|
|
2028
|
+
path_params=_path_params,
|
|
2029
|
+
query_params=_query_params,
|
|
2030
|
+
header_params=_header_params,
|
|
2031
|
+
body=_body_params,
|
|
2032
|
+
post_params=_form_params,
|
|
2033
|
+
files=_files,
|
|
2034
|
+
auth_settings=_auth_settings,
|
|
2035
|
+
collection_formats=_collection_formats,
|
|
2036
|
+
_host=_host,
|
|
2037
|
+
_request_auth=_request_auth
|
|
2038
|
+
)
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
|
|
2042
|
+
|
|
2043
|
+
@validate_call
|
|
2044
|
+
def free_text_dataset_get_synonyms(
|
|
2045
|
+
self,
|
|
2046
|
+
username: Annotated[Optional[StrictStr], Field(description="Username")] = None,
|
|
2047
|
+
dataset: Annotated[Optional[StrictStr], Field(description="Dataset")] = None,
|
|
2048
|
+
organization_id: Optional[StrictInt] = None,
|
|
2049
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
|
2050
|
+
_request_timeout: Union[
|
|
2051
|
+
None,
|
|
2052
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2053
|
+
Tuple[
|
|
2054
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2055
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2056
|
+
]
|
|
2057
|
+
] = None,
|
|
2058
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2059
|
+
_content_type: Optional[StrictStr] = None,
|
|
2060
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2061
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2062
|
+
) -> RetreiveAllSynonymsResp:
|
|
2063
|
+
"""List Synonyms
|
|
2064
|
+
|
|
2065
|
+
List synonyms
|
|
2066
|
+
|
|
2067
|
+
:param username: Username
|
|
2068
|
+
:type username: str
|
|
2069
|
+
:param dataset: Dataset
|
|
2070
|
+
:type dataset: str
|
|
2071
|
+
:param organization_id:
|
|
2072
|
+
:type organization_id: int
|
|
2073
|
+
:param q_answer_api_key:
|
|
2074
|
+
:type q_answer_api_key: str
|
|
2075
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2076
|
+
number provided, it will be total request
|
|
2077
|
+
timeout. It can also be a pair (tuple) of
|
|
2078
|
+
(connection, read) timeouts.
|
|
2079
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2080
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2081
|
+
request; this effectively ignores the
|
|
2082
|
+
authentication in the spec for a single request.
|
|
2083
|
+
:type _request_auth: dict, optional
|
|
2084
|
+
:param _content_type: force content-type for the request.
|
|
2085
|
+
:type _content_type: str, Optional
|
|
2086
|
+
:param _headers: set to override the headers for a single
|
|
2087
|
+
request; this effectively ignores the headers
|
|
2088
|
+
in the spec for a single request.
|
|
2089
|
+
:type _headers: dict, optional
|
|
2090
|
+
:param _host_index: set to override the host_index for a single
|
|
2091
|
+
request; this effectively ignores the host_index
|
|
2092
|
+
in the spec for a single request.
|
|
2093
|
+
:type _host_index: int, optional
|
|
2094
|
+
:return: Returns the result object.
|
|
2095
|
+
""" # noqa: E501
|
|
2096
|
+
|
|
2097
|
+
_param = self._free_text_dataset_get_synonyms_serialize(
|
|
2098
|
+
username=username,
|
|
2099
|
+
dataset=dataset,
|
|
2100
|
+
organization_id=organization_id,
|
|
2101
|
+
q_answer_api_key=q_answer_api_key,
|
|
2102
|
+
_request_auth=_request_auth,
|
|
2103
|
+
_content_type=_content_type,
|
|
2104
|
+
_headers=_headers,
|
|
2105
|
+
_host_index=_host_index
|
|
2106
|
+
)
|
|
2107
|
+
|
|
2108
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2109
|
+
'200': "RetreiveAllSynonymsResp",
|
|
2110
|
+
'422': "HTTPValidationError",
|
|
2111
|
+
}
|
|
2112
|
+
response_data = self.api_client.call_api(
|
|
2113
|
+
*_param,
|
|
2114
|
+
_request_timeout=_request_timeout
|
|
2115
|
+
)
|
|
2116
|
+
response_data.read()
|
|
2117
|
+
return self.api_client.response_deserialize(
|
|
2118
|
+
response_data=response_data,
|
|
2119
|
+
response_types_map=_response_types_map,
|
|
2120
|
+
).data
|
|
2121
|
+
|
|
2122
|
+
|
|
2123
|
+
@validate_call
|
|
2124
|
+
def free_text_dataset_get_synonyms_with_http_info(
|
|
2125
|
+
self,
|
|
2126
|
+
username: Annotated[Optional[StrictStr], Field(description="Username")] = None,
|
|
2127
|
+
dataset: Annotated[Optional[StrictStr], Field(description="Dataset")] = None,
|
|
2128
|
+
organization_id: Optional[StrictInt] = None,
|
|
2129
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
|
2130
|
+
_request_timeout: Union[
|
|
2131
|
+
None,
|
|
2132
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2133
|
+
Tuple[
|
|
2134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2135
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2136
|
+
]
|
|
2137
|
+
] = None,
|
|
2138
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2139
|
+
_content_type: Optional[StrictStr] = None,
|
|
2140
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2141
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2142
|
+
) -> ApiResponse[RetreiveAllSynonymsResp]:
|
|
2143
|
+
"""List Synonyms
|
|
2144
|
+
|
|
2145
|
+
List synonyms
|
|
2146
|
+
|
|
2147
|
+
:param username: Username
|
|
2148
|
+
:type username: str
|
|
2149
|
+
:param dataset: Dataset
|
|
2150
|
+
:type dataset: str
|
|
2151
|
+
:param organization_id:
|
|
2152
|
+
:type organization_id: int
|
|
2153
|
+
:param q_answer_api_key:
|
|
2154
|
+
:type q_answer_api_key: str
|
|
2155
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2156
|
+
number provided, it will be total request
|
|
2157
|
+
timeout. It can also be a pair (tuple) of
|
|
2158
|
+
(connection, read) timeouts.
|
|
2159
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2160
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2161
|
+
request; this effectively ignores the
|
|
2162
|
+
authentication in the spec for a single request.
|
|
2163
|
+
:type _request_auth: dict, optional
|
|
2164
|
+
:param _content_type: force content-type for the request.
|
|
2165
|
+
:type _content_type: str, Optional
|
|
2166
|
+
:param _headers: set to override the headers for a single
|
|
2167
|
+
request; this effectively ignores the headers
|
|
2168
|
+
in the spec for a single request.
|
|
2169
|
+
:type _headers: dict, optional
|
|
2170
|
+
:param _host_index: set to override the host_index for a single
|
|
2171
|
+
request; this effectively ignores the host_index
|
|
2172
|
+
in the spec for a single request.
|
|
2173
|
+
:type _host_index: int, optional
|
|
2174
|
+
:return: Returns the result object.
|
|
2175
|
+
""" # noqa: E501
|
|
2176
|
+
|
|
2177
|
+
_param = self._free_text_dataset_get_synonyms_serialize(
|
|
2178
|
+
username=username,
|
|
2179
|
+
dataset=dataset,
|
|
2180
|
+
organization_id=organization_id,
|
|
2181
|
+
q_answer_api_key=q_answer_api_key,
|
|
2182
|
+
_request_auth=_request_auth,
|
|
2183
|
+
_content_type=_content_type,
|
|
2184
|
+
_headers=_headers,
|
|
2185
|
+
_host_index=_host_index
|
|
2186
|
+
)
|
|
2187
|
+
|
|
2188
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2189
|
+
'200': "RetreiveAllSynonymsResp",
|
|
2190
|
+
'422': "HTTPValidationError",
|
|
2191
|
+
}
|
|
2192
|
+
response_data = self.api_client.call_api(
|
|
2193
|
+
*_param,
|
|
2194
|
+
_request_timeout=_request_timeout
|
|
2195
|
+
)
|
|
2196
|
+
response_data.read()
|
|
2197
|
+
return self.api_client.response_deserialize(
|
|
2198
|
+
response_data=response_data,
|
|
2199
|
+
response_types_map=_response_types_map,
|
|
2200
|
+
)
|
|
2201
|
+
|
|
2202
|
+
|
|
2203
|
+
@validate_call
|
|
2204
|
+
def free_text_dataset_get_synonyms_without_preload_content(
|
|
2205
|
+
self,
|
|
2206
|
+
username: Annotated[Optional[StrictStr], Field(description="Username")] = None,
|
|
2207
|
+
dataset: Annotated[Optional[StrictStr], Field(description="Dataset")] = None,
|
|
2208
|
+
organization_id: Optional[StrictInt] = None,
|
|
2209
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
|
2210
|
+
_request_timeout: Union[
|
|
2211
|
+
None,
|
|
2212
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2213
|
+
Tuple[
|
|
2214
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2215
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2216
|
+
]
|
|
2217
|
+
] = None,
|
|
2218
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2219
|
+
_content_type: Optional[StrictStr] = None,
|
|
2220
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2221
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2222
|
+
) -> RESTResponseType:
|
|
2223
|
+
"""List Synonyms
|
|
2224
|
+
|
|
2225
|
+
List synonyms
|
|
2226
|
+
|
|
2227
|
+
:param username: Username
|
|
2228
|
+
:type username: str
|
|
2229
|
+
:param dataset: Dataset
|
|
2230
|
+
:type dataset: str
|
|
2231
|
+
:param organization_id:
|
|
2232
|
+
:type organization_id: int
|
|
2233
|
+
:param q_answer_api_key:
|
|
2234
|
+
:type q_answer_api_key: str
|
|
2235
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2236
|
+
number provided, it will be total request
|
|
2237
|
+
timeout. It can also be a pair (tuple) of
|
|
2238
|
+
(connection, read) timeouts.
|
|
2239
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2240
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2241
|
+
request; this effectively ignores the
|
|
2242
|
+
authentication in the spec for a single request.
|
|
2243
|
+
:type _request_auth: dict, optional
|
|
2244
|
+
:param _content_type: force content-type for the request.
|
|
2245
|
+
:type _content_type: str, Optional
|
|
2246
|
+
:param _headers: set to override the headers for a single
|
|
2247
|
+
request; this effectively ignores the headers
|
|
2248
|
+
in the spec for a single request.
|
|
2249
|
+
:type _headers: dict, optional
|
|
2250
|
+
:param _host_index: set to override the host_index for a single
|
|
2251
|
+
request; this effectively ignores the host_index
|
|
2252
|
+
in the spec for a single request.
|
|
2253
|
+
:type _host_index: int, optional
|
|
2254
|
+
:return: Returns the result object.
|
|
2255
|
+
""" # noqa: E501
|
|
2256
|
+
|
|
2257
|
+
_param = self._free_text_dataset_get_synonyms_serialize(
|
|
2258
|
+
username=username,
|
|
2259
|
+
dataset=dataset,
|
|
2260
|
+
organization_id=organization_id,
|
|
2261
|
+
q_answer_api_key=q_answer_api_key,
|
|
2262
|
+
_request_auth=_request_auth,
|
|
2263
|
+
_content_type=_content_type,
|
|
2264
|
+
_headers=_headers,
|
|
2265
|
+
_host_index=_host_index
|
|
2266
|
+
)
|
|
2267
|
+
|
|
2268
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2269
|
+
'200': "RetreiveAllSynonymsResp",
|
|
2270
|
+
'422': "HTTPValidationError",
|
|
2271
|
+
}
|
|
2272
|
+
response_data = self.api_client.call_api(
|
|
2273
|
+
*_param,
|
|
2274
|
+
_request_timeout=_request_timeout
|
|
2275
|
+
)
|
|
2276
|
+
return response_data.response
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
def _free_text_dataset_get_synonyms_serialize(
|
|
2280
|
+
self,
|
|
2281
|
+
username,
|
|
2282
|
+
dataset,
|
|
2283
|
+
organization_id,
|
|
2284
|
+
q_answer_api_key,
|
|
2285
|
+
_request_auth,
|
|
2286
|
+
_content_type,
|
|
2287
|
+
_headers,
|
|
2288
|
+
_host_index,
|
|
2289
|
+
) -> RequestSerialized:
|
|
2290
|
+
|
|
2291
|
+
_host = None
|
|
2292
|
+
|
|
2293
|
+
_collection_formats: Dict[str, str] = {
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
_path_params: Dict[str, str] = {}
|
|
2297
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2298
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2299
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2300
|
+
_files: Dict[
|
|
2301
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2302
|
+
] = {}
|
|
2303
|
+
_body_params: Optional[bytes] = None
|
|
2304
|
+
|
|
2305
|
+
# process the path parameters
|
|
2306
|
+
# process the query parameters
|
|
2307
|
+
if username is not None:
|
|
2308
|
+
|
|
2309
|
+
_query_params.append(('username', username))
|
|
2310
|
+
|
|
2311
|
+
if dataset is not None:
|
|
2312
|
+
|
|
2313
|
+
_query_params.append(('dataset', dataset))
|
|
2314
|
+
|
|
2315
|
+
if organization_id is not None:
|
|
2316
|
+
|
|
2317
|
+
_query_params.append(('organizationId', organization_id))
|
|
2318
|
+
|
|
2319
|
+
# process the header parameters
|
|
2320
|
+
if q_answer_api_key is not None:
|
|
2321
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2322
|
+
# process the form parameters
|
|
2323
|
+
# process the body parameter
|
|
2324
|
+
|
|
2325
|
+
|
|
2326
|
+
# set the HTTP header `Accept`
|
|
2327
|
+
if 'Accept' not in _header_params:
|
|
2328
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2329
|
+
[
|
|
2330
|
+
'application/json'
|
|
2331
|
+
]
|
|
2332
|
+
)
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
# authentication setting
|
|
2336
|
+
_auth_settings: List[str] = [
|
|
2337
|
+
'QAnswer-Api-Key',
|
|
2338
|
+
'Bearer token'
|
|
2339
|
+
]
|
|
2340
|
+
|
|
2341
|
+
return self.api_client.param_serialize(
|
|
2342
|
+
method='GET',
|
|
2343
|
+
resource_path='/backend/api/dataset/config/synonyms/list',
|
|
2344
|
+
path_params=_path_params,
|
|
2345
|
+
query_params=_query_params,
|
|
2346
|
+
header_params=_header_params,
|
|
2347
|
+
body=_body_params,
|
|
2348
|
+
post_params=_form_params,
|
|
2349
|
+
files=_files,
|
|
2350
|
+
auth_settings=_auth_settings,
|
|
2351
|
+
collection_formats=_collection_formats,
|
|
2352
|
+
_host=_host,
|
|
2353
|
+
_request_auth=_request_auth
|
|
2354
|
+
)
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
@validate_call
|
|
2360
|
+
def free_text_dataset_prepare_synonyms(
|
|
2361
|
+
self,
|
|
2362
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
2363
|
+
username: Optional[StrictStr] = None,
|
|
2364
|
+
dataset: Optional[StrictStr] = None,
|
|
2365
|
+
organization_id: Optional[StrictInt] = None,
|
|
2366
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
|
2367
|
+
_request_timeout: Union[
|
|
2368
|
+
None,
|
|
2369
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2370
|
+
Tuple[
|
|
2371
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2372
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2373
|
+
]
|
|
2374
|
+
] = None,
|
|
2375
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2376
|
+
_content_type: Optional[StrictStr] = None,
|
|
2377
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2378
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2379
|
+
) -> PrepareSynonymsUploadResp:
|
|
2380
|
+
"""Prepare Synonyms Upload
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
:param file: (required)
|
|
2384
|
+
:type file: bytearray
|
|
2385
|
+
:param username:
|
|
2386
|
+
:type username: str
|
|
2387
|
+
:param dataset:
|
|
2388
|
+
:type dataset: str
|
|
2389
|
+
:param organization_id:
|
|
2390
|
+
:type organization_id: int
|
|
2391
|
+
:param q_answer_api_key:
|
|
2392
|
+
:type q_answer_api_key: str
|
|
2393
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2394
|
+
number provided, it will be total request
|
|
2395
|
+
timeout. It can also be a pair (tuple) of
|
|
2396
|
+
(connection, read) timeouts.
|
|
2397
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2398
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2399
|
+
request; this effectively ignores the
|
|
2400
|
+
authentication in the spec for a single request.
|
|
2401
|
+
:type _request_auth: dict, optional
|
|
2402
|
+
:param _content_type: force content-type for the request.
|
|
2403
|
+
:type _content_type: str, Optional
|
|
2404
|
+
:param _headers: set to override the headers for a single
|
|
2405
|
+
request; this effectively ignores the headers
|
|
2406
|
+
in the spec for a single request.
|
|
2407
|
+
:type _headers: dict, optional
|
|
2408
|
+
:param _host_index: set to override the host_index for a single
|
|
2409
|
+
request; this effectively ignores the host_index
|
|
2410
|
+
in the spec for a single request.
|
|
2411
|
+
:type _host_index: int, optional
|
|
2412
|
+
:return: Returns the result object.
|
|
2413
|
+
""" # noqa: E501
|
|
2414
|
+
|
|
2415
|
+
_param = self._free_text_dataset_prepare_synonyms_serialize(
|
|
2416
|
+
file=file,
|
|
2417
|
+
username=username,
|
|
2418
|
+
dataset=dataset,
|
|
2419
|
+
organization_id=organization_id,
|
|
2420
|
+
q_answer_api_key=q_answer_api_key,
|
|
2421
|
+
_request_auth=_request_auth,
|
|
2422
|
+
_content_type=_content_type,
|
|
2423
|
+
_headers=_headers,
|
|
2424
|
+
_host_index=_host_index
|
|
2425
|
+
)
|
|
2426
|
+
|
|
2427
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2428
|
+
'200': "PrepareSynonymsUploadResp",
|
|
2429
|
+
'422': "HTTPValidationError",
|
|
2430
|
+
}
|
|
2431
|
+
response_data = self.api_client.call_api(
|
|
2432
|
+
*_param,
|
|
2433
|
+
_request_timeout=_request_timeout
|
|
2434
|
+
)
|
|
2435
|
+
response_data.read()
|
|
2436
|
+
return self.api_client.response_deserialize(
|
|
2437
|
+
response_data=response_data,
|
|
2438
|
+
response_types_map=_response_types_map,
|
|
2439
|
+
).data
|
|
2440
|
+
|
|
2441
|
+
|
|
2442
|
+
@validate_call
|
|
2443
|
+
def free_text_dataset_prepare_synonyms_with_http_info(
|
|
2444
|
+
self,
|
|
2445
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
2446
|
+
username: Optional[StrictStr] = None,
|
|
2447
|
+
dataset: Optional[StrictStr] = None,
|
|
2448
|
+
organization_id: Optional[StrictInt] = None,
|
|
2449
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
|
2450
|
+
_request_timeout: Union[
|
|
2451
|
+
None,
|
|
2452
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2453
|
+
Tuple[
|
|
2454
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2455
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2456
|
+
]
|
|
2457
|
+
] = None,
|
|
2458
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2459
|
+
_content_type: Optional[StrictStr] = None,
|
|
2460
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2461
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2462
|
+
) -> ApiResponse[PrepareSynonymsUploadResp]:
|
|
2463
|
+
"""Prepare Synonyms Upload
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
:param file: (required)
|
|
2467
|
+
:type file: bytearray
|
|
2468
|
+
:param username:
|
|
2469
|
+
:type username: str
|
|
2470
|
+
:param dataset:
|
|
2471
|
+
:type dataset: str
|
|
2472
|
+
:param organization_id:
|
|
2473
|
+
:type organization_id: int
|
|
2474
|
+
:param q_answer_api_key:
|
|
2475
|
+
:type q_answer_api_key: str
|
|
2476
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2477
|
+
number provided, it will be total request
|
|
2478
|
+
timeout. It can also be a pair (tuple) of
|
|
2479
|
+
(connection, read) timeouts.
|
|
2480
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2481
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2482
|
+
request; this effectively ignores the
|
|
2483
|
+
authentication in the spec for a single request.
|
|
2484
|
+
:type _request_auth: dict, optional
|
|
2485
|
+
:param _content_type: force content-type for the request.
|
|
2486
|
+
:type _content_type: str, Optional
|
|
2487
|
+
:param _headers: set to override the headers for a single
|
|
2488
|
+
request; this effectively ignores the headers
|
|
2489
|
+
in the spec for a single request.
|
|
2490
|
+
:type _headers: dict, optional
|
|
2491
|
+
:param _host_index: set to override the host_index for a single
|
|
2492
|
+
request; this effectively ignores the host_index
|
|
2493
|
+
in the spec for a single request.
|
|
2494
|
+
:type _host_index: int, optional
|
|
2495
|
+
:return: Returns the result object.
|
|
2496
|
+
""" # noqa: E501
|
|
2497
|
+
|
|
2498
|
+
_param = self._free_text_dataset_prepare_synonyms_serialize(
|
|
2499
|
+
file=file,
|
|
2500
|
+
username=username,
|
|
2501
|
+
dataset=dataset,
|
|
2502
|
+
organization_id=organization_id,
|
|
2503
|
+
q_answer_api_key=q_answer_api_key,
|
|
2504
|
+
_request_auth=_request_auth,
|
|
2505
|
+
_content_type=_content_type,
|
|
2506
|
+
_headers=_headers,
|
|
2507
|
+
_host_index=_host_index
|
|
2508
|
+
)
|
|
2509
|
+
|
|
2510
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2511
|
+
'200': "PrepareSynonymsUploadResp",
|
|
2512
|
+
'422': "HTTPValidationError",
|
|
2513
|
+
}
|
|
2514
|
+
response_data = self.api_client.call_api(
|
|
2515
|
+
*_param,
|
|
2516
|
+
_request_timeout=_request_timeout
|
|
2517
|
+
)
|
|
2518
|
+
response_data.read()
|
|
2519
|
+
return self.api_client.response_deserialize(
|
|
2520
|
+
response_data=response_data,
|
|
2521
|
+
response_types_map=_response_types_map,
|
|
2522
|
+
)
|
|
2523
|
+
|
|
2524
|
+
|
|
2525
|
+
@validate_call
|
|
2526
|
+
def free_text_dataset_prepare_synonyms_without_preload_content(
|
|
2527
|
+
self,
|
|
2528
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
2529
|
+
username: Optional[StrictStr] = None,
|
|
2530
|
+
dataset: Optional[StrictStr] = None,
|
|
2531
|
+
organization_id: Optional[StrictInt] = None,
|
|
2532
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
|
2533
|
+
_request_timeout: Union[
|
|
2534
|
+
None,
|
|
2535
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2536
|
+
Tuple[
|
|
2537
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2538
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2539
|
+
]
|
|
2540
|
+
] = None,
|
|
2541
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2542
|
+
_content_type: Optional[StrictStr] = None,
|
|
2543
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2544
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2545
|
+
) -> RESTResponseType:
|
|
2546
|
+
"""Prepare Synonyms Upload
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
:param file: (required)
|
|
2550
|
+
:type file: bytearray
|
|
2551
|
+
:param username:
|
|
2552
|
+
:type username: str
|
|
2553
|
+
:param dataset:
|
|
2554
|
+
:type dataset: str
|
|
2555
|
+
:param organization_id:
|
|
2556
|
+
:type organization_id: int
|
|
2557
|
+
:param q_answer_api_key:
|
|
2558
|
+
:type q_answer_api_key: str
|
|
2559
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2560
|
+
number provided, it will be total request
|
|
2561
|
+
timeout. It can also be a pair (tuple) of
|
|
2562
|
+
(connection, read) timeouts.
|
|
2563
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2564
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2565
|
+
request; this effectively ignores the
|
|
2566
|
+
authentication in the spec for a single request.
|
|
2567
|
+
:type _request_auth: dict, optional
|
|
2568
|
+
:param _content_type: force content-type for the request.
|
|
2569
|
+
:type _content_type: str, Optional
|
|
2570
|
+
:param _headers: set to override the headers for a single
|
|
2571
|
+
request; this effectively ignores the headers
|
|
2572
|
+
in the spec for a single request.
|
|
2573
|
+
:type _headers: dict, optional
|
|
2574
|
+
:param _host_index: set to override the host_index for a single
|
|
2575
|
+
request; this effectively ignores the host_index
|
|
2576
|
+
in the spec for a single request.
|
|
2577
|
+
:type _host_index: int, optional
|
|
2578
|
+
:return: Returns the result object.
|
|
2579
|
+
""" # noqa: E501
|
|
2580
|
+
|
|
2581
|
+
_param = self._free_text_dataset_prepare_synonyms_serialize(
|
|
2582
|
+
file=file,
|
|
2583
|
+
username=username,
|
|
2584
|
+
dataset=dataset,
|
|
2585
|
+
organization_id=organization_id,
|
|
2586
|
+
q_answer_api_key=q_answer_api_key,
|
|
2587
|
+
_request_auth=_request_auth,
|
|
2588
|
+
_content_type=_content_type,
|
|
2589
|
+
_headers=_headers,
|
|
2590
|
+
_host_index=_host_index
|
|
2591
|
+
)
|
|
2592
|
+
|
|
2593
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2594
|
+
'200': "PrepareSynonymsUploadResp",
|
|
2595
|
+
'422': "HTTPValidationError",
|
|
2596
|
+
}
|
|
2597
|
+
response_data = self.api_client.call_api(
|
|
2598
|
+
*_param,
|
|
2599
|
+
_request_timeout=_request_timeout
|
|
2600
|
+
)
|
|
2601
|
+
return response_data.response
|
|
2602
|
+
|
|
2603
|
+
|
|
2604
|
+
def _free_text_dataset_prepare_synonyms_serialize(
|
|
2605
|
+
self,
|
|
2606
|
+
file,
|
|
2607
|
+
username,
|
|
2608
|
+
dataset,
|
|
2609
|
+
organization_id,
|
|
2610
|
+
q_answer_api_key,
|
|
2611
|
+
_request_auth,
|
|
2612
|
+
_content_type,
|
|
2613
|
+
_headers,
|
|
2614
|
+
_host_index,
|
|
2615
|
+
) -> RequestSerialized:
|
|
2616
|
+
|
|
2617
|
+
_host = None
|
|
2618
|
+
|
|
2619
|
+
_collection_formats: Dict[str, str] = {
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
_path_params: Dict[str, str] = {}
|
|
2623
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2624
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2625
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2626
|
+
_files: Dict[
|
|
2627
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2628
|
+
] = {}
|
|
2629
|
+
_body_params: Optional[bytes] = None
|
|
2630
|
+
|
|
2631
|
+
# process the path parameters
|
|
2632
|
+
# process the query parameters
|
|
2633
|
+
if username is not None:
|
|
2634
|
+
|
|
2635
|
+
_query_params.append(('username', username))
|
|
2636
|
+
|
|
2637
|
+
if dataset is not None:
|
|
2638
|
+
|
|
2639
|
+
_query_params.append(('dataset', dataset))
|
|
2640
|
+
|
|
2641
|
+
if organization_id is not None:
|
|
2642
|
+
|
|
2643
|
+
_query_params.append(('organizationId', organization_id))
|
|
2644
|
+
|
|
2645
|
+
# process the header parameters
|
|
2646
|
+
if q_answer_api_key is not None:
|
|
2647
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2648
|
+
# process the form parameters
|
|
2649
|
+
if file is not None:
|
|
2650
|
+
_files['file'] = file
|
|
2651
|
+
# process the body parameter
|
|
2652
|
+
|
|
2653
|
+
|
|
2654
|
+
# set the HTTP header `Accept`
|
|
2655
|
+
if 'Accept' not in _header_params:
|
|
2656
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2657
|
+
[
|
|
2658
|
+
'application/json'
|
|
2659
|
+
]
|
|
2660
|
+
)
|
|
2661
|
+
|
|
2662
|
+
# set the HTTP header `Content-Type`
|
|
2663
|
+
if _content_type:
|
|
2664
|
+
_header_params['Content-Type'] = _content_type
|
|
2665
|
+
else:
|
|
2666
|
+
_default_content_type = (
|
|
2667
|
+
self.api_client.select_header_content_type(
|
|
2668
|
+
[
|
|
2669
|
+
'multipart/form-data'
|
|
2670
|
+
]
|
|
2671
|
+
)
|
|
2672
|
+
)
|
|
2673
|
+
if _default_content_type is not None:
|
|
2674
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2675
|
+
|
|
2676
|
+
# authentication setting
|
|
2677
|
+
_auth_settings: List[str] = [
|
|
2678
|
+
'QAnswer-Api-Key',
|
|
2679
|
+
'Bearer token'
|
|
2680
|
+
]
|
|
2681
|
+
|
|
2682
|
+
return self.api_client.param_serialize(
|
|
2683
|
+
method='POST',
|
|
2684
|
+
resource_path='/backend/api/dataset/config/synonyms/prepare-upload',
|
|
2685
|
+
path_params=_path_params,
|
|
2686
|
+
query_params=_query_params,
|
|
2687
|
+
header_params=_header_params,
|
|
2688
|
+
body=_body_params,
|
|
2689
|
+
post_params=_form_params,
|
|
2690
|
+
files=_files,
|
|
2691
|
+
auth_settings=_auth_settings,
|
|
2692
|
+
collection_formats=_collection_formats,
|
|
2693
|
+
_host=_host,
|
|
2694
|
+
_request_auth=_request_auth
|
|
2695
|
+
)
|
|
2696
|
+
|
|
2697
|
+
|
|
2698
|
+
|
|
2699
|
+
|
|
2700
|
+
@validate_call
|
|
2701
|
+
def free_text_dataset_update_synonyms(
|
|
2702
|
+
self,
|
|
2703
|
+
update_synonyms: UpdateSynonyms,
|
|
2704
|
+
_request_timeout: Union[
|
|
2705
|
+
None,
|
|
2706
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2707
|
+
Tuple[
|
|
2708
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2709
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2710
|
+
]
|
|
2711
|
+
] = None,
|
|
2712
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2713
|
+
_content_type: Optional[StrictStr] = None,
|
|
2714
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2715
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2716
|
+
) -> UpdateSynonymsResp:
|
|
2717
|
+
"""Update Synonyms
|
|
2718
|
+
|
|
2719
|
+
Update synonyms
|
|
2720
|
+
|
|
2721
|
+
:param update_synonyms: (required)
|
|
2722
|
+
:type update_synonyms: UpdateSynonyms
|
|
2723
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2724
|
+
number provided, it will be total request
|
|
2725
|
+
timeout. It can also be a pair (tuple) of
|
|
2726
|
+
(connection, read) timeouts.
|
|
2727
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2728
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2729
|
+
request; this effectively ignores the
|
|
2730
|
+
authentication in the spec for a single request.
|
|
2731
|
+
:type _request_auth: dict, optional
|
|
2732
|
+
:param _content_type: force content-type for the request.
|
|
2733
|
+
:type _content_type: str, Optional
|
|
2734
|
+
:param _headers: set to override the headers for a single
|
|
2735
|
+
request; this effectively ignores the headers
|
|
2736
|
+
in the spec for a single request.
|
|
2737
|
+
:type _headers: dict, optional
|
|
2738
|
+
:param _host_index: set to override the host_index for a single
|
|
2739
|
+
request; this effectively ignores the host_index
|
|
2740
|
+
in the spec for a single request.
|
|
2741
|
+
:type _host_index: int, optional
|
|
2742
|
+
:return: Returns the result object.
|
|
2743
|
+
""" # noqa: E501
|
|
2744
|
+
|
|
2745
|
+
_param = self._free_text_dataset_update_synonyms_serialize(
|
|
2746
|
+
update_synonyms=update_synonyms,
|
|
2747
|
+
_request_auth=_request_auth,
|
|
2748
|
+
_content_type=_content_type,
|
|
2749
|
+
_headers=_headers,
|
|
2750
|
+
_host_index=_host_index
|
|
2751
|
+
)
|
|
2752
|
+
|
|
2753
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2754
|
+
'200': "UpdateSynonymsResp",
|
|
2755
|
+
'422': "HTTPValidationError",
|
|
2756
|
+
}
|
|
2757
|
+
response_data = self.api_client.call_api(
|
|
2758
|
+
*_param,
|
|
2759
|
+
_request_timeout=_request_timeout
|
|
2760
|
+
)
|
|
2761
|
+
response_data.read()
|
|
2762
|
+
return self.api_client.response_deserialize(
|
|
2763
|
+
response_data=response_data,
|
|
2764
|
+
response_types_map=_response_types_map,
|
|
2765
|
+
).data
|
|
2766
|
+
|
|
2767
|
+
|
|
2768
|
+
@validate_call
|
|
2769
|
+
def free_text_dataset_update_synonyms_with_http_info(
|
|
2770
|
+
self,
|
|
2771
|
+
update_synonyms: UpdateSynonyms,
|
|
2772
|
+
_request_timeout: Union[
|
|
2773
|
+
None,
|
|
2774
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2775
|
+
Tuple[
|
|
2776
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2777
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2778
|
+
]
|
|
2779
|
+
] = None,
|
|
2780
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2781
|
+
_content_type: Optional[StrictStr] = None,
|
|
2782
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2783
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2784
|
+
) -> ApiResponse[UpdateSynonymsResp]:
|
|
2785
|
+
"""Update Synonyms
|
|
2786
|
+
|
|
2787
|
+
Update synonyms
|
|
2788
|
+
|
|
2789
|
+
:param update_synonyms: (required)
|
|
2790
|
+
:type update_synonyms: UpdateSynonyms
|
|
2791
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2792
|
+
number provided, it will be total request
|
|
2793
|
+
timeout. It can also be a pair (tuple) of
|
|
2794
|
+
(connection, read) timeouts.
|
|
2795
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2796
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2797
|
+
request; this effectively ignores the
|
|
2798
|
+
authentication in the spec for a single request.
|
|
2799
|
+
:type _request_auth: dict, optional
|
|
2800
|
+
:param _content_type: force content-type for the request.
|
|
2801
|
+
:type _content_type: str, Optional
|
|
2802
|
+
:param _headers: set to override the headers for a single
|
|
2803
|
+
request; this effectively ignores the headers
|
|
2804
|
+
in the spec for a single request.
|
|
2805
|
+
:type _headers: dict, optional
|
|
2806
|
+
:param _host_index: set to override the host_index for a single
|
|
2807
|
+
request; this effectively ignores the host_index
|
|
2808
|
+
in the spec for a single request.
|
|
2809
|
+
:type _host_index: int, optional
|
|
2810
|
+
:return: Returns the result object.
|
|
2811
|
+
""" # noqa: E501
|
|
2812
|
+
|
|
2813
|
+
_param = self._free_text_dataset_update_synonyms_serialize(
|
|
2814
|
+
update_synonyms=update_synonyms,
|
|
2815
|
+
_request_auth=_request_auth,
|
|
2816
|
+
_content_type=_content_type,
|
|
2817
|
+
_headers=_headers,
|
|
2818
|
+
_host_index=_host_index
|
|
2819
|
+
)
|
|
2820
|
+
|
|
2821
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2822
|
+
'200': "UpdateSynonymsResp",
|
|
2823
|
+
'422': "HTTPValidationError",
|
|
2824
|
+
}
|
|
2825
|
+
response_data = self.api_client.call_api(
|
|
2826
|
+
*_param,
|
|
2827
|
+
_request_timeout=_request_timeout
|
|
2828
|
+
)
|
|
2829
|
+
response_data.read()
|
|
2830
|
+
return self.api_client.response_deserialize(
|
|
2831
|
+
response_data=response_data,
|
|
2832
|
+
response_types_map=_response_types_map,
|
|
2833
|
+
)
|
|
2834
|
+
|
|
2835
|
+
|
|
2836
|
+
@validate_call
|
|
2837
|
+
def free_text_dataset_update_synonyms_without_preload_content(
|
|
2838
|
+
self,
|
|
2839
|
+
update_synonyms: UpdateSynonyms,
|
|
2840
|
+
_request_timeout: Union[
|
|
2841
|
+
None,
|
|
2842
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2843
|
+
Tuple[
|
|
2844
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2845
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2846
|
+
]
|
|
2847
|
+
] = None,
|
|
2848
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2849
|
+
_content_type: Optional[StrictStr] = None,
|
|
2850
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2851
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2852
|
+
) -> RESTResponseType:
|
|
2853
|
+
"""Update Synonyms
|
|
2854
|
+
|
|
2855
|
+
Update synonyms
|
|
2856
|
+
|
|
2857
|
+
:param update_synonyms: (required)
|
|
2858
|
+
:type update_synonyms: UpdateSynonyms
|
|
2859
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2860
|
+
number provided, it will be total request
|
|
2861
|
+
timeout. It can also be a pair (tuple) of
|
|
2862
|
+
(connection, read) timeouts.
|
|
2863
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2864
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2865
|
+
request; this effectively ignores the
|
|
2866
|
+
authentication in the spec for a single request.
|
|
2867
|
+
:type _request_auth: dict, optional
|
|
2868
|
+
:param _content_type: force content-type for the request.
|
|
2869
|
+
:type _content_type: str, Optional
|
|
2870
|
+
:param _headers: set to override the headers for a single
|
|
2871
|
+
request; this effectively ignores the headers
|
|
2872
|
+
in the spec for a single request.
|
|
2873
|
+
:type _headers: dict, optional
|
|
2874
|
+
:param _host_index: set to override the host_index for a single
|
|
2875
|
+
request; this effectively ignores the host_index
|
|
2876
|
+
in the spec for a single request.
|
|
2877
|
+
:type _host_index: int, optional
|
|
2878
|
+
:return: Returns the result object.
|
|
2879
|
+
""" # noqa: E501
|
|
2880
|
+
|
|
2881
|
+
_param = self._free_text_dataset_update_synonyms_serialize(
|
|
2882
|
+
update_synonyms=update_synonyms,
|
|
2883
|
+
_request_auth=_request_auth,
|
|
2884
|
+
_content_type=_content_type,
|
|
2885
|
+
_headers=_headers,
|
|
2886
|
+
_host_index=_host_index
|
|
2887
|
+
)
|
|
2888
|
+
|
|
2889
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2890
|
+
'200': "UpdateSynonymsResp",
|
|
2891
|
+
'422': "HTTPValidationError",
|
|
2892
|
+
}
|
|
2893
|
+
response_data = self.api_client.call_api(
|
|
2894
|
+
*_param,
|
|
2895
|
+
_request_timeout=_request_timeout
|
|
2896
|
+
)
|
|
2897
|
+
return response_data.response
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
def _free_text_dataset_update_synonyms_serialize(
|
|
2901
|
+
self,
|
|
2902
|
+
update_synonyms,
|
|
2903
|
+
_request_auth,
|
|
2904
|
+
_content_type,
|
|
2905
|
+
_headers,
|
|
2906
|
+
_host_index,
|
|
2907
|
+
) -> RequestSerialized:
|
|
2908
|
+
|
|
2909
|
+
_host = None
|
|
2910
|
+
|
|
2911
|
+
_collection_formats: Dict[str, str] = {
|
|
2912
|
+
}
|
|
2913
|
+
|
|
2914
|
+
_path_params: Dict[str, str] = {}
|
|
2915
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2916
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2917
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2918
|
+
_files: Dict[
|
|
2919
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2920
|
+
] = {}
|
|
2921
|
+
_body_params: Optional[bytes] = None
|
|
2922
|
+
|
|
2923
|
+
# process the path parameters
|
|
2924
|
+
# process the query parameters
|
|
2925
|
+
# process the header parameters
|
|
2926
|
+
# process the form parameters
|
|
2927
|
+
# process the body parameter
|
|
2928
|
+
if update_synonyms is not None:
|
|
2929
|
+
_body_params = update_synonyms
|
|
2930
|
+
|
|
2931
|
+
|
|
2932
|
+
# set the HTTP header `Accept`
|
|
2933
|
+
if 'Accept' not in _header_params:
|
|
2934
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2935
|
+
[
|
|
2936
|
+
'application/json'
|
|
2937
|
+
]
|
|
2938
|
+
)
|
|
2939
|
+
|
|
2940
|
+
# set the HTTP header `Content-Type`
|
|
2941
|
+
if _content_type:
|
|
2942
|
+
_header_params['Content-Type'] = _content_type
|
|
2943
|
+
else:
|
|
2944
|
+
_default_content_type = (
|
|
2945
|
+
self.api_client.select_header_content_type(
|
|
2946
|
+
[
|
|
2947
|
+
'application/json'
|
|
2948
|
+
]
|
|
2949
|
+
)
|
|
2950
|
+
)
|
|
2951
|
+
if _default_content_type is not None:
|
|
2952
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2953
|
+
|
|
2954
|
+
# authentication setting
|
|
2955
|
+
_auth_settings: List[str] = [
|
|
2956
|
+
'QAnswer-Api-Key',
|
|
2957
|
+
'Bearer token'
|
|
2958
|
+
]
|
|
2959
|
+
|
|
2960
|
+
return self.api_client.param_serialize(
|
|
2961
|
+
method='POST',
|
|
2962
|
+
resource_path='/backend/api/dataset/config/synonyms/update',
|
|
2963
|
+
path_params=_path_params,
|
|
2964
|
+
query_params=_query_params,
|
|
2965
|
+
header_params=_header_params,
|
|
2966
|
+
body=_body_params,
|
|
2967
|
+
post_params=_form_params,
|
|
2968
|
+
files=_files,
|
|
2969
|
+
auth_settings=_auth_settings,
|
|
2970
|
+
collection_formats=_collection_formats,
|
|
2971
|
+
_host=_host,
|
|
2972
|
+
_request_auth=_request_auth
|
|
2973
|
+
)
|
|
2974
|
+
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
|
|
2978
|
+
@validate_call
|
|
2979
|
+
def free_text_get_default_values(
|
|
2980
|
+
self,
|
|
2981
|
+
_request_timeout: Union[
|
|
2982
|
+
None,
|
|
2983
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2984
|
+
Tuple[
|
|
2985
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2986
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2987
|
+
]
|
|
2988
|
+
] = None,
|
|
2989
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2990
|
+
_content_type: Optional[StrictStr] = None,
|
|
2991
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2992
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2993
|
+
) -> DatasetDefaultValuesModel:
|
|
2994
|
+
"""Free Text Get Default Values
|
|
2995
|
+
|
|
2996
|
+
|
|
2997
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2998
|
+
number provided, it will be total request
|
|
2999
|
+
timeout. It can also be a pair (tuple) of
|
|
3000
|
+
(connection, read) timeouts.
|
|
3001
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3002
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3003
|
+
request; this effectively ignores the
|
|
3004
|
+
authentication in the spec for a single request.
|
|
3005
|
+
:type _request_auth: dict, optional
|
|
3006
|
+
:param _content_type: force content-type for the request.
|
|
3007
|
+
:type _content_type: str, Optional
|
|
3008
|
+
:param _headers: set to override the headers for a single
|
|
3009
|
+
request; this effectively ignores the headers
|
|
3010
|
+
in the spec for a single request.
|
|
3011
|
+
:type _headers: dict, optional
|
|
3012
|
+
:param _host_index: set to override the host_index for a single
|
|
3013
|
+
request; this effectively ignores the host_index
|
|
3014
|
+
in the spec for a single request.
|
|
3015
|
+
:type _host_index: int, optional
|
|
3016
|
+
:return: Returns the result object.
|
|
3017
|
+
""" # noqa: E501
|
|
3018
|
+
|
|
3019
|
+
_param = self._free_text_get_default_values_serialize(
|
|
3020
|
+
_request_auth=_request_auth,
|
|
3021
|
+
_content_type=_content_type,
|
|
3022
|
+
_headers=_headers,
|
|
3023
|
+
_host_index=_host_index
|
|
3024
|
+
)
|
|
3025
|
+
|
|
3026
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3027
|
+
'200': "DatasetDefaultValuesModel",
|
|
3028
|
+
'404': None,
|
|
3029
|
+
}
|
|
3030
|
+
response_data = self.api_client.call_api(
|
|
3031
|
+
*_param,
|
|
3032
|
+
_request_timeout=_request_timeout
|
|
3033
|
+
)
|
|
3034
|
+
response_data.read()
|
|
3035
|
+
return self.api_client.response_deserialize(
|
|
3036
|
+
response_data=response_data,
|
|
3037
|
+
response_types_map=_response_types_map,
|
|
3038
|
+
).data
|
|
3039
|
+
|
|
3040
|
+
|
|
3041
|
+
@validate_call
|
|
3042
|
+
def free_text_get_default_values_with_http_info(
|
|
3043
|
+
self,
|
|
3044
|
+
_request_timeout: Union[
|
|
3045
|
+
None,
|
|
3046
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3047
|
+
Tuple[
|
|
3048
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3049
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3050
|
+
]
|
|
3051
|
+
] = None,
|
|
3052
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3053
|
+
_content_type: Optional[StrictStr] = None,
|
|
3054
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3055
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3056
|
+
) -> ApiResponse[DatasetDefaultValuesModel]:
|
|
3057
|
+
"""Free Text Get Default Values
|
|
3058
|
+
|
|
3059
|
+
|
|
3060
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3061
|
+
number provided, it will be total request
|
|
3062
|
+
timeout. It can also be a pair (tuple) of
|
|
3063
|
+
(connection, read) timeouts.
|
|
3064
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3065
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3066
|
+
request; this effectively ignores the
|
|
3067
|
+
authentication in the spec for a single request.
|
|
3068
|
+
:type _request_auth: dict, optional
|
|
3069
|
+
:param _content_type: force content-type for the request.
|
|
3070
|
+
:type _content_type: str, Optional
|
|
3071
|
+
:param _headers: set to override the headers for a single
|
|
3072
|
+
request; this effectively ignores the headers
|
|
3073
|
+
in the spec for a single request.
|
|
3074
|
+
:type _headers: dict, optional
|
|
3075
|
+
:param _host_index: set to override the host_index for a single
|
|
3076
|
+
request; this effectively ignores the host_index
|
|
3077
|
+
in the spec for a single request.
|
|
3078
|
+
:type _host_index: int, optional
|
|
3079
|
+
:return: Returns the result object.
|
|
3080
|
+
""" # noqa: E501
|
|
3081
|
+
|
|
3082
|
+
_param = self._free_text_get_default_values_serialize(
|
|
3083
|
+
_request_auth=_request_auth,
|
|
3084
|
+
_content_type=_content_type,
|
|
3085
|
+
_headers=_headers,
|
|
3086
|
+
_host_index=_host_index
|
|
3087
|
+
)
|
|
3088
|
+
|
|
3089
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3090
|
+
'200': "DatasetDefaultValuesModel",
|
|
3091
|
+
'404': None,
|
|
3092
|
+
}
|
|
3093
|
+
response_data = self.api_client.call_api(
|
|
3094
|
+
*_param,
|
|
3095
|
+
_request_timeout=_request_timeout
|
|
3096
|
+
)
|
|
3097
|
+
response_data.read()
|
|
3098
|
+
return self.api_client.response_deserialize(
|
|
3099
|
+
response_data=response_data,
|
|
3100
|
+
response_types_map=_response_types_map,
|
|
3101
|
+
)
|
|
3102
|
+
|
|
3103
|
+
|
|
3104
|
+
@validate_call
|
|
3105
|
+
def free_text_get_default_values_without_preload_content(
|
|
3106
|
+
self,
|
|
3107
|
+
_request_timeout: Union[
|
|
3108
|
+
None,
|
|
3109
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3110
|
+
Tuple[
|
|
3111
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3112
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3113
|
+
]
|
|
3114
|
+
] = None,
|
|
3115
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3116
|
+
_content_type: Optional[StrictStr] = None,
|
|
3117
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3118
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3119
|
+
) -> RESTResponseType:
|
|
3120
|
+
"""Free Text Get Default Values
|
|
3121
|
+
|
|
3122
|
+
|
|
3123
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3124
|
+
number provided, it will be total request
|
|
3125
|
+
timeout. It can also be a pair (tuple) of
|
|
3126
|
+
(connection, read) timeouts.
|
|
3127
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3128
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3129
|
+
request; this effectively ignores the
|
|
3130
|
+
authentication in the spec for a single request.
|
|
3131
|
+
:type _request_auth: dict, optional
|
|
3132
|
+
:param _content_type: force content-type for the request.
|
|
3133
|
+
:type _content_type: str, Optional
|
|
3134
|
+
:param _headers: set to override the headers for a single
|
|
3135
|
+
request; this effectively ignores the headers
|
|
3136
|
+
in the spec for a single request.
|
|
3137
|
+
:type _headers: dict, optional
|
|
3138
|
+
:param _host_index: set to override the host_index for a single
|
|
3139
|
+
request; this effectively ignores the host_index
|
|
3140
|
+
in the spec for a single request.
|
|
3141
|
+
:type _host_index: int, optional
|
|
3142
|
+
:return: Returns the result object.
|
|
3143
|
+
""" # noqa: E501
|
|
3144
|
+
|
|
3145
|
+
_param = self._free_text_get_default_values_serialize(
|
|
3146
|
+
_request_auth=_request_auth,
|
|
3147
|
+
_content_type=_content_type,
|
|
3148
|
+
_headers=_headers,
|
|
3149
|
+
_host_index=_host_index
|
|
3150
|
+
)
|
|
3151
|
+
|
|
3152
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3153
|
+
'200': "DatasetDefaultValuesModel",
|
|
3154
|
+
'404': None,
|
|
3155
|
+
}
|
|
3156
|
+
response_data = self.api_client.call_api(
|
|
3157
|
+
*_param,
|
|
3158
|
+
_request_timeout=_request_timeout
|
|
3159
|
+
)
|
|
3160
|
+
return response_data.response
|
|
3161
|
+
|
|
3162
|
+
|
|
3163
|
+
def _free_text_get_default_values_serialize(
|
|
3164
|
+
self,
|
|
3165
|
+
_request_auth,
|
|
3166
|
+
_content_type,
|
|
3167
|
+
_headers,
|
|
3168
|
+
_host_index,
|
|
3169
|
+
) -> RequestSerialized:
|
|
3170
|
+
|
|
3171
|
+
_host = None
|
|
3172
|
+
|
|
3173
|
+
_collection_formats: Dict[str, str] = {
|
|
3174
|
+
}
|
|
3175
|
+
|
|
3176
|
+
_path_params: Dict[str, str] = {}
|
|
3177
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3178
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3179
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3180
|
+
_files: Dict[
|
|
3181
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3182
|
+
] = {}
|
|
3183
|
+
_body_params: Optional[bytes] = None
|
|
3184
|
+
|
|
3185
|
+
# process the path parameters
|
|
3186
|
+
# process the query parameters
|
|
3187
|
+
# process the header parameters
|
|
3188
|
+
# process the form parameters
|
|
3189
|
+
# process the body parameter
|
|
3190
|
+
|
|
3191
|
+
|
|
3192
|
+
# set the HTTP header `Accept`
|
|
3193
|
+
if 'Accept' not in _header_params:
|
|
3194
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3195
|
+
[
|
|
3196
|
+
'application/json'
|
|
3197
|
+
]
|
|
3198
|
+
)
|
|
3199
|
+
|
|
3200
|
+
|
|
3201
|
+
# authentication setting
|
|
3202
|
+
_auth_settings: List[str] = [
|
|
3203
|
+
'QAnswer-Api-Key',
|
|
3204
|
+
'Bearer token'
|
|
3205
|
+
]
|
|
3206
|
+
|
|
3207
|
+
return self.api_client.param_serialize(
|
|
3208
|
+
method='GET',
|
|
3209
|
+
resource_path='/backend/api/dataset/config/default-values',
|
|
3210
|
+
path_params=_path_params,
|
|
3211
|
+
query_params=_query_params,
|
|
3212
|
+
header_params=_header_params,
|
|
3213
|
+
body=_body_params,
|
|
3214
|
+
post_params=_form_params,
|
|
3215
|
+
files=_files,
|
|
3216
|
+
auth_settings=_auth_settings,
|
|
3217
|
+
collection_formats=_collection_formats,
|
|
3218
|
+
_host=_host,
|
|
3219
|
+
_request_auth=_request_auth
|
|
3220
|
+
)
|
|
3221
|
+
|
|
3222
|
+
|
|
3223
|
+
|
|
3224
|
+
|
|
3225
|
+
@validate_call
|
|
3226
|
+
def free_text_logs_visibility_preferences_available_choices(
|
|
3227
|
+
self,
|
|
3228
|
+
_request_timeout: Union[
|
|
3229
|
+
None,
|
|
3230
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3231
|
+
Tuple[
|
|
3232
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3233
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3234
|
+
]
|
|
3235
|
+
] = None,
|
|
3236
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3237
|
+
_content_type: Optional[StrictStr] = None,
|
|
3238
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3239
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3240
|
+
) -> List[AvailableLogsVisibilityPolicy]:
|
|
3241
|
+
"""Free Text Logs Visibility Preferences Available Choices
|
|
3242
|
+
|
|
3243
|
+
|
|
3244
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3245
|
+
number provided, it will be total request
|
|
3246
|
+
timeout. It can also be a pair (tuple) of
|
|
3247
|
+
(connection, read) timeouts.
|
|
3248
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3249
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3250
|
+
request; this effectively ignores the
|
|
3251
|
+
authentication in the spec for a single request.
|
|
3252
|
+
:type _request_auth: dict, optional
|
|
3253
|
+
:param _content_type: force content-type for the request.
|
|
3254
|
+
:type _content_type: str, Optional
|
|
3255
|
+
:param _headers: set to override the headers for a single
|
|
3256
|
+
request; this effectively ignores the headers
|
|
3257
|
+
in the spec for a single request.
|
|
3258
|
+
:type _headers: dict, optional
|
|
3259
|
+
:param _host_index: set to override the host_index for a single
|
|
3260
|
+
request; this effectively ignores the host_index
|
|
3261
|
+
in the spec for a single request.
|
|
3262
|
+
:type _host_index: int, optional
|
|
3263
|
+
:return: Returns the result object.
|
|
3264
|
+
""" # noqa: E501
|
|
3265
|
+
|
|
3266
|
+
_param = self._free_text_logs_visibility_preferences_available_choices_serialize(
|
|
3267
|
+
_request_auth=_request_auth,
|
|
3268
|
+
_content_type=_content_type,
|
|
3269
|
+
_headers=_headers,
|
|
3270
|
+
_host_index=_host_index
|
|
3271
|
+
)
|
|
3272
|
+
|
|
3273
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3274
|
+
'200': "List[AvailableLogsVisibilityPolicy]",
|
|
3275
|
+
'404': None,
|
|
3276
|
+
}
|
|
3277
|
+
response_data = self.api_client.call_api(
|
|
3278
|
+
*_param,
|
|
3279
|
+
_request_timeout=_request_timeout
|
|
3280
|
+
)
|
|
3281
|
+
response_data.read()
|
|
3282
|
+
return self.api_client.response_deserialize(
|
|
3283
|
+
response_data=response_data,
|
|
3284
|
+
response_types_map=_response_types_map,
|
|
3285
|
+
).data
|
|
3286
|
+
|
|
3287
|
+
|
|
3288
|
+
@validate_call
|
|
3289
|
+
def free_text_logs_visibility_preferences_available_choices_with_http_info(
|
|
3290
|
+
self,
|
|
3291
|
+
_request_timeout: Union[
|
|
3292
|
+
None,
|
|
3293
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3294
|
+
Tuple[
|
|
3295
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3296
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3297
|
+
]
|
|
3298
|
+
] = None,
|
|
3299
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3300
|
+
_content_type: Optional[StrictStr] = None,
|
|
3301
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3302
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3303
|
+
) -> ApiResponse[List[AvailableLogsVisibilityPolicy]]:
|
|
3304
|
+
"""Free Text Logs Visibility Preferences Available Choices
|
|
3305
|
+
|
|
3306
|
+
|
|
3307
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3308
|
+
number provided, it will be total request
|
|
3309
|
+
timeout. It can also be a pair (tuple) of
|
|
3310
|
+
(connection, read) timeouts.
|
|
3311
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3312
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3313
|
+
request; this effectively ignores the
|
|
3314
|
+
authentication in the spec for a single request.
|
|
3315
|
+
:type _request_auth: dict, optional
|
|
3316
|
+
:param _content_type: force content-type for the request.
|
|
3317
|
+
:type _content_type: str, Optional
|
|
3318
|
+
:param _headers: set to override the headers for a single
|
|
3319
|
+
request; this effectively ignores the headers
|
|
3320
|
+
in the spec for a single request.
|
|
3321
|
+
:type _headers: dict, optional
|
|
3322
|
+
:param _host_index: set to override the host_index for a single
|
|
3323
|
+
request; this effectively ignores the host_index
|
|
3324
|
+
in the spec for a single request.
|
|
3325
|
+
:type _host_index: int, optional
|
|
3326
|
+
:return: Returns the result object.
|
|
3327
|
+
""" # noqa: E501
|
|
3328
|
+
|
|
3329
|
+
_param = self._free_text_logs_visibility_preferences_available_choices_serialize(
|
|
3330
|
+
_request_auth=_request_auth,
|
|
3331
|
+
_content_type=_content_type,
|
|
3332
|
+
_headers=_headers,
|
|
3333
|
+
_host_index=_host_index
|
|
3334
|
+
)
|
|
3335
|
+
|
|
3336
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3337
|
+
'200': "List[AvailableLogsVisibilityPolicy]",
|
|
3338
|
+
'404': None,
|
|
3339
|
+
}
|
|
3340
|
+
response_data = self.api_client.call_api(
|
|
3341
|
+
*_param,
|
|
3342
|
+
_request_timeout=_request_timeout
|
|
3343
|
+
)
|
|
3344
|
+
response_data.read()
|
|
3345
|
+
return self.api_client.response_deserialize(
|
|
3346
|
+
response_data=response_data,
|
|
3347
|
+
response_types_map=_response_types_map,
|
|
3348
|
+
)
|
|
3349
|
+
|
|
3350
|
+
|
|
3351
|
+
@validate_call
|
|
3352
|
+
def free_text_logs_visibility_preferences_available_choices_without_preload_content(
|
|
3353
|
+
self,
|
|
3354
|
+
_request_timeout: Union[
|
|
3355
|
+
None,
|
|
3356
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3357
|
+
Tuple[
|
|
3358
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3359
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3360
|
+
]
|
|
3361
|
+
] = None,
|
|
3362
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3363
|
+
_content_type: Optional[StrictStr] = None,
|
|
3364
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3365
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3366
|
+
) -> RESTResponseType:
|
|
3367
|
+
"""Free Text Logs Visibility Preferences Available Choices
|
|
3368
|
+
|
|
3369
|
+
|
|
3370
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3371
|
+
number provided, it will be total request
|
|
3372
|
+
timeout. It can also be a pair (tuple) of
|
|
3373
|
+
(connection, read) timeouts.
|
|
3374
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3375
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3376
|
+
request; this effectively ignores the
|
|
3377
|
+
authentication in the spec for a single request.
|
|
3378
|
+
:type _request_auth: dict, optional
|
|
3379
|
+
:param _content_type: force content-type for the request.
|
|
3380
|
+
:type _content_type: str, Optional
|
|
3381
|
+
:param _headers: set to override the headers for a single
|
|
3382
|
+
request; this effectively ignores the headers
|
|
3383
|
+
in the spec for a single request.
|
|
3384
|
+
:type _headers: dict, optional
|
|
3385
|
+
:param _host_index: set to override the host_index for a single
|
|
3386
|
+
request; this effectively ignores the host_index
|
|
3387
|
+
in the spec for a single request.
|
|
3388
|
+
:type _host_index: int, optional
|
|
3389
|
+
:return: Returns the result object.
|
|
3390
|
+
""" # noqa: E501
|
|
3391
|
+
|
|
3392
|
+
_param = self._free_text_logs_visibility_preferences_available_choices_serialize(
|
|
3393
|
+
_request_auth=_request_auth,
|
|
3394
|
+
_content_type=_content_type,
|
|
3395
|
+
_headers=_headers,
|
|
3396
|
+
_host_index=_host_index
|
|
3397
|
+
)
|
|
3398
|
+
|
|
3399
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3400
|
+
'200': "List[AvailableLogsVisibilityPolicy]",
|
|
3401
|
+
'404': None,
|
|
3402
|
+
}
|
|
3403
|
+
response_data = self.api_client.call_api(
|
|
3404
|
+
*_param,
|
|
3405
|
+
_request_timeout=_request_timeout
|
|
3406
|
+
)
|
|
3407
|
+
return response_data.response
|
|
3408
|
+
|
|
3409
|
+
|
|
3410
|
+
def _free_text_logs_visibility_preferences_available_choices_serialize(
|
|
3411
|
+
self,
|
|
3412
|
+
_request_auth,
|
|
3413
|
+
_content_type,
|
|
3414
|
+
_headers,
|
|
3415
|
+
_host_index,
|
|
3416
|
+
) -> RequestSerialized:
|
|
3417
|
+
|
|
3418
|
+
_host = None
|
|
3419
|
+
|
|
3420
|
+
_collection_formats: Dict[str, str] = {
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
_path_params: Dict[str, str] = {}
|
|
3424
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3425
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3426
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3427
|
+
_files: Dict[
|
|
3428
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3429
|
+
] = {}
|
|
3430
|
+
_body_params: Optional[bytes] = None
|
|
3431
|
+
|
|
3432
|
+
# process the path parameters
|
|
3433
|
+
# process the query parameters
|
|
3434
|
+
# process the header parameters
|
|
3435
|
+
# process the form parameters
|
|
3436
|
+
# process the body parameter
|
|
3437
|
+
|
|
3438
|
+
|
|
3439
|
+
# set the HTTP header `Accept`
|
|
3440
|
+
if 'Accept' not in _header_params:
|
|
3441
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3442
|
+
[
|
|
3443
|
+
'application/json'
|
|
3444
|
+
]
|
|
3445
|
+
)
|
|
3446
|
+
|
|
3447
|
+
|
|
3448
|
+
# authentication setting
|
|
3449
|
+
_auth_settings: List[str] = [
|
|
3450
|
+
'QAnswer-Api-Key',
|
|
3451
|
+
'Bearer token'
|
|
3452
|
+
]
|
|
3453
|
+
|
|
3454
|
+
return self.api_client.param_serialize(
|
|
3455
|
+
method='GET',
|
|
3456
|
+
resource_path='/backend/api/dataset/config/logs-visibility_preferences/available-choices',
|
|
3457
|
+
path_params=_path_params,
|
|
3458
|
+
query_params=_query_params,
|
|
3459
|
+
header_params=_header_params,
|
|
3460
|
+
body=_body_params,
|
|
3461
|
+
post_params=_form_params,
|
|
3462
|
+
files=_files,
|
|
3463
|
+
auth_settings=_auth_settings,
|
|
3464
|
+
collection_formats=_collection_formats,
|
|
3465
|
+
_host=_host,
|
|
3466
|
+
_request_auth=_request_auth
|
|
3467
|
+
)
|
|
3468
|
+
|
|
3469
|
+
|
|
3470
|
+
|
|
3471
|
+
|
|
3472
|
+
@validate_call
|
|
3473
|
+
def free_text_summariser_available_data_storage_preferences(
|
|
3474
|
+
self,
|
|
3475
|
+
_request_timeout: Union[
|
|
3476
|
+
None,
|
|
3477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3478
|
+
Tuple[
|
|
3479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3480
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3481
|
+
]
|
|
3482
|
+
] = None,
|
|
3483
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3484
|
+
_content_type: Optional[StrictStr] = None,
|
|
3485
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3486
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3487
|
+
) -> List[AvailableStoragePreference]:
|
|
3488
|
+
"""Free Text Summariser Available Data Storage Preferences
|
|
3489
|
+
|
|
3490
|
+
|
|
3491
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3492
|
+
number provided, it will be total request
|
|
3493
|
+
timeout. It can also be a pair (tuple) of
|
|
3494
|
+
(connection, read) timeouts.
|
|
3495
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3496
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3497
|
+
request; this effectively ignores the
|
|
3498
|
+
authentication in the spec for a single request.
|
|
3499
|
+
:type _request_auth: dict, optional
|
|
3500
|
+
:param _content_type: force content-type for the request.
|
|
3501
|
+
:type _content_type: str, Optional
|
|
3502
|
+
:param _headers: set to override the headers for a single
|
|
3503
|
+
request; this effectively ignores the headers
|
|
3504
|
+
in the spec for a single request.
|
|
3505
|
+
:type _headers: dict, optional
|
|
3506
|
+
:param _host_index: set to override the host_index for a single
|
|
3507
|
+
request; this effectively ignores the host_index
|
|
3508
|
+
in the spec for a single request.
|
|
3509
|
+
:type _host_index: int, optional
|
|
3510
|
+
:return: Returns the result object.
|
|
3511
|
+
""" # noqa: E501
|
|
3512
|
+
|
|
3513
|
+
_param = self._free_text_summariser_available_data_storage_preferences_serialize(
|
|
3514
|
+
_request_auth=_request_auth,
|
|
3515
|
+
_content_type=_content_type,
|
|
3516
|
+
_headers=_headers,
|
|
3517
|
+
_host_index=_host_index
|
|
3518
|
+
)
|
|
3519
|
+
|
|
3520
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3521
|
+
'200': "List[AvailableStoragePreference]",
|
|
3522
|
+
'404': None,
|
|
3523
|
+
}
|
|
3524
|
+
response_data = self.api_client.call_api(
|
|
3525
|
+
*_param,
|
|
3526
|
+
_request_timeout=_request_timeout
|
|
3527
|
+
)
|
|
3528
|
+
response_data.read()
|
|
3529
|
+
return self.api_client.response_deserialize(
|
|
3530
|
+
response_data=response_data,
|
|
3531
|
+
response_types_map=_response_types_map,
|
|
3532
|
+
).data
|
|
3533
|
+
|
|
3534
|
+
|
|
3535
|
+
@validate_call
|
|
3536
|
+
def free_text_summariser_available_data_storage_preferences_with_http_info(
|
|
3537
|
+
self,
|
|
3538
|
+
_request_timeout: Union[
|
|
3539
|
+
None,
|
|
3540
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3541
|
+
Tuple[
|
|
3542
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3543
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3544
|
+
]
|
|
3545
|
+
] = None,
|
|
3546
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3547
|
+
_content_type: Optional[StrictStr] = None,
|
|
3548
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3549
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3550
|
+
) -> ApiResponse[List[AvailableStoragePreference]]:
|
|
3551
|
+
"""Free Text Summariser Available Data Storage Preferences
|
|
3552
|
+
|
|
3553
|
+
|
|
3554
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3555
|
+
number provided, it will be total request
|
|
3556
|
+
timeout. It can also be a pair (tuple) of
|
|
3557
|
+
(connection, read) timeouts.
|
|
3558
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3559
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3560
|
+
request; this effectively ignores the
|
|
3561
|
+
authentication in the spec for a single request.
|
|
3562
|
+
:type _request_auth: dict, optional
|
|
3563
|
+
:param _content_type: force content-type for the request.
|
|
3564
|
+
:type _content_type: str, Optional
|
|
3565
|
+
:param _headers: set to override the headers for a single
|
|
3566
|
+
request; this effectively ignores the headers
|
|
3567
|
+
in the spec for a single request.
|
|
3568
|
+
:type _headers: dict, optional
|
|
3569
|
+
:param _host_index: set to override the host_index for a single
|
|
3570
|
+
request; this effectively ignores the host_index
|
|
3571
|
+
in the spec for a single request.
|
|
3572
|
+
:type _host_index: int, optional
|
|
3573
|
+
:return: Returns the result object.
|
|
3574
|
+
""" # noqa: E501
|
|
3575
|
+
|
|
3576
|
+
_param = self._free_text_summariser_available_data_storage_preferences_serialize(
|
|
3577
|
+
_request_auth=_request_auth,
|
|
3578
|
+
_content_type=_content_type,
|
|
3579
|
+
_headers=_headers,
|
|
3580
|
+
_host_index=_host_index
|
|
3581
|
+
)
|
|
3582
|
+
|
|
3583
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3584
|
+
'200': "List[AvailableStoragePreference]",
|
|
3585
|
+
'404': None,
|
|
3586
|
+
}
|
|
3587
|
+
response_data = self.api_client.call_api(
|
|
3588
|
+
*_param,
|
|
3589
|
+
_request_timeout=_request_timeout
|
|
3590
|
+
)
|
|
3591
|
+
response_data.read()
|
|
3592
|
+
return self.api_client.response_deserialize(
|
|
3593
|
+
response_data=response_data,
|
|
3594
|
+
response_types_map=_response_types_map,
|
|
3595
|
+
)
|
|
3596
|
+
|
|
3597
|
+
|
|
3598
|
+
@validate_call
|
|
3599
|
+
def free_text_summariser_available_data_storage_preferences_without_preload_content(
|
|
3600
|
+
self,
|
|
3601
|
+
_request_timeout: Union[
|
|
3602
|
+
None,
|
|
3603
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3604
|
+
Tuple[
|
|
3605
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3606
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3607
|
+
]
|
|
3608
|
+
] = None,
|
|
3609
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3610
|
+
_content_type: Optional[StrictStr] = None,
|
|
3611
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3612
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3613
|
+
) -> RESTResponseType:
|
|
3614
|
+
"""Free Text Summariser Available Data Storage Preferences
|
|
3615
|
+
|
|
3616
|
+
|
|
3617
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3618
|
+
number provided, it will be total request
|
|
3619
|
+
timeout. It can also be a pair (tuple) of
|
|
3620
|
+
(connection, read) timeouts.
|
|
3621
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3622
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3623
|
+
request; this effectively ignores the
|
|
3624
|
+
authentication in the spec for a single request.
|
|
3625
|
+
:type _request_auth: dict, optional
|
|
3626
|
+
:param _content_type: force content-type for the request.
|
|
3627
|
+
:type _content_type: str, Optional
|
|
3628
|
+
:param _headers: set to override the headers for a single
|
|
3629
|
+
request; this effectively ignores the headers
|
|
3630
|
+
in the spec for a single request.
|
|
3631
|
+
:type _headers: dict, optional
|
|
3632
|
+
:param _host_index: set to override the host_index for a single
|
|
3633
|
+
request; this effectively ignores the host_index
|
|
3634
|
+
in the spec for a single request.
|
|
3635
|
+
:type _host_index: int, optional
|
|
3636
|
+
:return: Returns the result object.
|
|
3637
|
+
""" # noqa: E501
|
|
3638
|
+
|
|
3639
|
+
_param = self._free_text_summariser_available_data_storage_preferences_serialize(
|
|
3640
|
+
_request_auth=_request_auth,
|
|
3641
|
+
_content_type=_content_type,
|
|
3642
|
+
_headers=_headers,
|
|
3643
|
+
_host_index=_host_index
|
|
3644
|
+
)
|
|
3645
|
+
|
|
3646
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3647
|
+
'200': "List[AvailableStoragePreference]",
|
|
3648
|
+
'404': None,
|
|
3649
|
+
}
|
|
3650
|
+
response_data = self.api_client.call_api(
|
|
3651
|
+
*_param,
|
|
3652
|
+
_request_timeout=_request_timeout
|
|
3653
|
+
)
|
|
3654
|
+
return response_data.response
|
|
3655
|
+
|
|
3656
|
+
|
|
3657
|
+
def _free_text_summariser_available_data_storage_preferences_serialize(
|
|
3658
|
+
self,
|
|
3659
|
+
_request_auth,
|
|
3660
|
+
_content_type,
|
|
3661
|
+
_headers,
|
|
3662
|
+
_host_index,
|
|
3663
|
+
) -> RequestSerialized:
|
|
3664
|
+
|
|
3665
|
+
_host = None
|
|
3666
|
+
|
|
3667
|
+
_collection_formats: Dict[str, str] = {
|
|
3668
|
+
}
|
|
3669
|
+
|
|
3670
|
+
_path_params: Dict[str, str] = {}
|
|
3671
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3672
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3673
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3674
|
+
_files: Dict[
|
|
3675
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3676
|
+
] = {}
|
|
3677
|
+
_body_params: Optional[bytes] = None
|
|
3678
|
+
|
|
3679
|
+
# process the path parameters
|
|
3680
|
+
# process the query parameters
|
|
3681
|
+
# process the header parameters
|
|
3682
|
+
# process the form parameters
|
|
3683
|
+
# process the body parameter
|
|
3684
|
+
|
|
3685
|
+
|
|
3686
|
+
# set the HTTP header `Accept`
|
|
3687
|
+
if 'Accept' not in _header_params:
|
|
3688
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3689
|
+
[
|
|
3690
|
+
'application/json'
|
|
3691
|
+
]
|
|
3692
|
+
)
|
|
3693
|
+
|
|
3694
|
+
|
|
3695
|
+
# authentication setting
|
|
3696
|
+
_auth_settings: List[str] = [
|
|
3697
|
+
'QAnswer-Api-Key',
|
|
3698
|
+
'Bearer token'
|
|
3699
|
+
]
|
|
3700
|
+
|
|
3701
|
+
return self.api_client.param_serialize(
|
|
3702
|
+
method='GET',
|
|
3703
|
+
resource_path='/backend/api/dataset/config/data-storage-preferences/available-choices',
|
|
3704
|
+
path_params=_path_params,
|
|
3705
|
+
query_params=_query_params,
|
|
3706
|
+
header_params=_header_params,
|
|
3707
|
+
body=_body_params,
|
|
3708
|
+
post_params=_form_params,
|
|
3709
|
+
files=_files,
|
|
3710
|
+
auth_settings=_auth_settings,
|
|
3711
|
+
collection_formats=_collection_formats,
|
|
3712
|
+
_host=_host,
|
|
3713
|
+
_request_auth=_request_auth
|
|
3714
|
+
)
|
|
3715
|
+
|
|
3716
|
+
|
|
3717
|
+
|
|
3718
|
+
|
|
3719
|
+
@validate_call
|
|
3720
|
+
def get_synonyms_compat(
|
|
3721
|
+
self,
|
|
3722
|
+
username: Annotated[Optional[StrictStr], Field(description="Username")] = None,
|
|
3723
|
+
dataset: Annotated[Optional[StrictStr], Field(description="Dataset")] = None,
|
|
3724
|
+
organization_id: Optional[StrictInt] = None,
|
|
3725
|
+
_request_timeout: Union[
|
|
3726
|
+
None,
|
|
3727
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3728
|
+
Tuple[
|
|
3729
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3730
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3731
|
+
]
|
|
3732
|
+
] = None,
|
|
3733
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3734
|
+
_content_type: Optional[StrictStr] = None,
|
|
3735
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3736
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3737
|
+
) -> RetreiveAllSynonymsResp:
|
|
3738
|
+
"""Get Synonyms Compat
|
|
3739
|
+
|
|
3740
|
+
Synonyms specified for a dataset (Java compat path)
|
|
3741
|
+
|
|
3742
|
+
:param username: Username
|
|
3743
|
+
:type username: str
|
|
3744
|
+
:param dataset: Dataset
|
|
3745
|
+
:type dataset: str
|
|
3746
|
+
:param organization_id:
|
|
3747
|
+
:type organization_id: int
|
|
3748
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3749
|
+
number provided, it will be total request
|
|
3750
|
+
timeout. It can also be a pair (tuple) of
|
|
3751
|
+
(connection, read) timeouts.
|
|
3752
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3753
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3754
|
+
request; this effectively ignores the
|
|
3755
|
+
authentication in the spec for a single request.
|
|
3756
|
+
:type _request_auth: dict, optional
|
|
3757
|
+
:param _content_type: force content-type for the request.
|
|
3758
|
+
:type _content_type: str, Optional
|
|
3759
|
+
:param _headers: set to override the headers for a single
|
|
3760
|
+
request; this effectively ignores the headers
|
|
3761
|
+
in the spec for a single request.
|
|
3762
|
+
:type _headers: dict, optional
|
|
3763
|
+
:param _host_index: set to override the host_index for a single
|
|
3764
|
+
request; this effectively ignores the host_index
|
|
3765
|
+
in the spec for a single request.
|
|
3766
|
+
:type _host_index: int, optional
|
|
3767
|
+
:return: Returns the result object.
|
|
3768
|
+
""" # noqa: E501
|
|
3769
|
+
|
|
3770
|
+
_param = self._get_synonyms_compat_serialize(
|
|
3771
|
+
username=username,
|
|
3772
|
+
dataset=dataset,
|
|
3773
|
+
organization_id=organization_id,
|
|
3774
|
+
_request_auth=_request_auth,
|
|
3775
|
+
_content_type=_content_type,
|
|
3776
|
+
_headers=_headers,
|
|
3777
|
+
_host_index=_host_index
|
|
3778
|
+
)
|
|
3779
|
+
|
|
3780
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3781
|
+
'200': "RetreiveAllSynonymsResp",
|
|
3782
|
+
'422': "HTTPValidationError",
|
|
3783
|
+
}
|
|
3784
|
+
response_data = self.api_client.call_api(
|
|
3785
|
+
*_param,
|
|
3786
|
+
_request_timeout=_request_timeout
|
|
3787
|
+
)
|
|
3788
|
+
response_data.read()
|
|
3789
|
+
return self.api_client.response_deserialize(
|
|
3790
|
+
response_data=response_data,
|
|
3791
|
+
response_types_map=_response_types_map,
|
|
3792
|
+
).data
|
|
3793
|
+
|
|
3794
|
+
|
|
3795
|
+
@validate_call
|
|
3796
|
+
def get_synonyms_compat_with_http_info(
|
|
3797
|
+
self,
|
|
3798
|
+
username: Annotated[Optional[StrictStr], Field(description="Username")] = None,
|
|
3799
|
+
dataset: Annotated[Optional[StrictStr], Field(description="Dataset")] = None,
|
|
3800
|
+
organization_id: Optional[StrictInt] = None,
|
|
3801
|
+
_request_timeout: Union[
|
|
3802
|
+
None,
|
|
3803
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3804
|
+
Tuple[
|
|
3805
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3806
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3807
|
+
]
|
|
3808
|
+
] = None,
|
|
3809
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3810
|
+
_content_type: Optional[StrictStr] = None,
|
|
3811
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3812
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3813
|
+
) -> ApiResponse[RetreiveAllSynonymsResp]:
|
|
3814
|
+
"""Get Synonyms Compat
|
|
3815
|
+
|
|
3816
|
+
Synonyms specified for a dataset (Java compat path)
|
|
3817
|
+
|
|
3818
|
+
:param username: Username
|
|
3819
|
+
:type username: str
|
|
3820
|
+
:param dataset: Dataset
|
|
3821
|
+
:type dataset: str
|
|
3822
|
+
:param organization_id:
|
|
3823
|
+
:type organization_id: int
|
|
3824
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3825
|
+
number provided, it will be total request
|
|
3826
|
+
timeout. It can also be a pair (tuple) of
|
|
3827
|
+
(connection, read) timeouts.
|
|
3828
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3829
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3830
|
+
request; this effectively ignores the
|
|
3831
|
+
authentication in the spec for a single request.
|
|
3832
|
+
:type _request_auth: dict, optional
|
|
3833
|
+
:param _content_type: force content-type for the request.
|
|
3834
|
+
:type _content_type: str, Optional
|
|
3835
|
+
:param _headers: set to override the headers for a single
|
|
3836
|
+
request; this effectively ignores the headers
|
|
3837
|
+
in the spec for a single request.
|
|
3838
|
+
:type _headers: dict, optional
|
|
3839
|
+
:param _host_index: set to override the host_index for a single
|
|
3840
|
+
request; this effectively ignores the host_index
|
|
3841
|
+
in the spec for a single request.
|
|
3842
|
+
:type _host_index: int, optional
|
|
3843
|
+
:return: Returns the result object.
|
|
3844
|
+
""" # noqa: E501
|
|
3845
|
+
|
|
3846
|
+
_param = self._get_synonyms_compat_serialize(
|
|
3847
|
+
username=username,
|
|
3848
|
+
dataset=dataset,
|
|
3849
|
+
organization_id=organization_id,
|
|
3850
|
+
_request_auth=_request_auth,
|
|
3851
|
+
_content_type=_content_type,
|
|
3852
|
+
_headers=_headers,
|
|
3853
|
+
_host_index=_host_index
|
|
3854
|
+
)
|
|
3855
|
+
|
|
3856
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3857
|
+
'200': "RetreiveAllSynonymsResp",
|
|
3858
|
+
'422': "HTTPValidationError",
|
|
3859
|
+
}
|
|
3860
|
+
response_data = self.api_client.call_api(
|
|
3861
|
+
*_param,
|
|
3862
|
+
_request_timeout=_request_timeout
|
|
3863
|
+
)
|
|
3864
|
+
response_data.read()
|
|
3865
|
+
return self.api_client.response_deserialize(
|
|
3866
|
+
response_data=response_data,
|
|
3867
|
+
response_types_map=_response_types_map,
|
|
3868
|
+
)
|
|
3869
|
+
|
|
3870
|
+
|
|
3871
|
+
@validate_call
|
|
3872
|
+
def get_synonyms_compat_without_preload_content(
|
|
3873
|
+
self,
|
|
3874
|
+
username: Annotated[Optional[StrictStr], Field(description="Username")] = None,
|
|
3875
|
+
dataset: Annotated[Optional[StrictStr], Field(description="Dataset")] = None,
|
|
3876
|
+
organization_id: Optional[StrictInt] = None,
|
|
3877
|
+
_request_timeout: Union[
|
|
3878
|
+
None,
|
|
3879
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3880
|
+
Tuple[
|
|
3881
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3882
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3883
|
+
]
|
|
3884
|
+
] = None,
|
|
3885
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3886
|
+
_content_type: Optional[StrictStr] = None,
|
|
3887
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3888
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3889
|
+
) -> RESTResponseType:
|
|
3890
|
+
"""Get Synonyms Compat
|
|
3891
|
+
|
|
3892
|
+
Synonyms specified for a dataset (Java compat path)
|
|
3893
|
+
|
|
3894
|
+
:param username: Username
|
|
3895
|
+
:type username: str
|
|
3896
|
+
:param dataset: Dataset
|
|
3897
|
+
:type dataset: str
|
|
3898
|
+
:param organization_id:
|
|
3899
|
+
:type organization_id: int
|
|
3900
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3901
|
+
number provided, it will be total request
|
|
3902
|
+
timeout. It can also be a pair (tuple) of
|
|
3903
|
+
(connection, read) timeouts.
|
|
3904
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3905
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3906
|
+
request; this effectively ignores the
|
|
3907
|
+
authentication in the spec for a single request.
|
|
3908
|
+
:type _request_auth: dict, optional
|
|
3909
|
+
:param _content_type: force content-type for the request.
|
|
3910
|
+
:type _content_type: str, Optional
|
|
3911
|
+
:param _headers: set to override the headers for a single
|
|
3912
|
+
request; this effectively ignores the headers
|
|
3913
|
+
in the spec for a single request.
|
|
3914
|
+
:type _headers: dict, optional
|
|
3915
|
+
:param _host_index: set to override the host_index for a single
|
|
3916
|
+
request; this effectively ignores the host_index
|
|
3917
|
+
in the spec for a single request.
|
|
3918
|
+
:type _host_index: int, optional
|
|
3919
|
+
:return: Returns the result object.
|
|
3920
|
+
""" # noqa: E501
|
|
3921
|
+
|
|
3922
|
+
_param = self._get_synonyms_compat_serialize(
|
|
3923
|
+
username=username,
|
|
3924
|
+
dataset=dataset,
|
|
3925
|
+
organization_id=organization_id,
|
|
3926
|
+
_request_auth=_request_auth,
|
|
3927
|
+
_content_type=_content_type,
|
|
3928
|
+
_headers=_headers,
|
|
3929
|
+
_host_index=_host_index
|
|
3930
|
+
)
|
|
3931
|
+
|
|
3932
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3933
|
+
'200': "RetreiveAllSynonymsResp",
|
|
3934
|
+
'422': "HTTPValidationError",
|
|
3935
|
+
}
|
|
3936
|
+
response_data = self.api_client.call_api(
|
|
3937
|
+
*_param,
|
|
3938
|
+
_request_timeout=_request_timeout
|
|
3939
|
+
)
|
|
3940
|
+
return response_data.response
|
|
3941
|
+
|
|
3942
|
+
|
|
3943
|
+
def _get_synonyms_compat_serialize(
|
|
3944
|
+
self,
|
|
3945
|
+
username,
|
|
3946
|
+
dataset,
|
|
3947
|
+
organization_id,
|
|
3948
|
+
_request_auth,
|
|
3949
|
+
_content_type,
|
|
3950
|
+
_headers,
|
|
3951
|
+
_host_index,
|
|
3952
|
+
) -> RequestSerialized:
|
|
3953
|
+
|
|
3954
|
+
_host = None
|
|
3955
|
+
|
|
3956
|
+
_collection_formats: Dict[str, str] = {
|
|
3957
|
+
}
|
|
3958
|
+
|
|
3959
|
+
_path_params: Dict[str, str] = {}
|
|
3960
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3961
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3962
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3963
|
+
_files: Dict[
|
|
3964
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3965
|
+
] = {}
|
|
3966
|
+
_body_params: Optional[bytes] = None
|
|
3967
|
+
|
|
3968
|
+
# process the path parameters
|
|
3969
|
+
# process the query parameters
|
|
3970
|
+
if username is not None:
|
|
3971
|
+
|
|
3972
|
+
_query_params.append(('username', username))
|
|
3973
|
+
|
|
3974
|
+
if dataset is not None:
|
|
3975
|
+
|
|
3976
|
+
_query_params.append(('dataset', dataset))
|
|
3977
|
+
|
|
3978
|
+
if organization_id is not None:
|
|
3979
|
+
|
|
3980
|
+
_query_params.append(('organizationId', organization_id))
|
|
3981
|
+
|
|
3982
|
+
# process the header parameters
|
|
3983
|
+
# process the form parameters
|
|
3984
|
+
# process the body parameter
|
|
3985
|
+
|
|
3986
|
+
|
|
3987
|
+
# set the HTTP header `Accept`
|
|
3988
|
+
if 'Accept' not in _header_params:
|
|
3989
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3990
|
+
[
|
|
3991
|
+
'application/json'
|
|
3992
|
+
]
|
|
3993
|
+
)
|
|
3994
|
+
|
|
3995
|
+
|
|
3996
|
+
# authentication setting
|
|
3997
|
+
_auth_settings: List[str] = [
|
|
3998
|
+
'QAnswer-Api-Key',
|
|
3999
|
+
'Bearer token'
|
|
4000
|
+
]
|
|
4001
|
+
|
|
4002
|
+
return self.api_client.param_serialize(
|
|
4003
|
+
method='GET',
|
|
4004
|
+
resource_path='/backend/api/dataset/config/synonyms',
|
|
4005
|
+
path_params=_path_params,
|
|
4006
|
+
query_params=_query_params,
|
|
4007
|
+
header_params=_header_params,
|
|
4008
|
+
body=_body_params,
|
|
4009
|
+
post_params=_form_params,
|
|
4010
|
+
files=_files,
|
|
4011
|
+
auth_settings=_auth_settings,
|
|
4012
|
+
collection_formats=_collection_formats,
|
|
4013
|
+
_host=_host,
|
|
4014
|
+
_request_auth=_request_auth
|
|
4015
|
+
)
|
|
4016
|
+
|
|
4017
|
+
|
|
4018
|
+
|
|
4019
|
+
|
|
4020
|
+
@validate_call
|
|
4021
|
+
def import_assistant_configuration_dataset(
|
|
4022
|
+
self,
|
|
4023
|
+
target_username: StrictStr,
|
|
4024
|
+
target_dataset: StrictStr,
|
|
4025
|
+
config_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Assistant bundle zip file")],
|
|
4026
|
+
_request_timeout: Union[
|
|
4027
|
+
None,
|
|
4028
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4029
|
+
Tuple[
|
|
4030
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4031
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4032
|
+
]
|
|
4033
|
+
] = None,
|
|
4034
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4035
|
+
_content_type: Optional[StrictStr] = None,
|
|
4036
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4037
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4038
|
+
) -> DatasetSchema:
|
|
4039
|
+
"""Import Assistant Configuration Dataset
|
|
4040
|
+
|
|
4041
|
+
|
|
4042
|
+
:param target_username: (required)
|
|
4043
|
+
:type target_username: str
|
|
4044
|
+
:param target_dataset: (required)
|
|
4045
|
+
:type target_dataset: str
|
|
4046
|
+
:param config_file: Assistant bundle zip file (required)
|
|
4047
|
+
:type config_file: bytearray
|
|
4048
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4049
|
+
number provided, it will be total request
|
|
4050
|
+
timeout. It can also be a pair (tuple) of
|
|
4051
|
+
(connection, read) timeouts.
|
|
4052
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4053
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4054
|
+
request; this effectively ignores the
|
|
4055
|
+
authentication in the spec for a single request.
|
|
4056
|
+
:type _request_auth: dict, optional
|
|
4057
|
+
:param _content_type: force content-type for the request.
|
|
4058
|
+
:type _content_type: str, Optional
|
|
4059
|
+
:param _headers: set to override the headers for a single
|
|
4060
|
+
request; this effectively ignores the headers
|
|
4061
|
+
in the spec for a single request.
|
|
4062
|
+
:type _headers: dict, optional
|
|
4063
|
+
:param _host_index: set to override the host_index for a single
|
|
4064
|
+
request; this effectively ignores the host_index
|
|
4065
|
+
in the spec for a single request.
|
|
4066
|
+
:type _host_index: int, optional
|
|
4067
|
+
:return: Returns the result object.
|
|
4068
|
+
""" # noqa: E501
|
|
4069
|
+
|
|
4070
|
+
_param = self._import_assistant_configuration_dataset_serialize(
|
|
4071
|
+
target_username=target_username,
|
|
4072
|
+
target_dataset=target_dataset,
|
|
4073
|
+
config_file=config_file,
|
|
4074
|
+
_request_auth=_request_auth,
|
|
4075
|
+
_content_type=_content_type,
|
|
4076
|
+
_headers=_headers,
|
|
4077
|
+
_host_index=_host_index
|
|
4078
|
+
)
|
|
4079
|
+
|
|
4080
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4081
|
+
'200': "DatasetSchema",
|
|
4082
|
+
'404': None,
|
|
4083
|
+
'422': "HTTPValidationError",
|
|
4084
|
+
}
|
|
4085
|
+
response_data = self.api_client.call_api(
|
|
4086
|
+
*_param,
|
|
4087
|
+
_request_timeout=_request_timeout
|
|
4088
|
+
)
|
|
4089
|
+
response_data.read()
|
|
4090
|
+
return self.api_client.response_deserialize(
|
|
4091
|
+
response_data=response_data,
|
|
4092
|
+
response_types_map=_response_types_map,
|
|
4093
|
+
).data
|
|
4094
|
+
|
|
4095
|
+
|
|
4096
|
+
@validate_call
|
|
4097
|
+
def import_assistant_configuration_dataset_with_http_info(
|
|
4098
|
+
self,
|
|
4099
|
+
target_username: StrictStr,
|
|
4100
|
+
target_dataset: StrictStr,
|
|
4101
|
+
config_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Assistant bundle zip file")],
|
|
4102
|
+
_request_timeout: Union[
|
|
4103
|
+
None,
|
|
4104
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4105
|
+
Tuple[
|
|
4106
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4107
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4108
|
+
]
|
|
4109
|
+
] = None,
|
|
4110
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4111
|
+
_content_type: Optional[StrictStr] = None,
|
|
4112
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4113
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4114
|
+
) -> ApiResponse[DatasetSchema]:
|
|
4115
|
+
"""Import Assistant Configuration Dataset
|
|
4116
|
+
|
|
4117
|
+
|
|
4118
|
+
:param target_username: (required)
|
|
4119
|
+
:type target_username: str
|
|
4120
|
+
:param target_dataset: (required)
|
|
4121
|
+
:type target_dataset: str
|
|
4122
|
+
:param config_file: Assistant bundle zip file (required)
|
|
4123
|
+
:type config_file: bytearray
|
|
4124
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4125
|
+
number provided, it will be total request
|
|
4126
|
+
timeout. It can also be a pair (tuple) of
|
|
4127
|
+
(connection, read) timeouts.
|
|
4128
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4129
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4130
|
+
request; this effectively ignores the
|
|
4131
|
+
authentication in the spec for a single request.
|
|
4132
|
+
:type _request_auth: dict, optional
|
|
4133
|
+
:param _content_type: force content-type for the request.
|
|
4134
|
+
:type _content_type: str, Optional
|
|
4135
|
+
:param _headers: set to override the headers for a single
|
|
4136
|
+
request; this effectively ignores the headers
|
|
4137
|
+
in the spec for a single request.
|
|
4138
|
+
:type _headers: dict, optional
|
|
4139
|
+
:param _host_index: set to override the host_index for a single
|
|
4140
|
+
request; this effectively ignores the host_index
|
|
4141
|
+
in the spec for a single request.
|
|
4142
|
+
:type _host_index: int, optional
|
|
4143
|
+
:return: Returns the result object.
|
|
4144
|
+
""" # noqa: E501
|
|
4145
|
+
|
|
4146
|
+
_param = self._import_assistant_configuration_dataset_serialize(
|
|
4147
|
+
target_username=target_username,
|
|
4148
|
+
target_dataset=target_dataset,
|
|
4149
|
+
config_file=config_file,
|
|
4150
|
+
_request_auth=_request_auth,
|
|
4151
|
+
_content_type=_content_type,
|
|
4152
|
+
_headers=_headers,
|
|
4153
|
+
_host_index=_host_index
|
|
4154
|
+
)
|
|
4155
|
+
|
|
4156
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4157
|
+
'200': "DatasetSchema",
|
|
4158
|
+
'404': None,
|
|
4159
|
+
'422': "HTTPValidationError",
|
|
4160
|
+
}
|
|
4161
|
+
response_data = self.api_client.call_api(
|
|
4162
|
+
*_param,
|
|
4163
|
+
_request_timeout=_request_timeout
|
|
4164
|
+
)
|
|
4165
|
+
response_data.read()
|
|
4166
|
+
return self.api_client.response_deserialize(
|
|
4167
|
+
response_data=response_data,
|
|
4168
|
+
response_types_map=_response_types_map,
|
|
4169
|
+
)
|
|
4170
|
+
|
|
4171
|
+
|
|
4172
|
+
@validate_call
|
|
4173
|
+
def import_assistant_configuration_dataset_without_preload_content(
|
|
4174
|
+
self,
|
|
4175
|
+
target_username: StrictStr,
|
|
4176
|
+
target_dataset: StrictStr,
|
|
4177
|
+
config_file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Assistant bundle zip file")],
|
|
4178
|
+
_request_timeout: Union[
|
|
4179
|
+
None,
|
|
4180
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4181
|
+
Tuple[
|
|
4182
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4183
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4184
|
+
]
|
|
4185
|
+
] = None,
|
|
4186
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4187
|
+
_content_type: Optional[StrictStr] = None,
|
|
4188
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4189
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4190
|
+
) -> RESTResponseType:
|
|
4191
|
+
"""Import Assistant Configuration Dataset
|
|
4192
|
+
|
|
4193
|
+
|
|
4194
|
+
:param target_username: (required)
|
|
4195
|
+
:type target_username: str
|
|
4196
|
+
:param target_dataset: (required)
|
|
4197
|
+
:type target_dataset: str
|
|
4198
|
+
:param config_file: Assistant bundle zip file (required)
|
|
4199
|
+
:type config_file: bytearray
|
|
4200
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4201
|
+
number provided, it will be total request
|
|
4202
|
+
timeout. It can also be a pair (tuple) of
|
|
4203
|
+
(connection, read) timeouts.
|
|
4204
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4205
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4206
|
+
request; this effectively ignores the
|
|
4207
|
+
authentication in the spec for a single request.
|
|
4208
|
+
:type _request_auth: dict, optional
|
|
4209
|
+
:param _content_type: force content-type for the request.
|
|
4210
|
+
:type _content_type: str, Optional
|
|
4211
|
+
:param _headers: set to override the headers for a single
|
|
4212
|
+
request; this effectively ignores the headers
|
|
4213
|
+
in the spec for a single request.
|
|
4214
|
+
:type _headers: dict, optional
|
|
4215
|
+
:param _host_index: set to override the host_index for a single
|
|
4216
|
+
request; this effectively ignores the host_index
|
|
4217
|
+
in the spec for a single request.
|
|
4218
|
+
:type _host_index: int, optional
|
|
4219
|
+
:return: Returns the result object.
|
|
4220
|
+
""" # noqa: E501
|
|
4221
|
+
|
|
4222
|
+
_param = self._import_assistant_configuration_dataset_serialize(
|
|
4223
|
+
target_username=target_username,
|
|
4224
|
+
target_dataset=target_dataset,
|
|
4225
|
+
config_file=config_file,
|
|
4226
|
+
_request_auth=_request_auth,
|
|
4227
|
+
_content_type=_content_type,
|
|
4228
|
+
_headers=_headers,
|
|
4229
|
+
_host_index=_host_index
|
|
4230
|
+
)
|
|
4231
|
+
|
|
4232
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4233
|
+
'200': "DatasetSchema",
|
|
4234
|
+
'404': None,
|
|
4235
|
+
'422': "HTTPValidationError",
|
|
4236
|
+
}
|
|
4237
|
+
response_data = self.api_client.call_api(
|
|
4238
|
+
*_param,
|
|
4239
|
+
_request_timeout=_request_timeout
|
|
4240
|
+
)
|
|
4241
|
+
return response_data.response
|
|
4242
|
+
|
|
4243
|
+
|
|
4244
|
+
def _import_assistant_configuration_dataset_serialize(
|
|
4245
|
+
self,
|
|
4246
|
+
target_username,
|
|
4247
|
+
target_dataset,
|
|
4248
|
+
config_file,
|
|
4249
|
+
_request_auth,
|
|
4250
|
+
_content_type,
|
|
4251
|
+
_headers,
|
|
4252
|
+
_host_index,
|
|
4253
|
+
) -> RequestSerialized:
|
|
4254
|
+
|
|
4255
|
+
_host = None
|
|
4256
|
+
|
|
4257
|
+
_collection_formats: Dict[str, str] = {
|
|
4258
|
+
}
|
|
4259
|
+
|
|
4260
|
+
_path_params: Dict[str, str] = {}
|
|
4261
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4262
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4263
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4264
|
+
_files: Dict[
|
|
4265
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4266
|
+
] = {}
|
|
4267
|
+
_body_params: Optional[bytes] = None
|
|
4268
|
+
|
|
4269
|
+
# process the path parameters
|
|
4270
|
+
# process the query parameters
|
|
4271
|
+
# process the header parameters
|
|
4272
|
+
# process the form parameters
|
|
4273
|
+
if target_username is not None:
|
|
4274
|
+
_form_params.append(('target_username', target_username))
|
|
4275
|
+
if target_dataset is not None:
|
|
4276
|
+
_form_params.append(('target_dataset', target_dataset))
|
|
4277
|
+
if config_file is not None:
|
|
4278
|
+
_files['config_file'] = config_file
|
|
4279
|
+
# process the body parameter
|
|
4280
|
+
|
|
4281
|
+
|
|
4282
|
+
# set the HTTP header `Accept`
|
|
4283
|
+
if 'Accept' not in _header_params:
|
|
4284
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4285
|
+
[
|
|
4286
|
+
'application/json'
|
|
4287
|
+
]
|
|
4288
|
+
)
|
|
4289
|
+
|
|
4290
|
+
# set the HTTP header `Content-Type`
|
|
4291
|
+
if _content_type:
|
|
4292
|
+
_header_params['Content-Type'] = _content_type
|
|
4293
|
+
else:
|
|
4294
|
+
_default_content_type = (
|
|
4295
|
+
self.api_client.select_header_content_type(
|
|
4296
|
+
[
|
|
4297
|
+
'multipart/form-data'
|
|
4298
|
+
]
|
|
4299
|
+
)
|
|
4300
|
+
)
|
|
4301
|
+
if _default_content_type is not None:
|
|
4302
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4303
|
+
|
|
4304
|
+
# authentication setting
|
|
4305
|
+
_auth_settings: List[str] = [
|
|
4306
|
+
'QAnswer-Api-Key',
|
|
4307
|
+
'Bearer token'
|
|
4308
|
+
]
|
|
4309
|
+
|
|
4310
|
+
return self.api_client.param_serialize(
|
|
4311
|
+
method='POST',
|
|
4312
|
+
resource_path='/backend/api/dataset/config/import',
|
|
4313
|
+
path_params=_path_params,
|
|
4314
|
+
query_params=_query_params,
|
|
4315
|
+
header_params=_header_params,
|
|
4316
|
+
body=_body_params,
|
|
4317
|
+
post_params=_form_params,
|
|
4318
|
+
files=_files,
|
|
4319
|
+
auth_settings=_auth_settings,
|
|
4320
|
+
collection_formats=_collection_formats,
|
|
4321
|
+
_host=_host,
|
|
4322
|
+
_request_auth=_request_auth
|
|
4323
|
+
)
|
|
4324
|
+
|
|
4325
|
+
|
|
4326
|
+
|
|
4327
|
+
|
|
4328
|
+
@validate_call
|
|
4329
|
+
def search_synonyms(
|
|
4330
|
+
self,
|
|
4331
|
+
search_term: Annotated[StrictStr, Field(description="Search term")],
|
|
4332
|
+
username: Annotated[Optional[StrictStr], Field(description="Username")] = None,
|
|
4333
|
+
dataset: Annotated[Optional[StrictStr], Field(description="Dataset name")] = None,
|
|
4334
|
+
organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
|
|
4335
|
+
_request_timeout: Union[
|
|
4336
|
+
None,
|
|
4337
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4338
|
+
Tuple[
|
|
4339
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4340
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4341
|
+
]
|
|
4342
|
+
] = None,
|
|
4343
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4344
|
+
_content_type: Optional[StrictStr] = None,
|
|
4345
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4346
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4347
|
+
) -> SearchSynonymsResp:
|
|
4348
|
+
"""Search Synonyms
|
|
4349
|
+
|
|
4350
|
+
Search synonyms
|
|
4351
|
+
|
|
4352
|
+
:param search_term: Search term (required)
|
|
4353
|
+
:type search_term: str
|
|
4354
|
+
:param username: Username
|
|
4355
|
+
:type username: str
|
|
4356
|
+
:param dataset: Dataset name
|
|
4357
|
+
:type dataset: str
|
|
4358
|
+
:param organization_id: organization identifier
|
|
4359
|
+
:type organization_id: int
|
|
4360
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4361
|
+
number provided, it will be total request
|
|
4362
|
+
timeout. It can also be a pair (tuple) of
|
|
4363
|
+
(connection, read) timeouts.
|
|
4364
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4365
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4366
|
+
request; this effectively ignores the
|
|
4367
|
+
authentication in the spec for a single request.
|
|
4368
|
+
:type _request_auth: dict, optional
|
|
4369
|
+
:param _content_type: force content-type for the request.
|
|
4370
|
+
:type _content_type: str, Optional
|
|
4371
|
+
:param _headers: set to override the headers for a single
|
|
4372
|
+
request; this effectively ignores the headers
|
|
4373
|
+
in the spec for a single request.
|
|
4374
|
+
:type _headers: dict, optional
|
|
4375
|
+
:param _host_index: set to override the host_index for a single
|
|
4376
|
+
request; this effectively ignores the host_index
|
|
4377
|
+
in the spec for a single request.
|
|
4378
|
+
:type _host_index: int, optional
|
|
4379
|
+
:return: Returns the result object.
|
|
4380
|
+
""" # noqa: E501
|
|
4381
|
+
|
|
4382
|
+
_param = self._search_synonyms_serialize(
|
|
4383
|
+
search_term=search_term,
|
|
4384
|
+
username=username,
|
|
4385
|
+
dataset=dataset,
|
|
4386
|
+
organization_id=organization_id,
|
|
4387
|
+
_request_auth=_request_auth,
|
|
4388
|
+
_content_type=_content_type,
|
|
4389
|
+
_headers=_headers,
|
|
4390
|
+
_host_index=_host_index
|
|
4391
|
+
)
|
|
4392
|
+
|
|
4393
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4394
|
+
'200': "SearchSynonymsResp",
|
|
4395
|
+
'422': "HTTPValidationError",
|
|
4396
|
+
}
|
|
4397
|
+
response_data = self.api_client.call_api(
|
|
4398
|
+
*_param,
|
|
4399
|
+
_request_timeout=_request_timeout
|
|
4400
|
+
)
|
|
4401
|
+
response_data.read()
|
|
4402
|
+
return self.api_client.response_deserialize(
|
|
4403
|
+
response_data=response_data,
|
|
4404
|
+
response_types_map=_response_types_map,
|
|
4405
|
+
).data
|
|
4406
|
+
|
|
4407
|
+
|
|
4408
|
+
@validate_call
|
|
4409
|
+
def search_synonyms_with_http_info(
|
|
4410
|
+
self,
|
|
4411
|
+
search_term: Annotated[StrictStr, Field(description="Search term")],
|
|
4412
|
+
username: Annotated[Optional[StrictStr], Field(description="Username")] = None,
|
|
4413
|
+
dataset: Annotated[Optional[StrictStr], Field(description="Dataset name")] = None,
|
|
4414
|
+
organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
|
|
4415
|
+
_request_timeout: Union[
|
|
4416
|
+
None,
|
|
4417
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4418
|
+
Tuple[
|
|
4419
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4420
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4421
|
+
]
|
|
4422
|
+
] = None,
|
|
4423
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4424
|
+
_content_type: Optional[StrictStr] = None,
|
|
4425
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4426
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4427
|
+
) -> ApiResponse[SearchSynonymsResp]:
|
|
4428
|
+
"""Search Synonyms
|
|
4429
|
+
|
|
4430
|
+
Search synonyms
|
|
4431
|
+
|
|
4432
|
+
:param search_term: Search term (required)
|
|
4433
|
+
:type search_term: str
|
|
4434
|
+
:param username: Username
|
|
4435
|
+
:type username: str
|
|
4436
|
+
:param dataset: Dataset name
|
|
4437
|
+
:type dataset: str
|
|
4438
|
+
:param organization_id: organization identifier
|
|
4439
|
+
:type organization_id: int
|
|
4440
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4441
|
+
number provided, it will be total request
|
|
4442
|
+
timeout. It can also be a pair (tuple) of
|
|
4443
|
+
(connection, read) timeouts.
|
|
4444
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4445
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4446
|
+
request; this effectively ignores the
|
|
4447
|
+
authentication in the spec for a single request.
|
|
4448
|
+
:type _request_auth: dict, optional
|
|
4449
|
+
:param _content_type: force content-type for the request.
|
|
4450
|
+
:type _content_type: str, Optional
|
|
4451
|
+
:param _headers: set to override the headers for a single
|
|
4452
|
+
request; this effectively ignores the headers
|
|
4453
|
+
in the spec for a single request.
|
|
4454
|
+
:type _headers: dict, optional
|
|
4455
|
+
:param _host_index: set to override the host_index for a single
|
|
4456
|
+
request; this effectively ignores the host_index
|
|
4457
|
+
in the spec for a single request.
|
|
4458
|
+
:type _host_index: int, optional
|
|
4459
|
+
:return: Returns the result object.
|
|
4460
|
+
""" # noqa: E501
|
|
4461
|
+
|
|
4462
|
+
_param = self._search_synonyms_serialize(
|
|
4463
|
+
search_term=search_term,
|
|
4464
|
+
username=username,
|
|
4465
|
+
dataset=dataset,
|
|
4466
|
+
organization_id=organization_id,
|
|
4467
|
+
_request_auth=_request_auth,
|
|
4468
|
+
_content_type=_content_type,
|
|
4469
|
+
_headers=_headers,
|
|
4470
|
+
_host_index=_host_index
|
|
4471
|
+
)
|
|
4472
|
+
|
|
4473
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4474
|
+
'200': "SearchSynonymsResp",
|
|
4475
|
+
'422': "HTTPValidationError",
|
|
4476
|
+
}
|
|
4477
|
+
response_data = self.api_client.call_api(
|
|
4478
|
+
*_param,
|
|
4479
|
+
_request_timeout=_request_timeout
|
|
4480
|
+
)
|
|
4481
|
+
response_data.read()
|
|
4482
|
+
return self.api_client.response_deserialize(
|
|
4483
|
+
response_data=response_data,
|
|
4484
|
+
response_types_map=_response_types_map,
|
|
4485
|
+
)
|
|
4486
|
+
|
|
4487
|
+
|
|
4488
|
+
@validate_call
|
|
4489
|
+
def search_synonyms_without_preload_content(
|
|
4490
|
+
self,
|
|
4491
|
+
search_term: Annotated[StrictStr, Field(description="Search term")],
|
|
4492
|
+
username: Annotated[Optional[StrictStr], Field(description="Username")] = None,
|
|
4493
|
+
dataset: Annotated[Optional[StrictStr], Field(description="Dataset name")] = None,
|
|
4494
|
+
organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
|
|
4495
|
+
_request_timeout: Union[
|
|
4496
|
+
None,
|
|
4497
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4498
|
+
Tuple[
|
|
4499
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4500
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4501
|
+
]
|
|
4502
|
+
] = None,
|
|
4503
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4504
|
+
_content_type: Optional[StrictStr] = None,
|
|
4505
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4506
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4507
|
+
) -> RESTResponseType:
|
|
4508
|
+
"""Search Synonyms
|
|
4509
|
+
|
|
4510
|
+
Search synonyms
|
|
4511
|
+
|
|
4512
|
+
:param search_term: Search term (required)
|
|
4513
|
+
:type search_term: str
|
|
4514
|
+
:param username: Username
|
|
4515
|
+
:type username: str
|
|
4516
|
+
:param dataset: Dataset name
|
|
4517
|
+
:type dataset: str
|
|
4518
|
+
:param organization_id: organization identifier
|
|
4519
|
+
:type organization_id: int
|
|
4520
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4521
|
+
number provided, it will be total request
|
|
4522
|
+
timeout. It can also be a pair (tuple) of
|
|
4523
|
+
(connection, read) timeouts.
|
|
4524
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4525
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4526
|
+
request; this effectively ignores the
|
|
4527
|
+
authentication in the spec for a single request.
|
|
4528
|
+
:type _request_auth: dict, optional
|
|
4529
|
+
:param _content_type: force content-type for the request.
|
|
4530
|
+
:type _content_type: str, Optional
|
|
4531
|
+
:param _headers: set to override the headers for a single
|
|
4532
|
+
request; this effectively ignores the headers
|
|
4533
|
+
in the spec for a single request.
|
|
4534
|
+
:type _headers: dict, optional
|
|
4535
|
+
:param _host_index: set to override the host_index for a single
|
|
4536
|
+
request; this effectively ignores the host_index
|
|
4537
|
+
in the spec for a single request.
|
|
4538
|
+
:type _host_index: int, optional
|
|
4539
|
+
:return: Returns the result object.
|
|
4540
|
+
""" # noqa: E501
|
|
4541
|
+
|
|
4542
|
+
_param = self._search_synonyms_serialize(
|
|
4543
|
+
search_term=search_term,
|
|
4544
|
+
username=username,
|
|
4545
|
+
dataset=dataset,
|
|
4546
|
+
organization_id=organization_id,
|
|
4547
|
+
_request_auth=_request_auth,
|
|
4548
|
+
_content_type=_content_type,
|
|
4549
|
+
_headers=_headers,
|
|
4550
|
+
_host_index=_host_index
|
|
4551
|
+
)
|
|
4552
|
+
|
|
4553
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4554
|
+
'200': "SearchSynonymsResp",
|
|
4555
|
+
'422': "HTTPValidationError",
|
|
4556
|
+
}
|
|
4557
|
+
response_data = self.api_client.call_api(
|
|
4558
|
+
*_param,
|
|
4559
|
+
_request_timeout=_request_timeout
|
|
4560
|
+
)
|
|
4561
|
+
return response_data.response
|
|
4562
|
+
|
|
4563
|
+
|
|
4564
|
+
def _search_synonyms_serialize(
|
|
4565
|
+
self,
|
|
4566
|
+
search_term,
|
|
4567
|
+
username,
|
|
4568
|
+
dataset,
|
|
4569
|
+
organization_id,
|
|
4570
|
+
_request_auth,
|
|
4571
|
+
_content_type,
|
|
4572
|
+
_headers,
|
|
4573
|
+
_host_index,
|
|
4574
|
+
) -> RequestSerialized:
|
|
4575
|
+
|
|
4576
|
+
_host = None
|
|
4577
|
+
|
|
4578
|
+
_collection_formats: Dict[str, str] = {
|
|
4579
|
+
}
|
|
4580
|
+
|
|
4581
|
+
_path_params: Dict[str, str] = {}
|
|
4582
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4583
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4584
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4585
|
+
_files: Dict[
|
|
4586
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4587
|
+
] = {}
|
|
4588
|
+
_body_params: Optional[bytes] = None
|
|
4589
|
+
|
|
4590
|
+
# process the path parameters
|
|
4591
|
+
# process the query parameters
|
|
4592
|
+
if username is not None:
|
|
4593
|
+
|
|
4594
|
+
_query_params.append(('username', username))
|
|
4595
|
+
|
|
4596
|
+
if dataset is not None:
|
|
4597
|
+
|
|
4598
|
+
_query_params.append(('dataset', dataset))
|
|
4599
|
+
|
|
4600
|
+
if search_term is not None:
|
|
4601
|
+
|
|
4602
|
+
_query_params.append(('search_term', search_term))
|
|
4603
|
+
|
|
4604
|
+
if organization_id is not None:
|
|
4605
|
+
|
|
4606
|
+
_query_params.append(('organization_id', organization_id))
|
|
4607
|
+
|
|
4608
|
+
# process the header parameters
|
|
4609
|
+
# process the form parameters
|
|
4610
|
+
# process the body parameter
|
|
4611
|
+
|
|
4612
|
+
|
|
4613
|
+
# set the HTTP header `Accept`
|
|
4614
|
+
if 'Accept' not in _header_params:
|
|
4615
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4616
|
+
[
|
|
4617
|
+
'application/json'
|
|
4618
|
+
]
|
|
4619
|
+
)
|
|
4620
|
+
|
|
4621
|
+
|
|
4622
|
+
# authentication setting
|
|
4623
|
+
_auth_settings: List[str] = [
|
|
4624
|
+
'QAnswer-Api-Key',
|
|
4625
|
+
'Bearer token'
|
|
4626
|
+
]
|
|
4627
|
+
|
|
4628
|
+
return self.api_client.param_serialize(
|
|
4629
|
+
method='GET',
|
|
4630
|
+
resource_path='/backend/api/dataset/config/synonyms/search',
|
|
4631
|
+
path_params=_path_params,
|
|
4632
|
+
query_params=_query_params,
|
|
4633
|
+
header_params=_header_params,
|
|
4634
|
+
body=_body_params,
|
|
4635
|
+
post_params=_form_params,
|
|
4636
|
+
files=_files,
|
|
4637
|
+
auth_settings=_auth_settings,
|
|
4638
|
+
collection_formats=_collection_formats,
|
|
4639
|
+
_host=_host,
|
|
4640
|
+
_request_auth=_request_auth
|
|
4641
|
+
)
|
|
4642
|
+
|
|
4643
|
+
|