qanswer_sdk 3.1193.0__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 +366 -0
- qanswer_sdk/api/__init__.py +47 -0
- qanswer_sdk/api/admin_api.py +11207 -0
- qanswer_sdk/api/ai_assistant_access_rights_api.py +5331 -0
- qanswer_sdk/api/ai_assistant_api.py +4377 -0
- qanswer_sdk/api/bot_slack_api.py +814 -0
- qanswer_sdk/api/chat_completion_api.py +309 -0
- qanswer_sdk/api/chatbot_api.py +1091 -0
- qanswer_sdk/api/connector_document_api.py +1406 -0
- qanswer_sdk/api/connector_e_consilium_api.py +326 -0
- qanswer_sdk/api/connector_e_consilium_search_index_connector_api.py +1215 -0
- qanswer_sdk/api/connector_google_drive_api.py +1870 -0
- qanswer_sdk/api/connector_one_drive_api.py +1559 -0
- qanswer_sdk/api/connector_onenote_api.py +1576 -0
- qanswer_sdk/api/connector_pinecone_api.py +892 -0
- qanswer_sdk/api/connector_publication_office_controller_api.py +1215 -0
- qanswer_sdk/api/connector_qn_a_api.py +1538 -0
- qanswer_sdk/api/connector_rdf_answer_api.py +1445 -0
- qanswer_sdk/api/connector_rdf_api.py +5318 -0
- qanswer_sdk/api/connector_sharepoint_api.py +2584 -0
- qanswer_sdk/api/connector_websearch_api.py +326 -0
- qanswer_sdk/api/connector_website_api.py +2068 -0
- qanswer_sdk/api/connectors_api.py +1497 -0
- qanswer_sdk/api/connectors_data_api.py +3697 -0
- qanswer_sdk/api/conversation_logs_api.py +6668 -0
- qanswer_sdk/api/dataset_config_api.py +2178 -0
- qanswer_sdk/api/debug_api.py +282 -0
- qanswer_sdk/api/llm_api.py +563 -0
- qanswer_sdk/api/llm_consumption_controller_api.py +310 -0
- qanswer_sdk/api/organizations_teams_api.py +8465 -0
- qanswer_sdk/api/payment_api.py +1546 -0
- qanswer_sdk/api/socket_api.py +2975 -0
- qanswer_sdk/api/speech_to_text_api.py +734 -0
- qanswer_sdk/api/tag_api.py +2396 -0
- qanswer_sdk/api/task_chat_api.py +2064 -0
- qanswer_sdk/api/task_rdf_linker_api.py +4382 -0
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3522 -0
- qanswer_sdk/api/task_rdf_text_linker_api.py +1346 -0
- qanswer_sdk/api/task_relation_extraction_api.py +2977 -0
- qanswer_sdk/api/task_report_copilot_api.py +2980 -0
- qanswer_sdk/api/task_search_api.py +1784 -0
- qanswer_sdk/api/task_sparql2text_api.py +326 -0
- qanswer_sdk/api/task_text2sparql_api.py +908 -0
- qanswer_sdk/api/task_text_classification_api.py +914 -0
- qanswer_sdk/api/user_api.py +7098 -0
- qanswer_sdk/api_client.py +797 -0
- qanswer_sdk/api_response.py +21 -0
- qanswer_sdk/configuration.py +487 -0
- qanswer_sdk/exceptions.py +199 -0
- qanswer_sdk/models/__init__.py +307 -0
- qanswer_sdk/models/access_pdf_payload_model.py +109 -0
- qanswer_sdk/models/add_qn_a_request.py +103 -0
- qanswer_sdk/models/add_synonyms.py +91 -0
- qanswer_sdk/models/add_synonyms_resp.py +89 -0
- qanswer_sdk/models/aggregate.py +97 -0
- qanswer_sdk/models/aggregation.py +112 -0
- qanswer_sdk/models/aggregations_group.py +102 -0
- qanswer_sdk/models/ai_assistant_dto.py +103 -0
- qanswer_sdk/models/ai_assistant_shared_access.py +113 -0
- qanswer_sdk/models/allowed_file_extensions.py +98 -0
- qanswer_sdk/models/api_response.py +87 -0
- qanswer_sdk/models/applied_metadata_filter.py +98 -0
- qanswer_sdk/models/assistant_message_stop.py +93 -0
- qanswer_sdk/models/auth_link_response.py +91 -0
- qanswer_sdk/models/autocompletion_config.py +93 -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 +91 -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/branding_data.py +87 -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 +135 -0
- qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/chat_task_update.py +129 -0
- qanswer_sdk/models/chatbot_chat_payload.py +115 -0
- qanswer_sdk/models/chatbot_conversation_model.py +141 -0
- qanswer_sdk/models/chatbot_response.py +119 -0
- qanswer_sdk/models/check_mode_response.py +100 -0
- qanswer_sdk/models/class_info.py +89 -0
- qanswer_sdk/models/connector_model.py +112 -0
- qanswer_sdk/models/content_item.py +130 -0
- qanswer_sdk/models/conversation_message.py +186 -0
- qanswer_sdk/models/conversation_model.py +131 -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.py +99 -0
- qanswer_sdk/models/create_connector_request.py +93 -0
- qanswer_sdk/models/create_connector_response.py +95 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +103 -0
- qanswer_sdk/models/create_sharepoint_connector_request.py +101 -0
- qanswer_sdk/models/dataset_config_request.py +187 -0
- qanswer_sdk/models/dataset_default_values_model.py +141 -0
- qanswer_sdk/models/dataset_description.py +91 -0
- qanswer_sdk/models/dataset_detail.py +133 -0
- qanswer_sdk/models/dataset_detail_kg.py +158 -0
- qanswer_sdk/models/dataset_schema.py +207 -0
- qanswer_sdk/models/dataset_update_object.py +195 -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 +91 -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 +91 -0
- qanswer_sdk/models/delete_synonym_resp.py +89 -0
- qanswer_sdk/models/diarization_segment.py +93 -0
- qanswer_sdk/models/document_content_response.py +91 -0
- qanswer_sdk/models/document_content_update_model.py +95 -0
- qanswer_sdk/models/document_file_delete_by_connector_model.py +99 -0
- qanswer_sdk/models/document_metadata.py +107 -0
- qanswer_sdk/models/document_metadata_list_wrapper.py +95 -0
- qanswer_sdk/models/document_status_response.py +89 -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 +105 -0
- qanswer_sdk/models/econsilium_search_index_additional_fields.py +101 -0
- qanswer_sdk/models/email_request.py +87 -0
- qanswer_sdk/models/embedding_endpoint.py +139 -0
- qanswer_sdk/models/embedding_endpoint_create.py +137 -0
- qanswer_sdk/models/embedding_endpoint_update.py +131 -0
- qanswer_sdk/models/embedding_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/embedding_model.py +96 -0
- qanswer_sdk/models/entity.py +97 -0
- qanswer_sdk/models/entity_linker_response.py +99 -0
- qanswer_sdk/models/entity_model.py +99 -0
- qanswer_sdk/models/extra_body.py +91 -0
- qanswer_sdk/models/extract_hyper_links_payload.py +102 -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_model.py +107 -0
- qanswer_sdk/models/feedback_update.py +103 -0
- qanswer_sdk/models/file_es_meta_data.py +89 -0
- qanswer_sdk/models/file_folder_model.py +113 -0
- qanswer_sdk/models/file_model.py +134 -0
- qanswer_sdk/models/files_by_connector_model.py +89 -0
- qanswer_sdk/models/format_return.py +87 -0
- qanswer_sdk/models/g_drive_connector_info.py +95 -0
- qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/g_drive_download_request.py +101 -0
- qanswer_sdk/models/generation_params.py +89 -0
- qanswer_sdk/models/get_connector_by_id_response.py +91 -0
- qanswer_sdk/models/get_conversation_response.py +95 -0
- qanswer_sdk/models/guardrail_endpoint.py +121 -0
- qanswer_sdk/models/has_lucene_index_result.py +87 -0
- qanswer_sdk/models/index_config.py +95 -0
- qanswer_sdk/models/install_response.py +89 -0
- qanswer_sdk/models/is_enabled_response.py +87 -0
- qanswer_sdk/models/is_merging_result.py +87 -0
- qanswer_sdk/models/json_nullable_file_failure_reason.py +87 -0
- qanswer_sdk/models/json_nullable_source_metadata.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/link.py +103 -0
- qanswer_sdk/models/link_extraction_response.py +97 -0
- qanswer_sdk/models/link_result_paginated.py +97 -0
- qanswer_sdk/models/linker.py +103 -0
- qanswer_sdk/models/linking_result.py +95 -0
- qanswer_sdk/models/links.py +99 -0
- qanswer_sdk/models/list_chatbot_conversation_response.py +105 -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 +101 -0
- qanswer_sdk/models/list_socket_events.py +95 -0
- qanswer_sdk/models/list_synonyms_model.py +89 -0
- qanswer_sdk/models/llm_context_ranges_response.py +93 -0
- qanswer_sdk/models/llm_cost.py +108 -0
- qanswer_sdk/models/llm_details.py +111 -0
- qanswer_sdk/models/llm_endpoint.py +167 -0
- qanswer_sdk/models/llm_endpoint_create.py +165 -0
- qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
- qanswer_sdk/models/llm_endpoint_update.py +163 -0
- qanswer_sdk/models/llm_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/login_request.py +89 -0
- qanswer_sdk/models/logo.py +89 -0
- qanswer_sdk/models/lucene_index_request_result.py +87 -0
- qanswer_sdk/models/merge_request_result.py +87 -0
- qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
- qanswer_sdk/models/modify_connector_request.py +111 -0
- qanswer_sdk/models/o_auth_service.py +89 -0
- qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/one_drive_download_request.py +101 -0
- qanswer_sdk/models/one_note_download_by_ids.py +91 -0
- qanswer_sdk/models/one_note_download_request.py +101 -0
- qanswer_sdk/models/organization.py +93 -0
- qanswer_sdk/models/organization_creation.py +91 -0
- qanswer_sdk/models/organization_filter.py +87 -0
- qanswer_sdk/models/organization_shared.py +105 -0
- qanswer_sdk/models/page_organization.py +123 -0
- qanswer_sdk/models/page_team_with_count.py +123 -0
- qanswer_sdk/models/pageable.py +92 -0
- qanswer_sdk/models/pageable_object.py +101 -0
- qanswer_sdk/models/password.py +89 -0
- qanswer_sdk/models/pinecone_index_model.py +91 -0
- qanswer_sdk/models/plan.py +123 -0
- qanswer_sdk/models/predicted_class.py +89 -0
- qanswer_sdk/models/prompt_token_count_details.py +99 -0
- qanswer_sdk/models/provider.py +87 -0
- qanswer_sdk/models/publication_add_payload.py +103 -0
- qanswer_sdk/models/publication_file_metadata.py +105 -0
- qanswer_sdk/models/publication_office_additional_fields.py +111 -0
- qanswer_sdk/models/publication_search_index_search_response.py +113 -0
- qanswer_sdk/models/qa_context.py +129 -0
- qanswer_sdk/models/qa_contexts.py +116 -0
- qanswer_sdk/models/qa_metadata_payload.py +123 -0
- qanswer_sdk/models/qa_table.py +102 -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_completion.py +89 -0
- qanswer_sdk/models/rag_params.py +89 -0
- qanswer_sdk/models/rag_payload.py +154 -0
- qanswer_sdk/models/rag_response.py +150 -0
- qanswer_sdk/models/ranker_config.py +93 -0
- qanswer_sdk/models/reference_model.py +95 -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/relation_extraction_configuration.py +105 -0
- qanswer_sdk/models/relation_extraction_payload.py +111 -0
- qanswer_sdk/models/relation_extraction_result.py +101 -0
- qanswer_sdk/models/relation_extraction_schema.py +101 -0
- qanswer_sdk/models/relation_extraction_task_settings.py +123 -0
- qanswer_sdk/models/relation_extraction_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/relation_extraction_task_update.py +117 -0
- qanswer_sdk/models/relation_extraction_template_payload.py +97 -0
- qanswer_sdk/models/relation_extraction_template_update_payload.py +95 -0
- qanswer_sdk/models/relation_model.py +89 -0
- qanswer_sdk/models/report_copilot_create_payload.py +103 -0
- qanswer_sdk/models/report_copilot_export_template_as_docx_payload_simplified.py +91 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_response.py +95 -0
- qanswer_sdk/models/report_copilot_refinement_payload.py +104 -0
- qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
- qanswer_sdk/models/report_copilot_slot_task_settings.py +125 -0
- qanswer_sdk/models/report_copilot_slot_task_update.py +119 -0
- qanswer_sdk/models/report_copilot_task_settings.py +123 -0
- qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/report_copilot_task_update.py +117 -0
- qanswer_sdk/models/report_copilot_template.py +107 -0
- qanswer_sdk/models/report_copilot_template_simplified.py +95 -0
- qanswer_sdk/models/report_copilot_update_payload.py +101 -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/retreive_all_synonyms_resp.py +99 -0
- qanswer_sdk/models/retry_params.py +89 -0
- qanswer_sdk/models/role.py +99 -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 +89 -0
- qanswer_sdk/models/search_payload.py +124 -0
- qanswer_sdk/models/search_response.py +113 -0
- qanswer_sdk/models/search_task_settings.py +131 -0
- qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/search_task_update.py +123 -0
- qanswer_sdk/models/set_logo1_request.py +87 -0
- qanswer_sdk/models/share_point_download_by_ids.py +99 -0
- qanswer_sdk/models/share_point_download_request.py +101 -0
- qanswer_sdk/models/shared_organization_access.py +109 -0
- qanswer_sdk/models/shared_team_access.py +107 -0
- qanswer_sdk/models/shared_user.py +99 -0
- qanswer_sdk/models/sign_up_request.py +96 -0
- qanswer_sdk/models/signout_request.py +87 -0
- qanswer_sdk/models/slot.py +138 -0
- qanswer_sdk/models/slot_in_prompt.py +91 -0
- qanswer_sdk/models/slot_update.py +138 -0
- qanswer_sdk/models/socket_conversation_message.py +207 -0
- qanswer_sdk/models/socket_data_extraction.py +109 -0
- qanswer_sdk/models/socket_file_metadata.py +172 -0
- qanswer_sdk/models/socket_join_conversation.py +97 -0
- qanswer_sdk/models/socket_join_dataset.py +93 -0
- qanswer_sdk/models/socket_report_continuation_response.py +106 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +120 -0
- qanswer_sdk/models/socket_report_copilot_refinement_response.py +108 -0
- qanswer_sdk/models/socket_speech2_text_response.py +99 -0
- qanswer_sdk/models/socket_stop_conversation.py +97 -0
- qanswer_sdk/models/sort_object.py +91 -0
- qanswer_sdk/models/source.py +125 -0
- qanswer_sdk/models/sparql2_text_payload.py +97 -0
- qanswer_sdk/models/speech2_text_response.py +87 -0
- qanswer_sdk/models/speech2_text_with_diarization_response.py +106 -0
- qanswer_sdk/models/stat_per_date.py +89 -0
- qanswer_sdk/models/status_response.py +89 -0
- qanswer_sdk/models/subject_model.py +91 -0
- qanswer_sdk/models/suggestion_list_response.py +87 -0
- qanswer_sdk/models/summa_server.py +101 -0
- qanswer_sdk/models/tag_payload.py +87 -0
- qanswer_sdk/models/tag_qa_list_payload.py +100 -0
- qanswer_sdk/models/tag_qa_payload.py +91 -0
- qanswer_sdk/models/team.py +93 -0
- qanswer_sdk/models/team_creation.py +89 -0
- qanswer_sdk/models/team_filter.py +91 -0
- qanswer_sdk/models/team_shared.py +105 -0
- qanswer_sdk/models/team_with_count.py +95 -0
- qanswer_sdk/models/terms_bucket.py +89 -0
- qanswer_sdk/models/text2_sparql_payload.py +156 -0
- qanswer_sdk/models/text2_sparql_task_settings.py +123 -0
- qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_task_update.py +117 -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/total_stat.py +96 -0
- qanswer_sdk/models/ui_mappings.py +141 -0
- qanswer_sdk/models/update_metadata_model.py +95 -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 +93 -0
- qanswer_sdk/models/update_synonyms_resp.py +89 -0
- qanswer_sdk/models/uri_mapping.py +89 -0
- qanswer_sdk/models/user.py +91 -0
- qanswer_sdk/models/user_chatbot_setting_payload.py +106 -0
- qanswer_sdk/models/user_chatbot_setting_response.py +105 -0
- qanswer_sdk/models/user_dataset.py +144 -0
- qanswer_sdk/models/user_dataset_api_key.py +116 -0
- qanswer_sdk/models/user_filter.py +101 -0
- qanswer_sdk/models/user_identity_availability.py +87 -0
- qanswer_sdk/models/user_list_dto.py +101 -0
- qanswer_sdk/models/user_oauth_token.py +96 -0
- qanswer_sdk/models/user_profile.py +184 -0
- qanswer_sdk/models/user_profile_list_dto.py +101 -0
- qanswer_sdk/models/user_profile_paginated.py +101 -0
- qanswer_sdk/models/website_add_payload.py +98 -0
- qanswer_sdk/models/website_connector_settings.py +160 -0
- qanswer_sdk/models/widget_configs.py +105 -0
- qanswer_sdk/py.typed +0 -0
- qanswer_sdk/rest.py +257 -0
- qanswer_sdk-3.1193.0.dist-info/METADATA +125 -0
- qanswer_sdk-3.1193.0.dist-info/RECORD +346 -0
- qanswer_sdk-3.1193.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,2178 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.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 StrictStr
|
20
|
+
from typing import List, Optional
|
21
|
+
from qanswer_sdk.models.add_synonyms import AddSynonyms
|
22
|
+
from qanswer_sdk.models.add_synonyms_resp import AddSynonymsResp
|
23
|
+
from qanswer_sdk.models.available_embedding_models_response import AvailableEmbeddingModelsResponse
|
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.delete_synonym import DeleteSynonym
|
28
|
+
from qanswer_sdk.models.delete_synonym_resp import DeleteSynonymResp
|
29
|
+
from qanswer_sdk.models.retreive_all_synonyms_resp import RetreiveAllSynonymsResp
|
30
|
+
from qanswer_sdk.models.update_synonyms import UpdateSynonyms
|
31
|
+
from qanswer_sdk.models.update_synonyms_resp import UpdateSynonymsResp
|
32
|
+
|
33
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
34
|
+
from qanswer_sdk.api_response import ApiResponse
|
35
|
+
from qanswer_sdk.rest import RESTResponseType
|
36
|
+
|
37
|
+
|
38
|
+
class DatasetConfigApi:
|
39
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
40
|
+
Ref: https://openapi-generator.tech
|
41
|
+
|
42
|
+
Do not edit the class manually.
|
43
|
+
"""
|
44
|
+
|
45
|
+
def __init__(self, api_client=None) -> None:
|
46
|
+
if api_client is None:
|
47
|
+
api_client = ApiClient.get_default()
|
48
|
+
self.api_client = api_client
|
49
|
+
|
50
|
+
|
51
|
+
@validate_call
|
52
|
+
def free_text_dataset_add_synonyms(
|
53
|
+
self,
|
54
|
+
add_synonyms: AddSynonyms,
|
55
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
56
|
+
_request_timeout: Union[
|
57
|
+
None,
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
59
|
+
Tuple[
|
60
|
+
Annotated[StrictFloat, Field(gt=0)],
|
61
|
+
Annotated[StrictFloat, Field(gt=0)]
|
62
|
+
]
|
63
|
+
] = None,
|
64
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
65
|
+
_content_type: Optional[StrictStr] = None,
|
66
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
67
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
68
|
+
) -> AddSynonymsResp:
|
69
|
+
"""Create synonyms specified for a dataset
|
70
|
+
|
71
|
+
|
72
|
+
:param add_synonyms: (required)
|
73
|
+
:type add_synonyms: AddSynonyms
|
74
|
+
:param q_answer_api_key:
|
75
|
+
:type q_answer_api_key: str
|
76
|
+
:param _request_timeout: timeout setting for this request. If one
|
77
|
+
number provided, it will be total request
|
78
|
+
timeout. It can also be a pair (tuple) of
|
79
|
+
(connection, read) timeouts.
|
80
|
+
:type _request_timeout: int, tuple(int, int), optional
|
81
|
+
:param _request_auth: set to override the auth_settings for an a single
|
82
|
+
request; this effectively ignores the
|
83
|
+
authentication in the spec for a single request.
|
84
|
+
:type _request_auth: dict, optional
|
85
|
+
:param _content_type: force content-type for the request.
|
86
|
+
:type _content_type: str, Optional
|
87
|
+
:param _headers: set to override the headers for a single
|
88
|
+
request; this effectively ignores the headers
|
89
|
+
in the spec for a single request.
|
90
|
+
:type _headers: dict, optional
|
91
|
+
:param _host_index: set to override the host_index for a single
|
92
|
+
request; this effectively ignores the host_index
|
93
|
+
in the spec for a single request.
|
94
|
+
:type _host_index: int, optional
|
95
|
+
:return: Returns the result object.
|
96
|
+
""" # noqa: E501
|
97
|
+
|
98
|
+
_param = self._free_text_dataset_add_synonyms_serialize(
|
99
|
+
add_synonyms=add_synonyms,
|
100
|
+
q_answer_api_key=q_answer_api_key,
|
101
|
+
_request_auth=_request_auth,
|
102
|
+
_content_type=_content_type,
|
103
|
+
_headers=_headers,
|
104
|
+
_host_index=_host_index
|
105
|
+
)
|
106
|
+
|
107
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
108
|
+
'200': "AddSynonymsResp",
|
109
|
+
}
|
110
|
+
response_data = self.api_client.call_api(
|
111
|
+
*_param,
|
112
|
+
_request_timeout=_request_timeout
|
113
|
+
)
|
114
|
+
response_data.read()
|
115
|
+
return self.api_client.response_deserialize(
|
116
|
+
response_data=response_data,
|
117
|
+
response_types_map=_response_types_map,
|
118
|
+
).data
|
119
|
+
|
120
|
+
|
121
|
+
@validate_call
|
122
|
+
def free_text_dataset_add_synonyms_with_http_info(
|
123
|
+
self,
|
124
|
+
add_synonyms: AddSynonyms,
|
125
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
126
|
+
_request_timeout: Union[
|
127
|
+
None,
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
129
|
+
Tuple[
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
132
|
+
]
|
133
|
+
] = None,
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
138
|
+
) -> ApiResponse[AddSynonymsResp]:
|
139
|
+
"""Create synonyms specified for a dataset
|
140
|
+
|
141
|
+
|
142
|
+
:param add_synonyms: (required)
|
143
|
+
:type add_synonyms: AddSynonyms
|
144
|
+
:param q_answer_api_key:
|
145
|
+
:type q_answer_api_key: str
|
146
|
+
:param _request_timeout: timeout setting for this request. If one
|
147
|
+
number provided, it will be total request
|
148
|
+
timeout. It can also be a pair (tuple) of
|
149
|
+
(connection, read) timeouts.
|
150
|
+
:type _request_timeout: int, tuple(int, int), optional
|
151
|
+
:param _request_auth: set to override the auth_settings for an a single
|
152
|
+
request; this effectively ignores the
|
153
|
+
authentication in the spec for a single request.
|
154
|
+
:type _request_auth: dict, optional
|
155
|
+
:param _content_type: force content-type for the request.
|
156
|
+
:type _content_type: str, Optional
|
157
|
+
:param _headers: set to override the headers for a single
|
158
|
+
request; this effectively ignores the headers
|
159
|
+
in the spec for a single request.
|
160
|
+
:type _headers: dict, optional
|
161
|
+
:param _host_index: set to override the host_index for a single
|
162
|
+
request; this effectively ignores the host_index
|
163
|
+
in the spec for a single request.
|
164
|
+
:type _host_index: int, optional
|
165
|
+
:return: Returns the result object.
|
166
|
+
""" # noqa: E501
|
167
|
+
|
168
|
+
_param = self._free_text_dataset_add_synonyms_serialize(
|
169
|
+
add_synonyms=add_synonyms,
|
170
|
+
q_answer_api_key=q_answer_api_key,
|
171
|
+
_request_auth=_request_auth,
|
172
|
+
_content_type=_content_type,
|
173
|
+
_headers=_headers,
|
174
|
+
_host_index=_host_index
|
175
|
+
)
|
176
|
+
|
177
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
178
|
+
'200': "AddSynonymsResp",
|
179
|
+
}
|
180
|
+
response_data = self.api_client.call_api(
|
181
|
+
*_param,
|
182
|
+
_request_timeout=_request_timeout
|
183
|
+
)
|
184
|
+
response_data.read()
|
185
|
+
return self.api_client.response_deserialize(
|
186
|
+
response_data=response_data,
|
187
|
+
response_types_map=_response_types_map,
|
188
|
+
)
|
189
|
+
|
190
|
+
|
191
|
+
@validate_call
|
192
|
+
def free_text_dataset_add_synonyms_without_preload_content(
|
193
|
+
self,
|
194
|
+
add_synonyms: AddSynonyms,
|
195
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
196
|
+
_request_timeout: Union[
|
197
|
+
None,
|
198
|
+
Annotated[StrictFloat, Field(gt=0)],
|
199
|
+
Tuple[
|
200
|
+
Annotated[StrictFloat, Field(gt=0)],
|
201
|
+
Annotated[StrictFloat, Field(gt=0)]
|
202
|
+
]
|
203
|
+
] = None,
|
204
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
205
|
+
_content_type: Optional[StrictStr] = None,
|
206
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
207
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
208
|
+
) -> RESTResponseType:
|
209
|
+
"""Create synonyms specified for a dataset
|
210
|
+
|
211
|
+
|
212
|
+
:param add_synonyms: (required)
|
213
|
+
:type add_synonyms: AddSynonyms
|
214
|
+
:param q_answer_api_key:
|
215
|
+
:type q_answer_api_key: str
|
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._free_text_dataset_add_synonyms_serialize(
|
239
|
+
add_synonyms=add_synonyms,
|
240
|
+
q_answer_api_key=q_answer_api_key,
|
241
|
+
_request_auth=_request_auth,
|
242
|
+
_content_type=_content_type,
|
243
|
+
_headers=_headers,
|
244
|
+
_host_index=_host_index
|
245
|
+
)
|
246
|
+
|
247
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
248
|
+
'200': "AddSynonymsResp",
|
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 _free_text_dataset_add_synonyms_serialize(
|
258
|
+
self,
|
259
|
+
add_synonyms,
|
260
|
+
q_answer_api_key,
|
261
|
+
_request_auth,
|
262
|
+
_content_type,
|
263
|
+
_headers,
|
264
|
+
_host_index,
|
265
|
+
) -> RequestSerialized:
|
266
|
+
|
267
|
+
_host = None
|
268
|
+
|
269
|
+
_collection_formats: Dict[str, str] = {
|
270
|
+
}
|
271
|
+
|
272
|
+
_path_params: Dict[str, str] = {}
|
273
|
+
_query_params: List[Tuple[str, str]] = []
|
274
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
275
|
+
_form_params: List[Tuple[str, str]] = []
|
276
|
+
_files: Dict[
|
277
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
278
|
+
] = {}
|
279
|
+
_body_params: Optional[bytes] = None
|
280
|
+
|
281
|
+
# process the path parameters
|
282
|
+
# process the query parameters
|
283
|
+
# process the header parameters
|
284
|
+
if q_answer_api_key is not None:
|
285
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
286
|
+
# process the form parameters
|
287
|
+
# process the body parameter
|
288
|
+
if add_synonyms is not None:
|
289
|
+
_body_params = add_synonyms
|
290
|
+
|
291
|
+
|
292
|
+
# set the HTTP header `Accept`
|
293
|
+
if 'Accept' not in _header_params:
|
294
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
295
|
+
[
|
296
|
+
'*/*'
|
297
|
+
]
|
298
|
+
)
|
299
|
+
|
300
|
+
# set the HTTP header `Content-Type`
|
301
|
+
if _content_type:
|
302
|
+
_header_params['Content-Type'] = _content_type
|
303
|
+
else:
|
304
|
+
_default_content_type = (
|
305
|
+
self.api_client.select_header_content_type(
|
306
|
+
[
|
307
|
+
'application/json'
|
308
|
+
]
|
309
|
+
)
|
310
|
+
)
|
311
|
+
if _default_content_type is not None:
|
312
|
+
_header_params['Content-Type'] = _default_content_type
|
313
|
+
|
314
|
+
# authentication setting
|
315
|
+
_auth_settings: List[str] = [
|
316
|
+
'QAnswer-Api-Key',
|
317
|
+
'Bearer'
|
318
|
+
]
|
319
|
+
|
320
|
+
return self.api_client.param_serialize(
|
321
|
+
method='POST',
|
322
|
+
resource_path='/api/dataset/config/synonyms',
|
323
|
+
path_params=_path_params,
|
324
|
+
query_params=_query_params,
|
325
|
+
header_params=_header_params,
|
326
|
+
body=_body_params,
|
327
|
+
post_params=_form_params,
|
328
|
+
files=_files,
|
329
|
+
auth_settings=_auth_settings,
|
330
|
+
collection_formats=_collection_formats,
|
331
|
+
_host=_host,
|
332
|
+
_request_auth=_request_auth
|
333
|
+
)
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
@validate_call
|
339
|
+
def free_text_dataset_delete_synonyms_by_id(
|
340
|
+
self,
|
341
|
+
delete_synonym: DeleteSynonym,
|
342
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
343
|
+
_request_timeout: Union[
|
344
|
+
None,
|
345
|
+
Annotated[StrictFloat, Field(gt=0)],
|
346
|
+
Tuple[
|
347
|
+
Annotated[StrictFloat, Field(gt=0)],
|
348
|
+
Annotated[StrictFloat, Field(gt=0)]
|
349
|
+
]
|
350
|
+
] = None,
|
351
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
352
|
+
_content_type: Optional[StrictStr] = None,
|
353
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
354
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
355
|
+
) -> DeleteSynonymResp:
|
356
|
+
"""Delete synonyms specified for a dataset
|
357
|
+
|
358
|
+
|
359
|
+
:param delete_synonym: (required)
|
360
|
+
:type delete_synonym: DeleteSynonym
|
361
|
+
:param q_answer_api_key:
|
362
|
+
:type q_answer_api_key: str
|
363
|
+
:param _request_timeout: timeout setting for this request. If one
|
364
|
+
number provided, it will be total request
|
365
|
+
timeout. It can also be a pair (tuple) of
|
366
|
+
(connection, read) timeouts.
|
367
|
+
:type _request_timeout: int, tuple(int, int), optional
|
368
|
+
:param _request_auth: set to override the auth_settings for an a single
|
369
|
+
request; this effectively ignores the
|
370
|
+
authentication in the spec for a single request.
|
371
|
+
:type _request_auth: dict, optional
|
372
|
+
:param _content_type: force content-type for the request.
|
373
|
+
:type _content_type: str, Optional
|
374
|
+
:param _headers: set to override the headers for a single
|
375
|
+
request; this effectively ignores the headers
|
376
|
+
in the spec for a single request.
|
377
|
+
:type _headers: dict, optional
|
378
|
+
:param _host_index: set to override the host_index for a single
|
379
|
+
request; this effectively ignores the host_index
|
380
|
+
in the spec for a single request.
|
381
|
+
:type _host_index: int, optional
|
382
|
+
:return: Returns the result object.
|
383
|
+
""" # noqa: E501
|
384
|
+
|
385
|
+
_param = self._free_text_dataset_delete_synonyms_by_id_serialize(
|
386
|
+
delete_synonym=delete_synonym,
|
387
|
+
q_answer_api_key=q_answer_api_key,
|
388
|
+
_request_auth=_request_auth,
|
389
|
+
_content_type=_content_type,
|
390
|
+
_headers=_headers,
|
391
|
+
_host_index=_host_index
|
392
|
+
)
|
393
|
+
|
394
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
395
|
+
'200': "DeleteSynonymResp",
|
396
|
+
}
|
397
|
+
response_data = self.api_client.call_api(
|
398
|
+
*_param,
|
399
|
+
_request_timeout=_request_timeout
|
400
|
+
)
|
401
|
+
response_data.read()
|
402
|
+
return self.api_client.response_deserialize(
|
403
|
+
response_data=response_data,
|
404
|
+
response_types_map=_response_types_map,
|
405
|
+
).data
|
406
|
+
|
407
|
+
|
408
|
+
@validate_call
|
409
|
+
def free_text_dataset_delete_synonyms_by_id_with_http_info(
|
410
|
+
self,
|
411
|
+
delete_synonym: DeleteSynonym,
|
412
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
413
|
+
_request_timeout: Union[
|
414
|
+
None,
|
415
|
+
Annotated[StrictFloat, Field(gt=0)],
|
416
|
+
Tuple[
|
417
|
+
Annotated[StrictFloat, Field(gt=0)],
|
418
|
+
Annotated[StrictFloat, Field(gt=0)]
|
419
|
+
]
|
420
|
+
] = None,
|
421
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
422
|
+
_content_type: Optional[StrictStr] = None,
|
423
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
424
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
425
|
+
) -> ApiResponse[DeleteSynonymResp]:
|
426
|
+
"""Delete synonyms specified for a dataset
|
427
|
+
|
428
|
+
|
429
|
+
:param delete_synonym: (required)
|
430
|
+
:type delete_synonym: DeleteSynonym
|
431
|
+
:param q_answer_api_key:
|
432
|
+
:type q_answer_api_key: str
|
433
|
+
:param _request_timeout: timeout setting for this request. If one
|
434
|
+
number provided, it will be total request
|
435
|
+
timeout. It can also be a pair (tuple) of
|
436
|
+
(connection, read) timeouts.
|
437
|
+
:type _request_timeout: int, tuple(int, int), optional
|
438
|
+
:param _request_auth: set to override the auth_settings for an a single
|
439
|
+
request; this effectively ignores the
|
440
|
+
authentication in the spec for a single request.
|
441
|
+
:type _request_auth: dict, optional
|
442
|
+
:param _content_type: force content-type for the request.
|
443
|
+
:type _content_type: str, Optional
|
444
|
+
:param _headers: set to override the headers for a single
|
445
|
+
request; this effectively ignores the headers
|
446
|
+
in the spec for a single request.
|
447
|
+
:type _headers: dict, optional
|
448
|
+
:param _host_index: set to override the host_index for a single
|
449
|
+
request; this effectively ignores the host_index
|
450
|
+
in the spec for a single request.
|
451
|
+
:type _host_index: int, optional
|
452
|
+
:return: Returns the result object.
|
453
|
+
""" # noqa: E501
|
454
|
+
|
455
|
+
_param = self._free_text_dataset_delete_synonyms_by_id_serialize(
|
456
|
+
delete_synonym=delete_synonym,
|
457
|
+
q_answer_api_key=q_answer_api_key,
|
458
|
+
_request_auth=_request_auth,
|
459
|
+
_content_type=_content_type,
|
460
|
+
_headers=_headers,
|
461
|
+
_host_index=_host_index
|
462
|
+
)
|
463
|
+
|
464
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
465
|
+
'200': "DeleteSynonymResp",
|
466
|
+
}
|
467
|
+
response_data = self.api_client.call_api(
|
468
|
+
*_param,
|
469
|
+
_request_timeout=_request_timeout
|
470
|
+
)
|
471
|
+
response_data.read()
|
472
|
+
return self.api_client.response_deserialize(
|
473
|
+
response_data=response_data,
|
474
|
+
response_types_map=_response_types_map,
|
475
|
+
)
|
476
|
+
|
477
|
+
|
478
|
+
@validate_call
|
479
|
+
def free_text_dataset_delete_synonyms_by_id_without_preload_content(
|
480
|
+
self,
|
481
|
+
delete_synonym: DeleteSynonym,
|
482
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
483
|
+
_request_timeout: Union[
|
484
|
+
None,
|
485
|
+
Annotated[StrictFloat, Field(gt=0)],
|
486
|
+
Tuple[
|
487
|
+
Annotated[StrictFloat, Field(gt=0)],
|
488
|
+
Annotated[StrictFloat, Field(gt=0)]
|
489
|
+
]
|
490
|
+
] = None,
|
491
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
492
|
+
_content_type: Optional[StrictStr] = None,
|
493
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
494
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
495
|
+
) -> RESTResponseType:
|
496
|
+
"""Delete synonyms specified for a dataset
|
497
|
+
|
498
|
+
|
499
|
+
:param delete_synonym: (required)
|
500
|
+
:type delete_synonym: DeleteSynonym
|
501
|
+
:param q_answer_api_key:
|
502
|
+
:type q_answer_api_key: str
|
503
|
+
:param _request_timeout: timeout setting for this request. If one
|
504
|
+
number provided, it will be total request
|
505
|
+
timeout. It can also be a pair (tuple) of
|
506
|
+
(connection, read) timeouts.
|
507
|
+
:type _request_timeout: int, tuple(int, int), optional
|
508
|
+
:param _request_auth: set to override the auth_settings for an a single
|
509
|
+
request; this effectively ignores the
|
510
|
+
authentication in the spec for a single request.
|
511
|
+
:type _request_auth: dict, optional
|
512
|
+
:param _content_type: force content-type for the request.
|
513
|
+
:type _content_type: str, Optional
|
514
|
+
:param _headers: set to override the headers for a single
|
515
|
+
request; this effectively ignores the headers
|
516
|
+
in the spec for a single request.
|
517
|
+
:type _headers: dict, optional
|
518
|
+
:param _host_index: set to override the host_index for a single
|
519
|
+
request; this effectively ignores the host_index
|
520
|
+
in the spec for a single request.
|
521
|
+
:type _host_index: int, optional
|
522
|
+
:return: Returns the result object.
|
523
|
+
""" # noqa: E501
|
524
|
+
|
525
|
+
_param = self._free_text_dataset_delete_synonyms_by_id_serialize(
|
526
|
+
delete_synonym=delete_synonym,
|
527
|
+
q_answer_api_key=q_answer_api_key,
|
528
|
+
_request_auth=_request_auth,
|
529
|
+
_content_type=_content_type,
|
530
|
+
_headers=_headers,
|
531
|
+
_host_index=_host_index
|
532
|
+
)
|
533
|
+
|
534
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
535
|
+
'200': "DeleteSynonymResp",
|
536
|
+
}
|
537
|
+
response_data = self.api_client.call_api(
|
538
|
+
*_param,
|
539
|
+
_request_timeout=_request_timeout
|
540
|
+
)
|
541
|
+
return response_data.response
|
542
|
+
|
543
|
+
|
544
|
+
def _free_text_dataset_delete_synonyms_by_id_serialize(
|
545
|
+
self,
|
546
|
+
delete_synonym,
|
547
|
+
q_answer_api_key,
|
548
|
+
_request_auth,
|
549
|
+
_content_type,
|
550
|
+
_headers,
|
551
|
+
_host_index,
|
552
|
+
) -> RequestSerialized:
|
553
|
+
|
554
|
+
_host = None
|
555
|
+
|
556
|
+
_collection_formats: Dict[str, str] = {
|
557
|
+
}
|
558
|
+
|
559
|
+
_path_params: Dict[str, str] = {}
|
560
|
+
_query_params: List[Tuple[str, str]] = []
|
561
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
562
|
+
_form_params: List[Tuple[str, str]] = []
|
563
|
+
_files: Dict[
|
564
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
565
|
+
] = {}
|
566
|
+
_body_params: Optional[bytes] = None
|
567
|
+
|
568
|
+
# process the path parameters
|
569
|
+
# process the query parameters
|
570
|
+
# process the header parameters
|
571
|
+
if q_answer_api_key is not None:
|
572
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
573
|
+
# process the form parameters
|
574
|
+
# process the body parameter
|
575
|
+
if delete_synonym is not None:
|
576
|
+
_body_params = delete_synonym
|
577
|
+
|
578
|
+
|
579
|
+
# set the HTTP header `Accept`
|
580
|
+
if 'Accept' not in _header_params:
|
581
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
582
|
+
[
|
583
|
+
'*/*'
|
584
|
+
]
|
585
|
+
)
|
586
|
+
|
587
|
+
# set the HTTP header `Content-Type`
|
588
|
+
if _content_type:
|
589
|
+
_header_params['Content-Type'] = _content_type
|
590
|
+
else:
|
591
|
+
_default_content_type = (
|
592
|
+
self.api_client.select_header_content_type(
|
593
|
+
[
|
594
|
+
'application/json'
|
595
|
+
]
|
596
|
+
)
|
597
|
+
)
|
598
|
+
if _default_content_type is not None:
|
599
|
+
_header_params['Content-Type'] = _default_content_type
|
600
|
+
|
601
|
+
# authentication setting
|
602
|
+
_auth_settings: List[str] = [
|
603
|
+
'QAnswer-Api-Key',
|
604
|
+
'Bearer'
|
605
|
+
]
|
606
|
+
|
607
|
+
return self.api_client.param_serialize(
|
608
|
+
method='DELETE',
|
609
|
+
resource_path='/api/dataset/config/synonyms',
|
610
|
+
path_params=_path_params,
|
611
|
+
query_params=_query_params,
|
612
|
+
header_params=_header_params,
|
613
|
+
body=_body_params,
|
614
|
+
post_params=_form_params,
|
615
|
+
files=_files,
|
616
|
+
auth_settings=_auth_settings,
|
617
|
+
collection_formats=_collection_formats,
|
618
|
+
_host=_host,
|
619
|
+
_request_auth=_request_auth
|
620
|
+
)
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
@validate_call
|
626
|
+
def free_text_dataset_get_synonyms(
|
627
|
+
self,
|
628
|
+
username: StrictStr,
|
629
|
+
dataset: StrictStr,
|
630
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
631
|
+
_request_timeout: Union[
|
632
|
+
None,
|
633
|
+
Annotated[StrictFloat, Field(gt=0)],
|
634
|
+
Tuple[
|
635
|
+
Annotated[StrictFloat, Field(gt=0)],
|
636
|
+
Annotated[StrictFloat, Field(gt=0)]
|
637
|
+
]
|
638
|
+
] = None,
|
639
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
640
|
+
_content_type: Optional[StrictStr] = None,
|
641
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
642
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
643
|
+
) -> RetreiveAllSynonymsResp:
|
644
|
+
"""Synonyms specified for a dataset
|
645
|
+
|
646
|
+
|
647
|
+
:param username: (required)
|
648
|
+
:type username: str
|
649
|
+
:param dataset: (required)
|
650
|
+
:type dataset: str
|
651
|
+
:param q_answer_api_key:
|
652
|
+
:type q_answer_api_key: str
|
653
|
+
:param _request_timeout: timeout setting for this request. If one
|
654
|
+
number provided, it will be total request
|
655
|
+
timeout. It can also be a pair (tuple) of
|
656
|
+
(connection, read) timeouts.
|
657
|
+
:type _request_timeout: int, tuple(int, int), optional
|
658
|
+
:param _request_auth: set to override the auth_settings for an a single
|
659
|
+
request; this effectively ignores the
|
660
|
+
authentication in the spec for a single request.
|
661
|
+
:type _request_auth: dict, optional
|
662
|
+
:param _content_type: force content-type for the request.
|
663
|
+
:type _content_type: str, Optional
|
664
|
+
:param _headers: set to override the headers for a single
|
665
|
+
request; this effectively ignores the headers
|
666
|
+
in the spec for a single request.
|
667
|
+
:type _headers: dict, optional
|
668
|
+
:param _host_index: set to override the host_index for a single
|
669
|
+
request; this effectively ignores the host_index
|
670
|
+
in the spec for a single request.
|
671
|
+
:type _host_index: int, optional
|
672
|
+
:return: Returns the result object.
|
673
|
+
""" # noqa: E501
|
674
|
+
|
675
|
+
_param = self._free_text_dataset_get_synonyms_serialize(
|
676
|
+
username=username,
|
677
|
+
dataset=dataset,
|
678
|
+
q_answer_api_key=q_answer_api_key,
|
679
|
+
_request_auth=_request_auth,
|
680
|
+
_content_type=_content_type,
|
681
|
+
_headers=_headers,
|
682
|
+
_host_index=_host_index
|
683
|
+
)
|
684
|
+
|
685
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
686
|
+
'200': "RetreiveAllSynonymsResp",
|
687
|
+
}
|
688
|
+
response_data = self.api_client.call_api(
|
689
|
+
*_param,
|
690
|
+
_request_timeout=_request_timeout
|
691
|
+
)
|
692
|
+
response_data.read()
|
693
|
+
return self.api_client.response_deserialize(
|
694
|
+
response_data=response_data,
|
695
|
+
response_types_map=_response_types_map,
|
696
|
+
).data
|
697
|
+
|
698
|
+
|
699
|
+
@validate_call
|
700
|
+
def free_text_dataset_get_synonyms_with_http_info(
|
701
|
+
self,
|
702
|
+
username: StrictStr,
|
703
|
+
dataset: StrictStr,
|
704
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
705
|
+
_request_timeout: Union[
|
706
|
+
None,
|
707
|
+
Annotated[StrictFloat, Field(gt=0)],
|
708
|
+
Tuple[
|
709
|
+
Annotated[StrictFloat, Field(gt=0)],
|
710
|
+
Annotated[StrictFloat, Field(gt=0)]
|
711
|
+
]
|
712
|
+
] = None,
|
713
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
714
|
+
_content_type: Optional[StrictStr] = None,
|
715
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
716
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
717
|
+
) -> ApiResponse[RetreiveAllSynonymsResp]:
|
718
|
+
"""Synonyms specified for a dataset
|
719
|
+
|
720
|
+
|
721
|
+
:param username: (required)
|
722
|
+
:type username: str
|
723
|
+
:param dataset: (required)
|
724
|
+
:type dataset: str
|
725
|
+
:param q_answer_api_key:
|
726
|
+
:type q_answer_api_key: str
|
727
|
+
:param _request_timeout: timeout setting for this request. If one
|
728
|
+
number provided, it will be total request
|
729
|
+
timeout. It can also be a pair (tuple) of
|
730
|
+
(connection, read) timeouts.
|
731
|
+
:type _request_timeout: int, tuple(int, int), optional
|
732
|
+
:param _request_auth: set to override the auth_settings for an a single
|
733
|
+
request; this effectively ignores the
|
734
|
+
authentication in the spec for a single request.
|
735
|
+
:type _request_auth: dict, optional
|
736
|
+
:param _content_type: force content-type for the request.
|
737
|
+
:type _content_type: str, Optional
|
738
|
+
:param _headers: set to override the headers for a single
|
739
|
+
request; this effectively ignores the headers
|
740
|
+
in the spec for a single request.
|
741
|
+
:type _headers: dict, optional
|
742
|
+
:param _host_index: set to override the host_index for a single
|
743
|
+
request; this effectively ignores the host_index
|
744
|
+
in the spec for a single request.
|
745
|
+
:type _host_index: int, optional
|
746
|
+
:return: Returns the result object.
|
747
|
+
""" # noqa: E501
|
748
|
+
|
749
|
+
_param = self._free_text_dataset_get_synonyms_serialize(
|
750
|
+
username=username,
|
751
|
+
dataset=dataset,
|
752
|
+
q_answer_api_key=q_answer_api_key,
|
753
|
+
_request_auth=_request_auth,
|
754
|
+
_content_type=_content_type,
|
755
|
+
_headers=_headers,
|
756
|
+
_host_index=_host_index
|
757
|
+
)
|
758
|
+
|
759
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
760
|
+
'200': "RetreiveAllSynonymsResp",
|
761
|
+
}
|
762
|
+
response_data = self.api_client.call_api(
|
763
|
+
*_param,
|
764
|
+
_request_timeout=_request_timeout
|
765
|
+
)
|
766
|
+
response_data.read()
|
767
|
+
return self.api_client.response_deserialize(
|
768
|
+
response_data=response_data,
|
769
|
+
response_types_map=_response_types_map,
|
770
|
+
)
|
771
|
+
|
772
|
+
|
773
|
+
@validate_call
|
774
|
+
def free_text_dataset_get_synonyms_without_preload_content(
|
775
|
+
self,
|
776
|
+
username: StrictStr,
|
777
|
+
dataset: StrictStr,
|
778
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
779
|
+
_request_timeout: Union[
|
780
|
+
None,
|
781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
782
|
+
Tuple[
|
783
|
+
Annotated[StrictFloat, Field(gt=0)],
|
784
|
+
Annotated[StrictFloat, Field(gt=0)]
|
785
|
+
]
|
786
|
+
] = None,
|
787
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
788
|
+
_content_type: Optional[StrictStr] = None,
|
789
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
790
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
791
|
+
) -> RESTResponseType:
|
792
|
+
"""Synonyms specified for a dataset
|
793
|
+
|
794
|
+
|
795
|
+
:param username: (required)
|
796
|
+
:type username: str
|
797
|
+
:param dataset: (required)
|
798
|
+
:type dataset: str
|
799
|
+
:param q_answer_api_key:
|
800
|
+
:type q_answer_api_key: str
|
801
|
+
:param _request_timeout: timeout setting for this request. If one
|
802
|
+
number provided, it will be total request
|
803
|
+
timeout. It can also be a pair (tuple) of
|
804
|
+
(connection, read) timeouts.
|
805
|
+
:type _request_timeout: int, tuple(int, int), optional
|
806
|
+
:param _request_auth: set to override the auth_settings for an a single
|
807
|
+
request; this effectively ignores the
|
808
|
+
authentication in the spec for a single request.
|
809
|
+
:type _request_auth: dict, optional
|
810
|
+
:param _content_type: force content-type for the request.
|
811
|
+
:type _content_type: str, Optional
|
812
|
+
:param _headers: set to override the headers for a single
|
813
|
+
request; this effectively ignores the headers
|
814
|
+
in the spec for a single request.
|
815
|
+
:type _headers: dict, optional
|
816
|
+
:param _host_index: set to override the host_index for a single
|
817
|
+
request; this effectively ignores the host_index
|
818
|
+
in the spec for a single request.
|
819
|
+
:type _host_index: int, optional
|
820
|
+
:return: Returns the result object.
|
821
|
+
""" # noqa: E501
|
822
|
+
|
823
|
+
_param = self._free_text_dataset_get_synonyms_serialize(
|
824
|
+
username=username,
|
825
|
+
dataset=dataset,
|
826
|
+
q_answer_api_key=q_answer_api_key,
|
827
|
+
_request_auth=_request_auth,
|
828
|
+
_content_type=_content_type,
|
829
|
+
_headers=_headers,
|
830
|
+
_host_index=_host_index
|
831
|
+
)
|
832
|
+
|
833
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
834
|
+
'200': "RetreiveAllSynonymsResp",
|
835
|
+
}
|
836
|
+
response_data = self.api_client.call_api(
|
837
|
+
*_param,
|
838
|
+
_request_timeout=_request_timeout
|
839
|
+
)
|
840
|
+
return response_data.response
|
841
|
+
|
842
|
+
|
843
|
+
def _free_text_dataset_get_synonyms_serialize(
|
844
|
+
self,
|
845
|
+
username,
|
846
|
+
dataset,
|
847
|
+
q_answer_api_key,
|
848
|
+
_request_auth,
|
849
|
+
_content_type,
|
850
|
+
_headers,
|
851
|
+
_host_index,
|
852
|
+
) -> RequestSerialized:
|
853
|
+
|
854
|
+
_host = None
|
855
|
+
|
856
|
+
_collection_formats: Dict[str, str] = {
|
857
|
+
}
|
858
|
+
|
859
|
+
_path_params: Dict[str, str] = {}
|
860
|
+
_query_params: List[Tuple[str, str]] = []
|
861
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
862
|
+
_form_params: List[Tuple[str, str]] = []
|
863
|
+
_files: Dict[
|
864
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
865
|
+
] = {}
|
866
|
+
_body_params: Optional[bytes] = None
|
867
|
+
|
868
|
+
# process the path parameters
|
869
|
+
# process the query parameters
|
870
|
+
if username is not None:
|
871
|
+
|
872
|
+
_query_params.append(('username', username))
|
873
|
+
|
874
|
+
if dataset is not None:
|
875
|
+
|
876
|
+
_query_params.append(('dataset', dataset))
|
877
|
+
|
878
|
+
# process the header parameters
|
879
|
+
if q_answer_api_key is not None:
|
880
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
881
|
+
# process the form parameters
|
882
|
+
# process the body parameter
|
883
|
+
|
884
|
+
|
885
|
+
# set the HTTP header `Accept`
|
886
|
+
if 'Accept' not in _header_params:
|
887
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
888
|
+
[
|
889
|
+
'*/*'
|
890
|
+
]
|
891
|
+
)
|
892
|
+
|
893
|
+
|
894
|
+
# authentication setting
|
895
|
+
_auth_settings: List[str] = [
|
896
|
+
'QAnswer-Api-Key',
|
897
|
+
'Bearer'
|
898
|
+
]
|
899
|
+
|
900
|
+
return self.api_client.param_serialize(
|
901
|
+
method='GET',
|
902
|
+
resource_path='/api/dataset/config/synonyms',
|
903
|
+
path_params=_path_params,
|
904
|
+
query_params=_query_params,
|
905
|
+
header_params=_header_params,
|
906
|
+
body=_body_params,
|
907
|
+
post_params=_form_params,
|
908
|
+
files=_files,
|
909
|
+
auth_settings=_auth_settings,
|
910
|
+
collection_formats=_collection_formats,
|
911
|
+
_host=_host,
|
912
|
+
_request_auth=_request_auth
|
913
|
+
)
|
914
|
+
|
915
|
+
|
916
|
+
|
917
|
+
|
918
|
+
@validate_call
|
919
|
+
def free_text_dataset_update_synonyms(
|
920
|
+
self,
|
921
|
+
update_synonyms: UpdateSynonyms,
|
922
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
923
|
+
_request_timeout: Union[
|
924
|
+
None,
|
925
|
+
Annotated[StrictFloat, Field(gt=0)],
|
926
|
+
Tuple[
|
927
|
+
Annotated[StrictFloat, Field(gt=0)],
|
928
|
+
Annotated[StrictFloat, Field(gt=0)]
|
929
|
+
]
|
930
|
+
] = None,
|
931
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
932
|
+
_content_type: Optional[StrictStr] = None,
|
933
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
934
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
935
|
+
) -> UpdateSynonymsResp:
|
936
|
+
"""Update synonyms specified for a dataset
|
937
|
+
|
938
|
+
|
939
|
+
:param update_synonyms: (required)
|
940
|
+
:type update_synonyms: UpdateSynonyms
|
941
|
+
:param q_answer_api_key:
|
942
|
+
:type q_answer_api_key: str
|
943
|
+
:param _request_timeout: timeout setting for this request. If one
|
944
|
+
number provided, it will be total request
|
945
|
+
timeout. It can also be a pair (tuple) of
|
946
|
+
(connection, read) timeouts.
|
947
|
+
:type _request_timeout: int, tuple(int, int), optional
|
948
|
+
:param _request_auth: set to override the auth_settings for an a single
|
949
|
+
request; this effectively ignores the
|
950
|
+
authentication in the spec for a single request.
|
951
|
+
:type _request_auth: dict, optional
|
952
|
+
:param _content_type: force content-type for the request.
|
953
|
+
:type _content_type: str, Optional
|
954
|
+
:param _headers: set to override the headers for a single
|
955
|
+
request; this effectively ignores the headers
|
956
|
+
in the spec for a single request.
|
957
|
+
:type _headers: dict, optional
|
958
|
+
:param _host_index: set to override the host_index for a single
|
959
|
+
request; this effectively ignores the host_index
|
960
|
+
in the spec for a single request.
|
961
|
+
:type _host_index: int, optional
|
962
|
+
:return: Returns the result object.
|
963
|
+
""" # noqa: E501
|
964
|
+
|
965
|
+
_param = self._free_text_dataset_update_synonyms_serialize(
|
966
|
+
update_synonyms=update_synonyms,
|
967
|
+
q_answer_api_key=q_answer_api_key,
|
968
|
+
_request_auth=_request_auth,
|
969
|
+
_content_type=_content_type,
|
970
|
+
_headers=_headers,
|
971
|
+
_host_index=_host_index
|
972
|
+
)
|
973
|
+
|
974
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
975
|
+
'200': "UpdateSynonymsResp",
|
976
|
+
}
|
977
|
+
response_data = self.api_client.call_api(
|
978
|
+
*_param,
|
979
|
+
_request_timeout=_request_timeout
|
980
|
+
)
|
981
|
+
response_data.read()
|
982
|
+
return self.api_client.response_deserialize(
|
983
|
+
response_data=response_data,
|
984
|
+
response_types_map=_response_types_map,
|
985
|
+
).data
|
986
|
+
|
987
|
+
|
988
|
+
@validate_call
|
989
|
+
def free_text_dataset_update_synonyms_with_http_info(
|
990
|
+
self,
|
991
|
+
update_synonyms: UpdateSynonyms,
|
992
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
993
|
+
_request_timeout: Union[
|
994
|
+
None,
|
995
|
+
Annotated[StrictFloat, Field(gt=0)],
|
996
|
+
Tuple[
|
997
|
+
Annotated[StrictFloat, Field(gt=0)],
|
998
|
+
Annotated[StrictFloat, Field(gt=0)]
|
999
|
+
]
|
1000
|
+
] = None,
|
1001
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1002
|
+
_content_type: Optional[StrictStr] = None,
|
1003
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1004
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1005
|
+
) -> ApiResponse[UpdateSynonymsResp]:
|
1006
|
+
"""Update synonyms specified for a dataset
|
1007
|
+
|
1008
|
+
|
1009
|
+
:param update_synonyms: (required)
|
1010
|
+
:type update_synonyms: UpdateSynonyms
|
1011
|
+
:param q_answer_api_key:
|
1012
|
+
:type q_answer_api_key: str
|
1013
|
+
:param _request_timeout: timeout setting for this request. If one
|
1014
|
+
number provided, it will be total request
|
1015
|
+
timeout. It can also be a pair (tuple) of
|
1016
|
+
(connection, read) timeouts.
|
1017
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1018
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1019
|
+
request; this effectively ignores the
|
1020
|
+
authentication in the spec for a single request.
|
1021
|
+
:type _request_auth: dict, optional
|
1022
|
+
:param _content_type: force content-type for the request.
|
1023
|
+
:type _content_type: str, Optional
|
1024
|
+
:param _headers: set to override the headers for a single
|
1025
|
+
request; this effectively ignores the headers
|
1026
|
+
in the spec for a single request.
|
1027
|
+
:type _headers: dict, optional
|
1028
|
+
:param _host_index: set to override the host_index for a single
|
1029
|
+
request; this effectively ignores the host_index
|
1030
|
+
in the spec for a single request.
|
1031
|
+
:type _host_index: int, optional
|
1032
|
+
:return: Returns the result object.
|
1033
|
+
""" # noqa: E501
|
1034
|
+
|
1035
|
+
_param = self._free_text_dataset_update_synonyms_serialize(
|
1036
|
+
update_synonyms=update_synonyms,
|
1037
|
+
q_answer_api_key=q_answer_api_key,
|
1038
|
+
_request_auth=_request_auth,
|
1039
|
+
_content_type=_content_type,
|
1040
|
+
_headers=_headers,
|
1041
|
+
_host_index=_host_index
|
1042
|
+
)
|
1043
|
+
|
1044
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1045
|
+
'200': "UpdateSynonymsResp",
|
1046
|
+
}
|
1047
|
+
response_data = self.api_client.call_api(
|
1048
|
+
*_param,
|
1049
|
+
_request_timeout=_request_timeout
|
1050
|
+
)
|
1051
|
+
response_data.read()
|
1052
|
+
return self.api_client.response_deserialize(
|
1053
|
+
response_data=response_data,
|
1054
|
+
response_types_map=_response_types_map,
|
1055
|
+
)
|
1056
|
+
|
1057
|
+
|
1058
|
+
@validate_call
|
1059
|
+
def free_text_dataset_update_synonyms_without_preload_content(
|
1060
|
+
self,
|
1061
|
+
update_synonyms: UpdateSynonyms,
|
1062
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
1063
|
+
_request_timeout: Union[
|
1064
|
+
None,
|
1065
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1066
|
+
Tuple[
|
1067
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1068
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1069
|
+
]
|
1070
|
+
] = None,
|
1071
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1072
|
+
_content_type: Optional[StrictStr] = None,
|
1073
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1074
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1075
|
+
) -> RESTResponseType:
|
1076
|
+
"""Update synonyms specified for a dataset
|
1077
|
+
|
1078
|
+
|
1079
|
+
:param update_synonyms: (required)
|
1080
|
+
:type update_synonyms: UpdateSynonyms
|
1081
|
+
:param q_answer_api_key:
|
1082
|
+
:type q_answer_api_key: str
|
1083
|
+
:param _request_timeout: timeout setting for this request. If one
|
1084
|
+
number provided, it will be total request
|
1085
|
+
timeout. It can also be a pair (tuple) of
|
1086
|
+
(connection, read) timeouts.
|
1087
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1088
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1089
|
+
request; this effectively ignores the
|
1090
|
+
authentication in the spec for a single request.
|
1091
|
+
:type _request_auth: dict, optional
|
1092
|
+
:param _content_type: force content-type for the request.
|
1093
|
+
:type _content_type: str, Optional
|
1094
|
+
:param _headers: set to override the headers for a single
|
1095
|
+
request; this effectively ignores the headers
|
1096
|
+
in the spec for a single request.
|
1097
|
+
:type _headers: dict, optional
|
1098
|
+
:param _host_index: set to override the host_index for a single
|
1099
|
+
request; this effectively ignores the host_index
|
1100
|
+
in the spec for a single request.
|
1101
|
+
:type _host_index: int, optional
|
1102
|
+
:return: Returns the result object.
|
1103
|
+
""" # noqa: E501
|
1104
|
+
|
1105
|
+
_param = self._free_text_dataset_update_synonyms_serialize(
|
1106
|
+
update_synonyms=update_synonyms,
|
1107
|
+
q_answer_api_key=q_answer_api_key,
|
1108
|
+
_request_auth=_request_auth,
|
1109
|
+
_content_type=_content_type,
|
1110
|
+
_headers=_headers,
|
1111
|
+
_host_index=_host_index
|
1112
|
+
)
|
1113
|
+
|
1114
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1115
|
+
'200': "UpdateSynonymsResp",
|
1116
|
+
}
|
1117
|
+
response_data = self.api_client.call_api(
|
1118
|
+
*_param,
|
1119
|
+
_request_timeout=_request_timeout
|
1120
|
+
)
|
1121
|
+
return response_data.response
|
1122
|
+
|
1123
|
+
|
1124
|
+
def _free_text_dataset_update_synonyms_serialize(
|
1125
|
+
self,
|
1126
|
+
update_synonyms,
|
1127
|
+
q_answer_api_key,
|
1128
|
+
_request_auth,
|
1129
|
+
_content_type,
|
1130
|
+
_headers,
|
1131
|
+
_host_index,
|
1132
|
+
) -> RequestSerialized:
|
1133
|
+
|
1134
|
+
_host = None
|
1135
|
+
|
1136
|
+
_collection_formats: Dict[str, str] = {
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
_path_params: Dict[str, str] = {}
|
1140
|
+
_query_params: List[Tuple[str, str]] = []
|
1141
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1142
|
+
_form_params: List[Tuple[str, str]] = []
|
1143
|
+
_files: Dict[
|
1144
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1145
|
+
] = {}
|
1146
|
+
_body_params: Optional[bytes] = None
|
1147
|
+
|
1148
|
+
# process the path parameters
|
1149
|
+
# process the query parameters
|
1150
|
+
# process the header parameters
|
1151
|
+
if q_answer_api_key is not None:
|
1152
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
1153
|
+
# process the form parameters
|
1154
|
+
# process the body parameter
|
1155
|
+
if update_synonyms is not None:
|
1156
|
+
_body_params = update_synonyms
|
1157
|
+
|
1158
|
+
|
1159
|
+
# set the HTTP header `Accept`
|
1160
|
+
if 'Accept' not in _header_params:
|
1161
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1162
|
+
[
|
1163
|
+
'*/*'
|
1164
|
+
]
|
1165
|
+
)
|
1166
|
+
|
1167
|
+
# set the HTTP header `Content-Type`
|
1168
|
+
if _content_type:
|
1169
|
+
_header_params['Content-Type'] = _content_type
|
1170
|
+
else:
|
1171
|
+
_default_content_type = (
|
1172
|
+
self.api_client.select_header_content_type(
|
1173
|
+
[
|
1174
|
+
'application/json'
|
1175
|
+
]
|
1176
|
+
)
|
1177
|
+
)
|
1178
|
+
if _default_content_type is not None:
|
1179
|
+
_header_params['Content-Type'] = _default_content_type
|
1180
|
+
|
1181
|
+
# authentication setting
|
1182
|
+
_auth_settings: List[str] = [
|
1183
|
+
'QAnswer-Api-Key',
|
1184
|
+
'Bearer'
|
1185
|
+
]
|
1186
|
+
|
1187
|
+
return self.api_client.param_serialize(
|
1188
|
+
method='POST',
|
1189
|
+
resource_path='/api/dataset/config/synonyms/update',
|
1190
|
+
path_params=_path_params,
|
1191
|
+
query_params=_query_params,
|
1192
|
+
header_params=_header_params,
|
1193
|
+
body=_body_params,
|
1194
|
+
post_params=_form_params,
|
1195
|
+
files=_files,
|
1196
|
+
auth_settings=_auth_settings,
|
1197
|
+
collection_formats=_collection_formats,
|
1198
|
+
_host=_host,
|
1199
|
+
_request_auth=_request_auth
|
1200
|
+
)
|
1201
|
+
|
1202
|
+
|
1203
|
+
|
1204
|
+
|
1205
|
+
@validate_call
|
1206
|
+
def free_text_get_default_values(
|
1207
|
+
self,
|
1208
|
+
_request_timeout: Union[
|
1209
|
+
None,
|
1210
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1211
|
+
Tuple[
|
1212
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1213
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1214
|
+
]
|
1215
|
+
] = None,
|
1216
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1217
|
+
_content_type: Optional[StrictStr] = None,
|
1218
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1219
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1220
|
+
) -> DatasetDefaultValuesModel:
|
1221
|
+
"""Default configs for a dataset
|
1222
|
+
|
1223
|
+
|
1224
|
+
:param _request_timeout: timeout setting for this request. If one
|
1225
|
+
number provided, it will be total request
|
1226
|
+
timeout. It can also be a pair (tuple) of
|
1227
|
+
(connection, read) timeouts.
|
1228
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1229
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1230
|
+
request; this effectively ignores the
|
1231
|
+
authentication in the spec for a single request.
|
1232
|
+
:type _request_auth: dict, optional
|
1233
|
+
:param _content_type: force content-type for the request.
|
1234
|
+
:type _content_type: str, Optional
|
1235
|
+
:param _headers: set to override the headers for a single
|
1236
|
+
request; this effectively ignores the headers
|
1237
|
+
in the spec for a single request.
|
1238
|
+
:type _headers: dict, optional
|
1239
|
+
:param _host_index: set to override the host_index for a single
|
1240
|
+
request; this effectively ignores the host_index
|
1241
|
+
in the spec for a single request.
|
1242
|
+
:type _host_index: int, optional
|
1243
|
+
:return: Returns the result object.
|
1244
|
+
""" # noqa: E501
|
1245
|
+
|
1246
|
+
_param = self._free_text_get_default_values_serialize(
|
1247
|
+
_request_auth=_request_auth,
|
1248
|
+
_content_type=_content_type,
|
1249
|
+
_headers=_headers,
|
1250
|
+
_host_index=_host_index
|
1251
|
+
)
|
1252
|
+
|
1253
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1254
|
+
'200': "DatasetDefaultValuesModel",
|
1255
|
+
}
|
1256
|
+
response_data = self.api_client.call_api(
|
1257
|
+
*_param,
|
1258
|
+
_request_timeout=_request_timeout
|
1259
|
+
)
|
1260
|
+
response_data.read()
|
1261
|
+
return self.api_client.response_deserialize(
|
1262
|
+
response_data=response_data,
|
1263
|
+
response_types_map=_response_types_map,
|
1264
|
+
).data
|
1265
|
+
|
1266
|
+
|
1267
|
+
@validate_call
|
1268
|
+
def free_text_get_default_values_with_http_info(
|
1269
|
+
self,
|
1270
|
+
_request_timeout: Union[
|
1271
|
+
None,
|
1272
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1273
|
+
Tuple[
|
1274
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1275
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1276
|
+
]
|
1277
|
+
] = None,
|
1278
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1279
|
+
_content_type: Optional[StrictStr] = None,
|
1280
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1281
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1282
|
+
) -> ApiResponse[DatasetDefaultValuesModel]:
|
1283
|
+
"""Default configs for a dataset
|
1284
|
+
|
1285
|
+
|
1286
|
+
:param _request_timeout: timeout setting for this request. If one
|
1287
|
+
number provided, it will be total request
|
1288
|
+
timeout. It can also be a pair (tuple) of
|
1289
|
+
(connection, read) timeouts.
|
1290
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1291
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1292
|
+
request; this effectively ignores the
|
1293
|
+
authentication in the spec for a single request.
|
1294
|
+
:type _request_auth: dict, optional
|
1295
|
+
:param _content_type: force content-type for the request.
|
1296
|
+
:type _content_type: str, Optional
|
1297
|
+
:param _headers: set to override the headers for a single
|
1298
|
+
request; this effectively ignores the headers
|
1299
|
+
in the spec for a single request.
|
1300
|
+
:type _headers: dict, optional
|
1301
|
+
:param _host_index: set to override the host_index for a single
|
1302
|
+
request; this effectively ignores the host_index
|
1303
|
+
in the spec for a single request.
|
1304
|
+
:type _host_index: int, optional
|
1305
|
+
:return: Returns the result object.
|
1306
|
+
""" # noqa: E501
|
1307
|
+
|
1308
|
+
_param = self._free_text_get_default_values_serialize(
|
1309
|
+
_request_auth=_request_auth,
|
1310
|
+
_content_type=_content_type,
|
1311
|
+
_headers=_headers,
|
1312
|
+
_host_index=_host_index
|
1313
|
+
)
|
1314
|
+
|
1315
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1316
|
+
'200': "DatasetDefaultValuesModel",
|
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 free_text_get_default_values_without_preload_content(
|
1331
|
+
self,
|
1332
|
+
_request_timeout: Union[
|
1333
|
+
None,
|
1334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1335
|
+
Tuple[
|
1336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1337
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1338
|
+
]
|
1339
|
+
] = None,
|
1340
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1341
|
+
_content_type: Optional[StrictStr] = None,
|
1342
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1343
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1344
|
+
) -> RESTResponseType:
|
1345
|
+
"""Default configs for a dataset
|
1346
|
+
|
1347
|
+
|
1348
|
+
:param _request_timeout: timeout setting for this request. If one
|
1349
|
+
number provided, it will be total request
|
1350
|
+
timeout. It can also be a pair (tuple) of
|
1351
|
+
(connection, read) timeouts.
|
1352
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1353
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1354
|
+
request; this effectively ignores the
|
1355
|
+
authentication in the spec for a single request.
|
1356
|
+
:type _request_auth: dict, optional
|
1357
|
+
:param _content_type: force content-type for the request.
|
1358
|
+
:type _content_type: str, Optional
|
1359
|
+
:param _headers: set to override the headers for a single
|
1360
|
+
request; this effectively ignores the headers
|
1361
|
+
in the spec for a single request.
|
1362
|
+
:type _headers: dict, optional
|
1363
|
+
:param _host_index: set to override the host_index for a single
|
1364
|
+
request; this effectively ignores the host_index
|
1365
|
+
in the spec for a single request.
|
1366
|
+
:type _host_index: int, optional
|
1367
|
+
:return: Returns the result object.
|
1368
|
+
""" # noqa: E501
|
1369
|
+
|
1370
|
+
_param = self._free_text_get_default_values_serialize(
|
1371
|
+
_request_auth=_request_auth,
|
1372
|
+
_content_type=_content_type,
|
1373
|
+
_headers=_headers,
|
1374
|
+
_host_index=_host_index
|
1375
|
+
)
|
1376
|
+
|
1377
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1378
|
+
'200': "DatasetDefaultValuesModel",
|
1379
|
+
}
|
1380
|
+
response_data = self.api_client.call_api(
|
1381
|
+
*_param,
|
1382
|
+
_request_timeout=_request_timeout
|
1383
|
+
)
|
1384
|
+
return response_data.response
|
1385
|
+
|
1386
|
+
|
1387
|
+
def _free_text_get_default_values_serialize(
|
1388
|
+
self,
|
1389
|
+
_request_auth,
|
1390
|
+
_content_type,
|
1391
|
+
_headers,
|
1392
|
+
_host_index,
|
1393
|
+
) -> RequestSerialized:
|
1394
|
+
|
1395
|
+
_host = None
|
1396
|
+
|
1397
|
+
_collection_formats: Dict[str, str] = {
|
1398
|
+
}
|
1399
|
+
|
1400
|
+
_path_params: Dict[str, str] = {}
|
1401
|
+
_query_params: List[Tuple[str, str]] = []
|
1402
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1403
|
+
_form_params: List[Tuple[str, str]] = []
|
1404
|
+
_files: Dict[
|
1405
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1406
|
+
] = {}
|
1407
|
+
_body_params: Optional[bytes] = None
|
1408
|
+
|
1409
|
+
# process the path parameters
|
1410
|
+
# process the query parameters
|
1411
|
+
# process the header parameters
|
1412
|
+
# process the form parameters
|
1413
|
+
# process the body parameter
|
1414
|
+
|
1415
|
+
|
1416
|
+
# set the HTTP header `Accept`
|
1417
|
+
if 'Accept' not in _header_params:
|
1418
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1419
|
+
[
|
1420
|
+
'*/*'
|
1421
|
+
]
|
1422
|
+
)
|
1423
|
+
|
1424
|
+
|
1425
|
+
# authentication setting
|
1426
|
+
_auth_settings: List[str] = [
|
1427
|
+
'QAnswer-Api-Key',
|
1428
|
+
'Bearer'
|
1429
|
+
]
|
1430
|
+
|
1431
|
+
return self.api_client.param_serialize(
|
1432
|
+
method='GET',
|
1433
|
+
resource_path='/api/dataset/config/default-values',
|
1434
|
+
path_params=_path_params,
|
1435
|
+
query_params=_query_params,
|
1436
|
+
header_params=_header_params,
|
1437
|
+
body=_body_params,
|
1438
|
+
post_params=_form_params,
|
1439
|
+
files=_files,
|
1440
|
+
auth_settings=_auth_settings,
|
1441
|
+
collection_formats=_collection_formats,
|
1442
|
+
_host=_host,
|
1443
|
+
_request_auth=_request_auth
|
1444
|
+
)
|
1445
|
+
|
1446
|
+
|
1447
|
+
|
1448
|
+
|
1449
|
+
@validate_call
|
1450
|
+
def free_text_logs_visibility_preferences_available_choices(
|
1451
|
+
self,
|
1452
|
+
_request_timeout: Union[
|
1453
|
+
None,
|
1454
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1455
|
+
Tuple[
|
1456
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1457
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1458
|
+
]
|
1459
|
+
] = None,
|
1460
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1461
|
+
_content_type: Optional[StrictStr] = None,
|
1462
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1463
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1464
|
+
) -> List[AvailableLogsVisibilityPolicy]:
|
1465
|
+
"""List all logs visibility preferences that can be used for a dataset
|
1466
|
+
|
1467
|
+
|
1468
|
+
:param _request_timeout: timeout setting for this request. If one
|
1469
|
+
number provided, it will be total request
|
1470
|
+
timeout. It can also be a pair (tuple) of
|
1471
|
+
(connection, read) timeouts.
|
1472
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1473
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1474
|
+
request; this effectively ignores the
|
1475
|
+
authentication in the spec for a single request.
|
1476
|
+
:type _request_auth: dict, optional
|
1477
|
+
:param _content_type: force content-type for the request.
|
1478
|
+
:type _content_type: str, Optional
|
1479
|
+
:param _headers: set to override the headers for a single
|
1480
|
+
request; this effectively ignores the headers
|
1481
|
+
in the spec for a single request.
|
1482
|
+
:type _headers: dict, optional
|
1483
|
+
:param _host_index: set to override the host_index for a single
|
1484
|
+
request; this effectively ignores the host_index
|
1485
|
+
in the spec for a single request.
|
1486
|
+
:type _host_index: int, optional
|
1487
|
+
:return: Returns the result object.
|
1488
|
+
""" # noqa: E501
|
1489
|
+
|
1490
|
+
_param = self._free_text_logs_visibility_preferences_available_choices_serialize(
|
1491
|
+
_request_auth=_request_auth,
|
1492
|
+
_content_type=_content_type,
|
1493
|
+
_headers=_headers,
|
1494
|
+
_host_index=_host_index
|
1495
|
+
)
|
1496
|
+
|
1497
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1498
|
+
'200': "List[AvailableLogsVisibilityPolicy]",
|
1499
|
+
}
|
1500
|
+
response_data = self.api_client.call_api(
|
1501
|
+
*_param,
|
1502
|
+
_request_timeout=_request_timeout
|
1503
|
+
)
|
1504
|
+
response_data.read()
|
1505
|
+
return self.api_client.response_deserialize(
|
1506
|
+
response_data=response_data,
|
1507
|
+
response_types_map=_response_types_map,
|
1508
|
+
).data
|
1509
|
+
|
1510
|
+
|
1511
|
+
@validate_call
|
1512
|
+
def free_text_logs_visibility_preferences_available_choices_with_http_info(
|
1513
|
+
self,
|
1514
|
+
_request_timeout: Union[
|
1515
|
+
None,
|
1516
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1517
|
+
Tuple[
|
1518
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1519
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1520
|
+
]
|
1521
|
+
] = None,
|
1522
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1523
|
+
_content_type: Optional[StrictStr] = None,
|
1524
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1525
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1526
|
+
) -> ApiResponse[List[AvailableLogsVisibilityPolicy]]:
|
1527
|
+
"""List all logs visibility preferences that can be used for a dataset
|
1528
|
+
|
1529
|
+
|
1530
|
+
:param _request_timeout: timeout setting for this request. If one
|
1531
|
+
number provided, it will be total request
|
1532
|
+
timeout. It can also be a pair (tuple) of
|
1533
|
+
(connection, read) timeouts.
|
1534
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1535
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1536
|
+
request; this effectively ignores the
|
1537
|
+
authentication in the spec for a single request.
|
1538
|
+
:type _request_auth: dict, optional
|
1539
|
+
:param _content_type: force content-type for the request.
|
1540
|
+
:type _content_type: str, Optional
|
1541
|
+
:param _headers: set to override the headers for a single
|
1542
|
+
request; this effectively ignores the headers
|
1543
|
+
in the spec for a single request.
|
1544
|
+
:type _headers: dict, optional
|
1545
|
+
:param _host_index: set to override the host_index for a single
|
1546
|
+
request; this effectively ignores the host_index
|
1547
|
+
in the spec for a single request.
|
1548
|
+
:type _host_index: int, optional
|
1549
|
+
:return: Returns the result object.
|
1550
|
+
""" # noqa: E501
|
1551
|
+
|
1552
|
+
_param = self._free_text_logs_visibility_preferences_available_choices_serialize(
|
1553
|
+
_request_auth=_request_auth,
|
1554
|
+
_content_type=_content_type,
|
1555
|
+
_headers=_headers,
|
1556
|
+
_host_index=_host_index
|
1557
|
+
)
|
1558
|
+
|
1559
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1560
|
+
'200': "List[AvailableLogsVisibilityPolicy]",
|
1561
|
+
}
|
1562
|
+
response_data = self.api_client.call_api(
|
1563
|
+
*_param,
|
1564
|
+
_request_timeout=_request_timeout
|
1565
|
+
)
|
1566
|
+
response_data.read()
|
1567
|
+
return self.api_client.response_deserialize(
|
1568
|
+
response_data=response_data,
|
1569
|
+
response_types_map=_response_types_map,
|
1570
|
+
)
|
1571
|
+
|
1572
|
+
|
1573
|
+
@validate_call
|
1574
|
+
def free_text_logs_visibility_preferences_available_choices_without_preload_content(
|
1575
|
+
self,
|
1576
|
+
_request_timeout: Union[
|
1577
|
+
None,
|
1578
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1579
|
+
Tuple[
|
1580
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1581
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1582
|
+
]
|
1583
|
+
] = None,
|
1584
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1585
|
+
_content_type: Optional[StrictStr] = None,
|
1586
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1587
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1588
|
+
) -> RESTResponseType:
|
1589
|
+
"""List all logs visibility preferences that can be used for a dataset
|
1590
|
+
|
1591
|
+
|
1592
|
+
:param _request_timeout: timeout setting for this request. If one
|
1593
|
+
number provided, it will be total request
|
1594
|
+
timeout. It can also be a pair (tuple) of
|
1595
|
+
(connection, read) timeouts.
|
1596
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1597
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1598
|
+
request; this effectively ignores the
|
1599
|
+
authentication in the spec for a single request.
|
1600
|
+
:type _request_auth: dict, optional
|
1601
|
+
:param _content_type: force content-type for the request.
|
1602
|
+
:type _content_type: str, Optional
|
1603
|
+
:param _headers: set to override the headers for a single
|
1604
|
+
request; this effectively ignores the headers
|
1605
|
+
in the spec for a single request.
|
1606
|
+
:type _headers: dict, optional
|
1607
|
+
:param _host_index: set to override the host_index for a single
|
1608
|
+
request; this effectively ignores the host_index
|
1609
|
+
in the spec for a single request.
|
1610
|
+
:type _host_index: int, optional
|
1611
|
+
:return: Returns the result object.
|
1612
|
+
""" # noqa: E501
|
1613
|
+
|
1614
|
+
_param = self._free_text_logs_visibility_preferences_available_choices_serialize(
|
1615
|
+
_request_auth=_request_auth,
|
1616
|
+
_content_type=_content_type,
|
1617
|
+
_headers=_headers,
|
1618
|
+
_host_index=_host_index
|
1619
|
+
)
|
1620
|
+
|
1621
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1622
|
+
'200': "List[AvailableLogsVisibilityPolicy]",
|
1623
|
+
}
|
1624
|
+
response_data = self.api_client.call_api(
|
1625
|
+
*_param,
|
1626
|
+
_request_timeout=_request_timeout
|
1627
|
+
)
|
1628
|
+
return response_data.response
|
1629
|
+
|
1630
|
+
|
1631
|
+
def _free_text_logs_visibility_preferences_available_choices_serialize(
|
1632
|
+
self,
|
1633
|
+
_request_auth,
|
1634
|
+
_content_type,
|
1635
|
+
_headers,
|
1636
|
+
_host_index,
|
1637
|
+
) -> RequestSerialized:
|
1638
|
+
|
1639
|
+
_host = None
|
1640
|
+
|
1641
|
+
_collection_formats: Dict[str, str] = {
|
1642
|
+
}
|
1643
|
+
|
1644
|
+
_path_params: Dict[str, str] = {}
|
1645
|
+
_query_params: List[Tuple[str, str]] = []
|
1646
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1647
|
+
_form_params: List[Tuple[str, str]] = []
|
1648
|
+
_files: Dict[
|
1649
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1650
|
+
] = {}
|
1651
|
+
_body_params: Optional[bytes] = None
|
1652
|
+
|
1653
|
+
# process the path parameters
|
1654
|
+
# process the query parameters
|
1655
|
+
# process the header parameters
|
1656
|
+
# process the form parameters
|
1657
|
+
# process the body parameter
|
1658
|
+
|
1659
|
+
|
1660
|
+
# set the HTTP header `Accept`
|
1661
|
+
if 'Accept' not in _header_params:
|
1662
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1663
|
+
[
|
1664
|
+
'*/*'
|
1665
|
+
]
|
1666
|
+
)
|
1667
|
+
|
1668
|
+
|
1669
|
+
# authentication setting
|
1670
|
+
_auth_settings: List[str] = [
|
1671
|
+
'QAnswer-Api-Key',
|
1672
|
+
'Bearer'
|
1673
|
+
]
|
1674
|
+
|
1675
|
+
return self.api_client.param_serialize(
|
1676
|
+
method='GET',
|
1677
|
+
resource_path='/api/dataset/config/logs-visibility_preferences/available-choices',
|
1678
|
+
path_params=_path_params,
|
1679
|
+
query_params=_query_params,
|
1680
|
+
header_params=_header_params,
|
1681
|
+
body=_body_params,
|
1682
|
+
post_params=_form_params,
|
1683
|
+
files=_files,
|
1684
|
+
auth_settings=_auth_settings,
|
1685
|
+
collection_formats=_collection_formats,
|
1686
|
+
_host=_host,
|
1687
|
+
_request_auth=_request_auth
|
1688
|
+
)
|
1689
|
+
|
1690
|
+
|
1691
|
+
|
1692
|
+
|
1693
|
+
@validate_call
|
1694
|
+
def free_text_summariser_available_data_storage_preferences(
|
1695
|
+
self,
|
1696
|
+
_request_timeout: Union[
|
1697
|
+
None,
|
1698
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1699
|
+
Tuple[
|
1700
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1701
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1702
|
+
]
|
1703
|
+
] = None,
|
1704
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1705
|
+
_content_type: Optional[StrictStr] = None,
|
1706
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1707
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1708
|
+
) -> List[AvailableStoragePreference]:
|
1709
|
+
"""List all data storage preferences that can be used for a dataset
|
1710
|
+
|
1711
|
+
|
1712
|
+
:param _request_timeout: timeout setting for this request. If one
|
1713
|
+
number provided, it will be total request
|
1714
|
+
timeout. It can also be a pair (tuple) of
|
1715
|
+
(connection, read) timeouts.
|
1716
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1717
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1718
|
+
request; this effectively ignores the
|
1719
|
+
authentication in the spec for a single request.
|
1720
|
+
:type _request_auth: dict, optional
|
1721
|
+
:param _content_type: force content-type for the request.
|
1722
|
+
:type _content_type: str, Optional
|
1723
|
+
:param _headers: set to override the headers for a single
|
1724
|
+
request; this effectively ignores the headers
|
1725
|
+
in the spec for a single request.
|
1726
|
+
:type _headers: dict, optional
|
1727
|
+
:param _host_index: set to override the host_index for a single
|
1728
|
+
request; this effectively ignores the host_index
|
1729
|
+
in the spec for a single request.
|
1730
|
+
:type _host_index: int, optional
|
1731
|
+
:return: Returns the result object.
|
1732
|
+
""" # noqa: E501
|
1733
|
+
|
1734
|
+
_param = self._free_text_summariser_available_data_storage_preferences_serialize(
|
1735
|
+
_request_auth=_request_auth,
|
1736
|
+
_content_type=_content_type,
|
1737
|
+
_headers=_headers,
|
1738
|
+
_host_index=_host_index
|
1739
|
+
)
|
1740
|
+
|
1741
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1742
|
+
'200': "List[AvailableStoragePreference]",
|
1743
|
+
}
|
1744
|
+
response_data = self.api_client.call_api(
|
1745
|
+
*_param,
|
1746
|
+
_request_timeout=_request_timeout
|
1747
|
+
)
|
1748
|
+
response_data.read()
|
1749
|
+
return self.api_client.response_deserialize(
|
1750
|
+
response_data=response_data,
|
1751
|
+
response_types_map=_response_types_map,
|
1752
|
+
).data
|
1753
|
+
|
1754
|
+
|
1755
|
+
@validate_call
|
1756
|
+
def free_text_summariser_available_data_storage_preferences_with_http_info(
|
1757
|
+
self,
|
1758
|
+
_request_timeout: Union[
|
1759
|
+
None,
|
1760
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1761
|
+
Tuple[
|
1762
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1763
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1764
|
+
]
|
1765
|
+
] = None,
|
1766
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1767
|
+
_content_type: Optional[StrictStr] = None,
|
1768
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1769
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1770
|
+
) -> ApiResponse[List[AvailableStoragePreference]]:
|
1771
|
+
"""List all data storage preferences that can be used for a dataset
|
1772
|
+
|
1773
|
+
|
1774
|
+
:param _request_timeout: timeout setting for this request. If one
|
1775
|
+
number provided, it will be total request
|
1776
|
+
timeout. It can also be a pair (tuple) of
|
1777
|
+
(connection, read) timeouts.
|
1778
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1779
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1780
|
+
request; this effectively ignores the
|
1781
|
+
authentication in the spec for a single request.
|
1782
|
+
:type _request_auth: dict, optional
|
1783
|
+
:param _content_type: force content-type for the request.
|
1784
|
+
:type _content_type: str, Optional
|
1785
|
+
:param _headers: set to override the headers for a single
|
1786
|
+
request; this effectively ignores the headers
|
1787
|
+
in the spec for a single request.
|
1788
|
+
:type _headers: dict, optional
|
1789
|
+
:param _host_index: set to override the host_index for a single
|
1790
|
+
request; this effectively ignores the host_index
|
1791
|
+
in the spec for a single request.
|
1792
|
+
:type _host_index: int, optional
|
1793
|
+
:return: Returns the result object.
|
1794
|
+
""" # noqa: E501
|
1795
|
+
|
1796
|
+
_param = self._free_text_summariser_available_data_storage_preferences_serialize(
|
1797
|
+
_request_auth=_request_auth,
|
1798
|
+
_content_type=_content_type,
|
1799
|
+
_headers=_headers,
|
1800
|
+
_host_index=_host_index
|
1801
|
+
)
|
1802
|
+
|
1803
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1804
|
+
'200': "List[AvailableStoragePreference]",
|
1805
|
+
}
|
1806
|
+
response_data = self.api_client.call_api(
|
1807
|
+
*_param,
|
1808
|
+
_request_timeout=_request_timeout
|
1809
|
+
)
|
1810
|
+
response_data.read()
|
1811
|
+
return self.api_client.response_deserialize(
|
1812
|
+
response_data=response_data,
|
1813
|
+
response_types_map=_response_types_map,
|
1814
|
+
)
|
1815
|
+
|
1816
|
+
|
1817
|
+
@validate_call
|
1818
|
+
def free_text_summariser_available_data_storage_preferences_without_preload_content(
|
1819
|
+
self,
|
1820
|
+
_request_timeout: Union[
|
1821
|
+
None,
|
1822
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1823
|
+
Tuple[
|
1824
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1825
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1826
|
+
]
|
1827
|
+
] = None,
|
1828
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1829
|
+
_content_type: Optional[StrictStr] = None,
|
1830
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1831
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1832
|
+
) -> RESTResponseType:
|
1833
|
+
"""List all data storage preferences that can be used for a dataset
|
1834
|
+
|
1835
|
+
|
1836
|
+
:param _request_timeout: timeout setting for this request. If one
|
1837
|
+
number provided, it will be total request
|
1838
|
+
timeout. It can also be a pair (tuple) of
|
1839
|
+
(connection, read) timeouts.
|
1840
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1841
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1842
|
+
request; this effectively ignores the
|
1843
|
+
authentication in the spec for a single request.
|
1844
|
+
:type _request_auth: dict, optional
|
1845
|
+
:param _content_type: force content-type for the request.
|
1846
|
+
:type _content_type: str, Optional
|
1847
|
+
:param _headers: set to override the headers for a single
|
1848
|
+
request; this effectively ignores the headers
|
1849
|
+
in the spec for a single request.
|
1850
|
+
:type _headers: dict, optional
|
1851
|
+
:param _host_index: set to override the host_index for a single
|
1852
|
+
request; this effectively ignores the host_index
|
1853
|
+
in the spec for a single request.
|
1854
|
+
:type _host_index: int, optional
|
1855
|
+
:return: Returns the result object.
|
1856
|
+
""" # noqa: E501
|
1857
|
+
|
1858
|
+
_param = self._free_text_summariser_available_data_storage_preferences_serialize(
|
1859
|
+
_request_auth=_request_auth,
|
1860
|
+
_content_type=_content_type,
|
1861
|
+
_headers=_headers,
|
1862
|
+
_host_index=_host_index
|
1863
|
+
)
|
1864
|
+
|
1865
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1866
|
+
'200': "List[AvailableStoragePreference]",
|
1867
|
+
}
|
1868
|
+
response_data = self.api_client.call_api(
|
1869
|
+
*_param,
|
1870
|
+
_request_timeout=_request_timeout
|
1871
|
+
)
|
1872
|
+
return response_data.response
|
1873
|
+
|
1874
|
+
|
1875
|
+
def _free_text_summariser_available_data_storage_preferences_serialize(
|
1876
|
+
self,
|
1877
|
+
_request_auth,
|
1878
|
+
_content_type,
|
1879
|
+
_headers,
|
1880
|
+
_host_index,
|
1881
|
+
) -> RequestSerialized:
|
1882
|
+
|
1883
|
+
_host = None
|
1884
|
+
|
1885
|
+
_collection_formats: Dict[str, str] = {
|
1886
|
+
}
|
1887
|
+
|
1888
|
+
_path_params: Dict[str, str] = {}
|
1889
|
+
_query_params: List[Tuple[str, str]] = []
|
1890
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1891
|
+
_form_params: List[Tuple[str, str]] = []
|
1892
|
+
_files: Dict[
|
1893
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1894
|
+
] = {}
|
1895
|
+
_body_params: Optional[bytes] = None
|
1896
|
+
|
1897
|
+
# process the path parameters
|
1898
|
+
# process the query parameters
|
1899
|
+
# process the header parameters
|
1900
|
+
# process the form parameters
|
1901
|
+
# process the body parameter
|
1902
|
+
|
1903
|
+
|
1904
|
+
# set the HTTP header `Accept`
|
1905
|
+
if 'Accept' not in _header_params:
|
1906
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1907
|
+
[
|
1908
|
+
'*/*'
|
1909
|
+
]
|
1910
|
+
)
|
1911
|
+
|
1912
|
+
|
1913
|
+
# authentication setting
|
1914
|
+
_auth_settings: List[str] = [
|
1915
|
+
'QAnswer-Api-Key',
|
1916
|
+
'Bearer'
|
1917
|
+
]
|
1918
|
+
|
1919
|
+
return self.api_client.param_serialize(
|
1920
|
+
method='GET',
|
1921
|
+
resource_path='/api/dataset/config/data-storage-preferences/available-choices',
|
1922
|
+
path_params=_path_params,
|
1923
|
+
query_params=_query_params,
|
1924
|
+
header_params=_header_params,
|
1925
|
+
body=_body_params,
|
1926
|
+
post_params=_form_params,
|
1927
|
+
files=_files,
|
1928
|
+
auth_settings=_auth_settings,
|
1929
|
+
collection_formats=_collection_formats,
|
1930
|
+
_host=_host,
|
1931
|
+
_request_auth=_request_auth
|
1932
|
+
)
|
1933
|
+
|
1934
|
+
|
1935
|
+
|
1936
|
+
|
1937
|
+
@validate_call
|
1938
|
+
def get_available_embedding_models(
|
1939
|
+
self,
|
1940
|
+
_request_timeout: Union[
|
1941
|
+
None,
|
1942
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1943
|
+
Tuple[
|
1944
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1945
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1946
|
+
]
|
1947
|
+
] = None,
|
1948
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1949
|
+
_content_type: Optional[StrictStr] = None,
|
1950
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1951
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1952
|
+
) -> AvailableEmbeddingModelsResponse:
|
1953
|
+
"""Embedding models that can be used at creation time for a dataset
|
1954
|
+
|
1955
|
+
|
1956
|
+
:param _request_timeout: timeout setting for this request. If one
|
1957
|
+
number provided, it will be total request
|
1958
|
+
timeout. It can also be a pair (tuple) of
|
1959
|
+
(connection, read) timeouts.
|
1960
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1961
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1962
|
+
request; this effectively ignores the
|
1963
|
+
authentication in the spec for a single request.
|
1964
|
+
:type _request_auth: dict, optional
|
1965
|
+
:param _content_type: force content-type for the request.
|
1966
|
+
:type _content_type: str, Optional
|
1967
|
+
:param _headers: set to override the headers for a single
|
1968
|
+
request; this effectively ignores the headers
|
1969
|
+
in the spec for a single request.
|
1970
|
+
:type _headers: dict, optional
|
1971
|
+
:param _host_index: set to override the host_index for a single
|
1972
|
+
request; this effectively ignores the host_index
|
1973
|
+
in the spec for a single request.
|
1974
|
+
:type _host_index: int, optional
|
1975
|
+
:return: Returns the result object.
|
1976
|
+
""" # noqa: E501
|
1977
|
+
|
1978
|
+
_param = self._get_available_embedding_models_serialize(
|
1979
|
+
_request_auth=_request_auth,
|
1980
|
+
_content_type=_content_type,
|
1981
|
+
_headers=_headers,
|
1982
|
+
_host_index=_host_index
|
1983
|
+
)
|
1984
|
+
|
1985
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1986
|
+
'200': "AvailableEmbeddingModelsResponse",
|
1987
|
+
}
|
1988
|
+
response_data = self.api_client.call_api(
|
1989
|
+
*_param,
|
1990
|
+
_request_timeout=_request_timeout
|
1991
|
+
)
|
1992
|
+
response_data.read()
|
1993
|
+
return self.api_client.response_deserialize(
|
1994
|
+
response_data=response_data,
|
1995
|
+
response_types_map=_response_types_map,
|
1996
|
+
).data
|
1997
|
+
|
1998
|
+
|
1999
|
+
@validate_call
|
2000
|
+
def get_available_embedding_models_with_http_info(
|
2001
|
+
self,
|
2002
|
+
_request_timeout: Union[
|
2003
|
+
None,
|
2004
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2005
|
+
Tuple[
|
2006
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2007
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2008
|
+
]
|
2009
|
+
] = None,
|
2010
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2011
|
+
_content_type: Optional[StrictStr] = None,
|
2012
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2013
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2014
|
+
) -> ApiResponse[AvailableEmbeddingModelsResponse]:
|
2015
|
+
"""Embedding models that can be used at creation time for a dataset
|
2016
|
+
|
2017
|
+
|
2018
|
+
:param _request_timeout: timeout setting for this request. If one
|
2019
|
+
number provided, it will be total request
|
2020
|
+
timeout. It can also be a pair (tuple) of
|
2021
|
+
(connection, read) timeouts.
|
2022
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2023
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2024
|
+
request; this effectively ignores the
|
2025
|
+
authentication in the spec for a single request.
|
2026
|
+
:type _request_auth: dict, optional
|
2027
|
+
:param _content_type: force content-type for the request.
|
2028
|
+
:type _content_type: str, Optional
|
2029
|
+
:param _headers: set to override the headers for a single
|
2030
|
+
request; this effectively ignores the headers
|
2031
|
+
in the spec for a single request.
|
2032
|
+
:type _headers: dict, optional
|
2033
|
+
:param _host_index: set to override the host_index for a single
|
2034
|
+
request; this effectively ignores the host_index
|
2035
|
+
in the spec for a single request.
|
2036
|
+
:type _host_index: int, optional
|
2037
|
+
:return: Returns the result object.
|
2038
|
+
""" # noqa: E501
|
2039
|
+
|
2040
|
+
_param = self._get_available_embedding_models_serialize(
|
2041
|
+
_request_auth=_request_auth,
|
2042
|
+
_content_type=_content_type,
|
2043
|
+
_headers=_headers,
|
2044
|
+
_host_index=_host_index
|
2045
|
+
)
|
2046
|
+
|
2047
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2048
|
+
'200': "AvailableEmbeddingModelsResponse",
|
2049
|
+
}
|
2050
|
+
response_data = self.api_client.call_api(
|
2051
|
+
*_param,
|
2052
|
+
_request_timeout=_request_timeout
|
2053
|
+
)
|
2054
|
+
response_data.read()
|
2055
|
+
return self.api_client.response_deserialize(
|
2056
|
+
response_data=response_data,
|
2057
|
+
response_types_map=_response_types_map,
|
2058
|
+
)
|
2059
|
+
|
2060
|
+
|
2061
|
+
@validate_call
|
2062
|
+
def get_available_embedding_models_without_preload_content(
|
2063
|
+
self,
|
2064
|
+
_request_timeout: Union[
|
2065
|
+
None,
|
2066
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2067
|
+
Tuple[
|
2068
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2069
|
+
Annotated[StrictFloat, Field(gt=0)]
|
2070
|
+
]
|
2071
|
+
] = None,
|
2072
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2073
|
+
_content_type: Optional[StrictStr] = None,
|
2074
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2075
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2076
|
+
) -> RESTResponseType:
|
2077
|
+
"""Embedding models that can be used at creation time for a dataset
|
2078
|
+
|
2079
|
+
|
2080
|
+
:param _request_timeout: timeout setting for this request. If one
|
2081
|
+
number provided, it will be total request
|
2082
|
+
timeout. It can also be a pair (tuple) of
|
2083
|
+
(connection, read) timeouts.
|
2084
|
+
:type _request_timeout: int, tuple(int, int), optional
|
2085
|
+
:param _request_auth: set to override the auth_settings for an a single
|
2086
|
+
request; this effectively ignores the
|
2087
|
+
authentication in the spec for a single request.
|
2088
|
+
:type _request_auth: dict, optional
|
2089
|
+
:param _content_type: force content-type for the request.
|
2090
|
+
:type _content_type: str, Optional
|
2091
|
+
:param _headers: set to override the headers for a single
|
2092
|
+
request; this effectively ignores the headers
|
2093
|
+
in the spec for a single request.
|
2094
|
+
:type _headers: dict, optional
|
2095
|
+
:param _host_index: set to override the host_index for a single
|
2096
|
+
request; this effectively ignores the host_index
|
2097
|
+
in the spec for a single request.
|
2098
|
+
:type _host_index: int, optional
|
2099
|
+
:return: Returns the result object.
|
2100
|
+
""" # noqa: E501
|
2101
|
+
|
2102
|
+
_param = self._get_available_embedding_models_serialize(
|
2103
|
+
_request_auth=_request_auth,
|
2104
|
+
_content_type=_content_type,
|
2105
|
+
_headers=_headers,
|
2106
|
+
_host_index=_host_index
|
2107
|
+
)
|
2108
|
+
|
2109
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
2110
|
+
'200': "AvailableEmbeddingModelsResponse",
|
2111
|
+
}
|
2112
|
+
response_data = self.api_client.call_api(
|
2113
|
+
*_param,
|
2114
|
+
_request_timeout=_request_timeout
|
2115
|
+
)
|
2116
|
+
return response_data.response
|
2117
|
+
|
2118
|
+
|
2119
|
+
def _get_available_embedding_models_serialize(
|
2120
|
+
self,
|
2121
|
+
_request_auth,
|
2122
|
+
_content_type,
|
2123
|
+
_headers,
|
2124
|
+
_host_index,
|
2125
|
+
) -> RequestSerialized:
|
2126
|
+
|
2127
|
+
_host = None
|
2128
|
+
|
2129
|
+
_collection_formats: Dict[str, str] = {
|
2130
|
+
}
|
2131
|
+
|
2132
|
+
_path_params: Dict[str, str] = {}
|
2133
|
+
_query_params: List[Tuple[str, str]] = []
|
2134
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
2135
|
+
_form_params: List[Tuple[str, str]] = []
|
2136
|
+
_files: Dict[
|
2137
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
2138
|
+
] = {}
|
2139
|
+
_body_params: Optional[bytes] = None
|
2140
|
+
|
2141
|
+
# process the path parameters
|
2142
|
+
# process the query parameters
|
2143
|
+
# process the header parameters
|
2144
|
+
# process the form parameters
|
2145
|
+
# process the body parameter
|
2146
|
+
|
2147
|
+
|
2148
|
+
# set the HTTP header `Accept`
|
2149
|
+
if 'Accept' not in _header_params:
|
2150
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2151
|
+
[
|
2152
|
+
'*/*'
|
2153
|
+
]
|
2154
|
+
)
|
2155
|
+
|
2156
|
+
|
2157
|
+
# authentication setting
|
2158
|
+
_auth_settings: List[str] = [
|
2159
|
+
'QAnswer-Api-Key',
|
2160
|
+
'Bearer'
|
2161
|
+
]
|
2162
|
+
|
2163
|
+
return self.api_client.param_serialize(
|
2164
|
+
method='GET',
|
2165
|
+
resource_path='/api/dataset/config/models-available',
|
2166
|
+
path_params=_path_params,
|
2167
|
+
query_params=_query_params,
|
2168
|
+
header_params=_header_params,
|
2169
|
+
body=_body_params,
|
2170
|
+
post_params=_form_params,
|
2171
|
+
files=_files,
|
2172
|
+
auth_settings=_auth_settings,
|
2173
|
+
collection_formats=_collection_formats,
|
2174
|
+
_host=_host,
|
2175
|
+
_request_auth=_request_auth
|
2176
|
+
)
|
2177
|
+
|
2178
|
+
|