qanswer-sdk 0.1.0.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qanswer_sdk/__init__.py +1256 -0
- qanswer_sdk/api/__init__.py +63 -0
- qanswer_sdk/api/admin_api.py +7893 -0
- qanswer_sdk/api/ai_assistant_access_rights_api.py +5881 -0
- qanswer_sdk/api/ai_assistant_api.py +11047 -0
- qanswer_sdk/api/anthropic_compatible_api.py +311 -0
- qanswer_sdk/api/auto_complete_api.py +612 -0
- qanswer_sdk/api/bot_slack_api.py +1015 -0
- qanswer_sdk/api/branding_api.py +5733 -0
- qanswer_sdk/api/bulk_reindex_api.py +2029 -0
- qanswer_sdk/api/chatbot_api.py +1102 -0
- qanswer_sdk/api/connector_audio_api.py +3469 -0
- qanswer_sdk/api/connector_document_api.py +2685 -0
- qanswer_sdk/api/connector_e_consilium_api.py +333 -0
- qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1231 -0
- qanswer_sdk/api/connector_google_drive_api.py +2175 -0
- qanswer_sdk/api/connector_imapapi_api.py +1866 -0
- qanswer_sdk/api/connector_one_drive_api.py +1579 -0
- qanswer_sdk/api/connector_onenote_api.py +1596 -0
- qanswer_sdk/api/connector_pinecone_api.py +893 -0
- qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
- qanswer_sdk/api/connector_qn_a_api.py +1521 -0
- qanswer_sdk/api/connector_rdf_answer_api.py +1454 -0
- qanswer_sdk/api/connector_rdf_api.py +5090 -0
- qanswer_sdk/api/connector_sharepoint_api.py +3926 -0
- qanswer_sdk/api/connector_websearch_api.py +332 -0
- qanswer_sdk/api/connector_website_api.py +3108 -0
- qanswer_sdk/api/connector_x_wiki_api_api.py +1278 -0
- qanswer_sdk/api/connectors_api.py +6946 -0
- qanswer_sdk/api/connectors_data_api.py +5903 -0
- qanswer_sdk/api/conversation_logs_api.py +14228 -0
- qanswer_sdk/api/dataset_config_api.py +4016 -0
- qanswer_sdk/api/debug_api.py +278 -0
- qanswer_sdk/api/default_api.py +763 -0
- qanswer_sdk/api/frontend_config_api.py +270 -0
- qanswer_sdk/api/health_check_api_api.py +278 -0
- qanswer_sdk/api/mcp_api.py +10758 -0
- qanswer_sdk/api/metadata_api.py +1309 -0
- qanswer_sdk/api/notifications_api.py +1842 -0
- qanswer_sdk/api/o_auth2_api.py +648 -0
- qanswer_sdk/api/open_ai_compatible_api.py +1093 -0
- qanswer_sdk/api/payment_api.py +1854 -0
- qanswer_sdk/api/retention_policy_api.py +4404 -0
- qanswer_sdk/api/socket_api.py +4706 -0
- qanswer_sdk/api/speech_to_text_api.py +968 -0
- qanswer_sdk/api/task_ai_excel_api.py +3749 -0
- qanswer_sdk/api/task_chat_api.py +2079 -0
- qanswer_sdk/api/task_entity_linking_api.py +315 -0
- qanswer_sdk/api/task_rdf_linker_api.py +4407 -0
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3355 -0
- qanswer_sdk/api/task_rdf_text_linker_api.py +1513 -0
- qanswer_sdk/api/task_report_copilot_api.py +7355 -0
- qanswer_sdk/api/task_search_api.py +2142 -0
- qanswer_sdk/api/task_text2sparql_api.py +947 -0
- qanswer_sdk/api/task_text_classification_api.py +592 -0
- qanswer_sdk/api/tasks_api.py +26394 -0
- qanswer_sdk/api/tool_embedder_api.py +5532 -0
- qanswer_sdk/api/tool_llm_api.py +6364 -0
- qanswer_sdk/api/unit_organizations_api.py +8600 -0
- qanswer_sdk/api/unit_teams_api.py +4492 -0
- qanswer_sdk/api/unit_user_api.py +12759 -0
- qanswer_sdk/api_client.py +804 -0
- qanswer_sdk/api_response.py +21 -0
- qanswer_sdk/configuration.py +614 -0
- qanswer_sdk/exceptions.py +216 -0
- qanswer_sdk/models/__init__.py +562 -0
- qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
- qanswer_sdk/models/access_pdf_payload_model.py +102 -0
- qanswer_sdk/models/access_type.py +42 -0
- qanswer_sdk/models/access_type_shared.py +38 -0
- qanswer_sdk/models/add_qn_a_request.py +103 -0
- qanswer_sdk/models/add_synonyms.py +93 -0
- qanswer_sdk/models/add_synonyms_resp.py +89 -0
- qanswer_sdk/models/admin_overall_stats_response.py +105 -0
- qanswer_sdk/models/admin_user_overall_stats.py +99 -0
- qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
- qanswer_sdk/models/aggregate.py +93 -0
- qanswer_sdk/models/aggregation.py +110 -0
- qanswer_sdk/models/aggregation_type.py +41 -0
- qanswer_sdk/models/aggregations_group.py +102 -0
- qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
- qanswer_sdk/models/ai_assistant_dto.py +113 -0
- qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
- qanswer_sdk/models/ai_assistant_list.py +101 -0
- qanswer_sdk/models/ai_assistant_share_response.py +93 -0
- qanswer_sdk/models/ai_assistant_shared_access.py +95 -0
- qanswer_sdk/models/ai_excel_entity_result.py +97 -0
- qanswer_sdk/models/ai_excel_entity_search_payload.py +95 -0
- qanswer_sdk/models/ai_excel_entity_search_response.py +103 -0
- qanswer_sdk/models/ai_excel_global_settings.py +95 -0
- qanswer_sdk/models/ai_excel_global_settings_request.py +95 -0
- qanswer_sdk/models/ai_excel_task_settings.py +119 -0
- qanswer_sdk/models/ai_excel_task_update.py +119 -0
- qanswer_sdk/models/ai_excel_template_create.py +119 -0
- qanswer_sdk/models/ai_excel_template_read.py +121 -0
- qanswer_sdk/models/ai_excel_template_settings_request.py +91 -0
- qanswer_sdk/models/ai_excel_template_update.py +125 -0
- qanswer_sdk/models/ai_excel_templates_search_request.py +104 -0
- qanswer_sdk/models/ai_excel_templates_search_response.py +101 -0
- qanswer_sdk/models/allowed_extension.py +53 -0
- qanswer_sdk/models/allowed_file_extensions.py +88 -0
- qanswer_sdk/models/api_key_header_type.py +39 -0
- qanswer_sdk/models/api_key_mcp_authentication_config.py +98 -0
- qanswer_sdk/models/applied_filter_type.py +37 -0
- qanswer_sdk/models/applied_metadata_filter.py +97 -0
- qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
- qanswer_sdk/models/assistant_category_color_definition.py +89 -0
- qanswer_sdk/models/assistant_category_color_item.py +89 -0
- qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
- qanswer_sdk/models/assistant_category_count.py +91 -0
- qanswer_sdk/models/assistant_message_stop.py +93 -0
- qanswer_sdk/models/assistant_retention_response.py +97 -0
- qanswer_sdk/models/assistant_task.py +43 -0
- qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +123 -0
- qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
- qanswer_sdk/models/audio_format.py +37 -0
- qanswer_sdk/models/audio_segment.py +95 -0
- qanswer_sdk/models/audio_segment_update_payload.py +97 -0
- qanswer_sdk/models/audio_segment_update_response.py +91 -0
- qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
- qanswer_sdk/models/audio_speaker_update_response.py +91 -0
- qanswer_sdk/models/audio_transcription_list_response.py +101 -0
- qanswer_sdk/models/audio_transcription_mode.py +37 -0
- qanswer_sdk/models/audio_transcription_record.py +101 -0
- qanswer_sdk/models/audio_transcription_status.py +39 -0
- qanswer_sdk/models/audio_upload_response.py +91 -0
- qanswer_sdk/models/audio_word_segment.py +93 -0
- qanswer_sdk/models/audio_word_span_change.py +94 -0
- qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
- qanswer_sdk/models/audio_word_span_update_response.py +91 -0
- qanswer_sdk/models/audio_word_update_payload.py +100 -0
- qanswer_sdk/models/audio_word_update_response.py +91 -0
- qanswer_sdk/models/auth_link_response.py +91 -0
- qanswer_sdk/models/auto_bot_description_request.py +89 -0
- qanswer_sdk/models/auto_bot_description_response.py +87 -0
- qanswer_sdk/models/available_aggregation.py +92 -0
- qanswer_sdk/models/available_connectors_response.py +92 -0
- qanswer_sdk/models/available_logs_visibility_policy.py +91 -0
- qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
- qanswer_sdk/models/available_storage_preference.py +91 -0
- qanswer_sdk/models/base_connectors_response.py +89 -0
- qanswer_sdk/models/base_conversation_response.py +89 -0
- qanswer_sdk/models/base_feedback_response.py +89 -0
- qanswer_sdk/models/bot_answer_length.py +38 -0
- qanswer_sdk/models/branding_app_title.py +87 -0
- qanswer_sdk/models/branding_system_message.py +87 -0
- qanswer_sdk/models/bulk_reindex_counts_by_type.py +89 -0
- qanswer_sdk/models/bulk_reindex_item_status.py +41 -0
- qanswer_sdk/models/bulk_reindex_job_detail_dto.py +103 -0
- qanswer_sdk/models/bulk_reindex_job_dto.py +125 -0
- qanswer_sdk/models/bulk_reindex_job_item_dto.py +113 -0
- qanswer_sdk/models/bulk_reindex_job_item_sort_by.py +40 -0
- qanswer_sdk/models/bulk_reindex_job_status.py +41 -0
- qanswer_sdk/models/bulk_reindex_jobs_list_response.py +97 -0
- qanswer_sdk/models/bulk_reindex_preview_counts.py +99 -0
- qanswer_sdk/models/bulk_reindex_preview_request.py +91 -0
- qanswer_sdk/models/bulk_reindex_preview_response.py +102 -0
- qanswer_sdk/models/bulk_reindex_skip_reason.py +40 -0
- qanswer_sdk/models/bulk_reindex_sort_order.py +37 -0
- qanswer_sdk/models/bulk_reindex_submit_request.py +94 -0
- qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
- qanswer_sdk/models/capability_type.py +37 -0
- qanswer_sdk/models/cell.py +89 -0
- qanswer_sdk/models/change_password.py +89 -0
- qanswer_sdk/models/change_password_admin.py +89 -0
- qanswer_sdk/models/change_role.py +90 -0
- qanswer_sdk/models/chat_task_settings.py +141 -0
- qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/chat_task_update.py +139 -0
- qanswer_sdk/models/chatbot_chat_payload.py +150 -0
- qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
- qanswer_sdk/models/chatbot_llm_dto.py +120 -0
- qanswer_sdk/models/chatbot_response.py +143 -0
- qanswer_sdk/models/chatbot_setting_dto.py +99 -0
- qanswer_sdk/models/chatbot_setting_request.py +91 -0
- qanswer_sdk/models/class_info.py +89 -0
- qanswer_sdk/models/config.py +228 -0
- qanswer_sdk/models/config1.py +138 -0
- qanswer_sdk/models/connector_config_list_response.py +99 -0
- qanswer_sdk/models/connector_config_model.py +96 -0
- qanswer_sdk/models/connector_config_patch_payload.py +93 -0
- qanswer_sdk/models/connector_config_response.py +95 -0
- qanswer_sdk/models/connector_config_sync_response.py +93 -0
- qanswer_sdk/models/connector_config_type.py +37 -0
- qanswer_sdk/models/connector_model.py +114 -0
- qanswer_sdk/models/connector_type.py +51 -0
- qanswer_sdk/models/connector_type_dto.py +92 -0
- qanswer_sdk/models/connector_type_list_dto.py +95 -0
- qanswer_sdk/models/content_item.py +106 -0
- qanswer_sdk/models/content_item_type.py +39 -0
- qanswer_sdk/models/conversation_aggregations_request.py +107 -0
- qanswer_sdk/models/conversation_message.py +230 -0
- qanswer_sdk/models/conversation_message_error_key.py +52 -0
- qanswer_sdk/models/conversation_message_search_result.py +112 -0
- qanswer_sdk/models/conversation_model.py +144 -0
- qanswer_sdk/models/conversation_overall_stats.py +97 -0
- qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
- qanswer_sdk/models/conversation_retention_response.py +91 -0
- qanswer_sdk/models/conversation_statistics.py +95 -0
- qanswer_sdk/models/conversation_update.py +93 -0
- qanswer_sdk/models/conversation_users_stats.py +99 -0
- qanswer_sdk/models/conversation_users_stats_response.py +99 -0
- qanswer_sdk/models/coordinates.py +89 -0
- qanswer_sdk/models/cost_summary_dto.py +99 -0
- qanswer_sdk/models/create_connector_request.py +95 -0
- qanswer_sdk/models/create_connector_response.py +95 -0
- qanswer_sdk/models/create_imap_connector_request.py +105 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
- qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
- qanswer_sdk/models/create_x_wiki_connector_request.py +103 -0
- qanswer_sdk/models/credits_info_dto.py +95 -0
- qanswer_sdk/models/credits_info_global_dto.py +97 -0
- qanswer_sdk/models/currency.py +38 -0
- qanswer_sdk/models/data.py +211 -0
- qanswer_sdk/models/data_filling_mode.py +39 -0
- qanswer_sdk/models/data_storage_preference.py +38 -0
- qanswer_sdk/models/dataset_config_request.py +138 -0
- qanswer_sdk/models/dataset_default_values_model.py +129 -0
- qanswer_sdk/models/dataset_detail.py +128 -0
- qanswer_sdk/models/dataset_detail_kg.py +88 -0
- qanswer_sdk/models/dataset_schema.py +193 -0
- qanswer_sdk/models/dataset_type.py +38 -0
- qanswer_sdk/models/dataset_update_object.py +185 -0
- qanswer_sdk/models/dataset_users_response.py +87 -0
- qanswer_sdk/models/default_prompt.py +100 -0
- qanswer_sdk/models/delete_connector_model.py +90 -0
- qanswer_sdk/models/delete_connector_request.py +99 -0
- qanswer_sdk/models/delete_connectors_response.py +89 -0
- qanswer_sdk/models/delete_files_status_response.py +91 -0
- qanswer_sdk/models/delete_index.py +91 -0
- qanswer_sdk/models/delete_index_resp.py +89 -0
- qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
- qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/delete_synonym.py +93 -0
- qanswer_sdk/models/delete_synonym_resp.py +89 -0
- qanswer_sdk/models/delete_synonyms.py +91 -0
- qanswer_sdk/models/diarization_queue_status.py +99 -0
- qanswer_sdk/models/document_content_response.py +91 -0
- qanswer_sdk/models/document_content_update_model.py +99 -0
- qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
- qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
- qanswer_sdk/models/document_parsing_task_settings.py +124 -0
- qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/document_parsing_task_update.py +121 -0
- qanswer_sdk/models/document_status_group.py +39 -0
- qanswer_sdk/models/document_status_response.py +89 -0
- qanswer_sdk/models/dummy_error.py +89 -0
- qanswer_sdk/models/duplicate_ai_excel_template_request.py +97 -0
- qanswer_sdk/models/duplicate_ai_excel_template_response.py +87 -0
- qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
- qanswer_sdk/models/duplicate_report_template_response.py +87 -0
- qanswer_sdk/models/e_consilium_connector_config.py +108 -0
- qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
- qanswer_sdk/models/econsilium_file_metadata.py +105 -0
- qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
- qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
- qanswer_sdk/models/effective_retention_dto.py +95 -0
- qanswer_sdk/models/email_folder.py +91 -0
- qanswer_sdk/models/email_request.py +87 -0
- qanswer_sdk/models/embedder_cost_filter.py +112 -0
- qanswer_sdk/models/embedder_cost_list.py +101 -0
- qanswer_sdk/models/embedder_create_dto.py +143 -0
- qanswer_sdk/models/embedder_detailed_dto.py +163 -0
- qanswer_sdk/models/embedder_dto.py +103 -0
- qanswer_sdk/models/embedder_list_dto.py +101 -0
- qanswer_sdk/models/embedder_ref.py +95 -0
- qanswer_sdk/models/embedder_update_dto.py +135 -0
- qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
- qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
- qanswer_sdk/models/embedding_endpoint_validation_response.py +90 -0
- qanswer_sdk/models/embedding_provider.py +44 -0
- qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
- qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
- qanswer_sdk/models/endpoint_status.py +38 -0
- qanswer_sdk/models/entity_description_dto.py +93 -0
- qanswer_sdk/models/entity_linking_payload.py +97 -0
- qanswer_sdk/models/entity_linking_response.py +97 -0
- qanswer_sdk/models/entity_model_in_linking.py +95 -0
- qanswer_sdk/models/es_meta_data.py +92 -0
- qanswer_sdk/models/es_meta_data_value.py +87 -0
- qanswer_sdk/models/evaluate_feedback_response.py +109 -0
- qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
- qanswer_sdk/models/extra_body.py +91 -0
- qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
- qanswer_sdk/models/extract_robot_links_payload.py +88 -0
- qanswer_sdk/models/extract_robot_links_response.py +88 -0
- qanswer_sdk/models/extraction_strategy.py +38 -0
- qanswer_sdk/models/fact.py +96 -0
- qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
- qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
- qanswer_sdk/models/feedback_model.py +132 -0
- qanswer_sdk/models/feedback_response.py +95 -0
- qanswer_sdk/models/feedback_update.py +105 -0
- qanswer_sdk/models/file_acl_principal.py +99 -0
- qanswer_sdk/models/file_acl_response.py +101 -0
- qanswer_sdk/models/file_es_meta_data.py +116 -0
- qanswer_sdk/models/file_failure_reason.py +49 -0
- qanswer_sdk/models/file_folder_model.py +117 -0
- qanswer_sdk/models/file_model.py +124 -0
- qanswer_sdk/models/file_status.py +43 -0
- qanswer_sdk/models/file_type.py +37 -0
- qanswer_sdk/models/file_upload_payload.py +107 -0
- qanswer_sdk/models/files_by_connector_model.py +89 -0
- qanswer_sdk/models/g_drive_connector_info.py +96 -0
- qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/g_drive_download_request.py +103 -0
- qanswer_sdk/models/g_drive_refresh_request.py +91 -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/global_config_dto.py +155 -0
- qanswer_sdk/models/google_drive_connector_config.py +110 -0
- qanswer_sdk/models/guardrail_endpoint.py +112 -0
- qanswer_sdk/models/guardrail_mode.py +38 -0
- qanswer_sdk/models/highlight_audio_payload_model.py +100 -0
- qanswer_sdk/models/http_validation_error.py +95 -0
- qanswer_sdk/models/iframe_strategy.py +38 -0
- qanswer_sdk/models/image_url_detail.py +38 -0
- qanswer_sdk/models/imap_add_payload.py +105 -0
- qanswer_sdk/models/imap_additional_fields.py +101 -0
- qanswer_sdk/models/imap_file_metadata.py +108 -0
- qanswer_sdk/models/imap_search_response.py +113 -0
- qanswer_sdk/models/index_config.py +89 -0
- qanswer_sdk/models/install_response.py +89 -0
- qanswer_sdk/models/interface_origin.py +47 -0
- qanswer_sdk/models/ip2_geo_response.py +91 -0
- qanswer_sdk/models/is_enabled_response.py +87 -0
- qanswer_sdk/models/jwt_authentication_response.py +93 -0
- qanswer_sdk/models/label.py +89 -0
- qanswer_sdk/models/labeled_node.py +89 -0
- qanswer_sdk/models/language.py +38 -0
- qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
- qanswer_sdk/models/link.py +99 -0
- qanswer_sdk/models/link_extraction_response.py +97 -0
- qanswer_sdk/models/link_result_paginated.py +97 -0
- qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
- qanswer_sdk/models/linker.py +103 -0
- qanswer_sdk/models/linking_result.py +95 -0
- qanswer_sdk/models/links.py +99 -0
- qanswer_sdk/models/list_connectors_response.py +95 -0
- qanswer_sdk/models/list_conversation_response.py +105 -0
- qanswer_sdk/models/list_feedback_response.py +105 -0
- qanswer_sdk/models/list_files_connector_response.py +107 -0
- qanswer_sdk/models/list_socket_events.py +88 -0
- qanswer_sdk/models/list_synonyms_model.py +95 -0
- qanswer_sdk/models/llm_context_ranges.py +93 -0
- qanswer_sdk/models/llm_cost_filter.py +112 -0
- qanswer_sdk/models/llm_cost_list.py +101 -0
- qanswer_sdk/models/llm_create_dto.py +177 -0
- qanswer_sdk/models/llm_detailed_dto.py +198 -0
- qanswer_sdk/models/llm_dto.py +120 -0
- qanswer_sdk/models/llm_endpoint.py +179 -0
- qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
- qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
- qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
- qanswer_sdk/models/llm_endpoint_modality.py +37 -0
- qanswer_sdk/models/llm_endpoint_provider.py +44 -0
- qanswer_sdk/models/llm_endpoint_read.py +179 -0
- qanswer_sdk/models/llm_endpoint_validation_response.py +90 -0
- qanswer_sdk/models/llm_health_response.py +89 -0
- qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
- qanswer_sdk/models/llm_list_dto.py +101 -0
- qanswer_sdk/models/llm_update_dto.py +174 -0
- qanswer_sdk/models/location_details.py +97 -0
- qanswer_sdk/models/log_stats_request.py +100 -0
- qanswer_sdk/models/login_request.py +89 -0
- qanswer_sdk/models/logs_visibility_policy.py +38 -0
- qanswer_sdk/models/logs_visibility_policy_payload.py +92 -0
- qanswer_sdk/models/logs_visibility_policy_response.py +92 -0
- qanswer_sdk/models/mcp_auth_field_definition.py +98 -0
- qanswer_sdk/models/mcp_auth_field_type.py +37 -0
- qanswer_sdk/models/mcp_authentication_type.py +39 -0
- qanswer_sdk/models/mcp_connection.py +108 -0
- qanswer_sdk/models/mcp_connection_create.py +100 -0
- qanswer_sdk/models/mcp_server.py +146 -0
- qanswer_sdk/models/mcp_server_create.py +116 -0
- qanswer_sdk/models/mcp_server_type.py +37 -0
- qanswer_sdk/models/mcp_server_update.py +114 -0
- qanswer_sdk/models/mcp_tool_dto.py +131 -0
- qanswer_sdk/models/mcp_tool_info.py +95 -0
- qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
- qanswer_sdk/models/mcp_tool_sync_action.py +39 -0
- qanswer_sdk/models/mcp_tool_sync_diff.py +94 -0
- qanswer_sdk/models/mcp_tool_sync_preview.py +95 -0
- qanswer_sdk/models/mcp_tool_update.py +91 -0
- qanswer_sdk/models/mcp_transport.py +37 -0
- qanswer_sdk/models/mcp_visibility.py +38 -0
- qanswer_sdk/models/mcpo_auth2_authorize_body.py +105 -0
- qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
- qanswer_sdk/models/message_role.py +38 -0
- qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
- qanswer_sdk/models/microsoft_connector_config.py +110 -0
- qanswer_sdk/models/modify_connector_request.py +98 -0
- qanswer_sdk/models/modify_file_display_name_request.py +97 -0
- qanswer_sdk/models/notification_dto.py +114 -0
- qanswer_sdk/models/notification_filter.py +107 -0
- qanswer_sdk/models/notification_list_dto.py +101 -0
- qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
- qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
- qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +100 -0
- qanswer_sdk/models/notification_payload_conversation_shared_dto.py +96 -0
- qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
- qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
- qanswer_sdk/models/notification_read_dto.py +89 -0
- qanswer_sdk/models/notification_type.py +44 -0
- qanswer_sdk/models/o_auth_redirect_response.py +89 -0
- qanswer_sdk/models/o_auth_service_dto.py +89 -0
- qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/one_drive_download_request.py +103 -0
- qanswer_sdk/models/one_note_download_by_ids.py +91 -0
- qanswer_sdk/models/one_note_download_request.py +103 -0
- qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
- qanswer_sdk/models/org_llm_features_dto.py +89 -0
- qanswer_sdk/models/org_role.py +37 -0
- qanswer_sdk/models/org_user_profile_dto.py +210 -0
- qanswer_sdk/models/org_user_profile_list_dto.py +101 -0
- qanswer_sdk/models/organization_admin_dto.py +97 -0
- qanswer_sdk/models/organization_creation_dto.py +91 -0
- qanswer_sdk/models/organization_dto.py +93 -0
- qanswer_sdk/models/organization_list_dto.py +101 -0
- qanswer_sdk/models/organization_user_dto.py +101 -0
- qanswer_sdk/models/organization_user_list_dto.py +101 -0
- qanswer_sdk/models/paginated_report_templates.py +101 -0
- qanswer_sdk/models/password.py +89 -0
- qanswer_sdk/models/pinecone_index_model.py +91 -0
- qanswer_sdk/models/plan_dto.py +108 -0
- qanswer_sdk/models/predicted_class.py +89 -0
- qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
- qanswer_sdk/models/prepared_synonym_group.py +87 -0
- qanswer_sdk/models/pricing_plan.py +51 -0
- qanswer_sdk/models/pricing_type.py +38 -0
- qanswer_sdk/models/prompt_type.py +49 -0
- qanswer_sdk/models/provider.py +87 -0
- qanswer_sdk/models/publication_add_payload.py +105 -0
- qanswer_sdk/models/publication_file_metadata.py +105 -0
- qanswer_sdk/models/publication_office_additional_fields.py +111 -0
- qanswer_sdk/models/publication_office_connector_config.py +112 -0
- qanswer_sdk/models/publication_search_index_search_response.py +113 -0
- qanswer_sdk/models/qa_context.py +129 -0
- qanswer_sdk/models/qa_context_display_type.py +44 -0
- qanswer_sdk/models/qa_contexts.py +106 -0
- qanswer_sdk/models/qa_table.py +100 -0
- qanswer_sdk/models/qn_a_pair_model.py +103 -0
- qanswer_sdk/models/qn_a_pair_response.py +95 -0
- qanswer_sdk/models/rag_payload.py +185 -0
- qanswer_sdk/models/rag_response.py +147 -0
- qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
- qanswer_sdk/models/rdf_linked_entity.py +97 -0
- qanswer_sdk/models/reasoning_effort.py +39 -0
- qanswer_sdk/models/reference_model.py +99 -0
- qanswer_sdk/models/refresh_frequency.py +39 -0
- qanswer_sdk/models/refresh_token_request.py +87 -0
- qanswer_sdk/models/refresh_website_connector_links_payload.py +96 -0
- qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
- qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
- qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
- qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
- qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
- qanswer_sdk/models/report_copilot_slot_task_settings.py +121 -0
- qanswer_sdk/models/report_copilot_slot_task_settings_update.py +121 -0
- qanswer_sdk/models/report_copilot_task_settings.py +119 -0
- qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/report_copilot_task_update.py +119 -0
- qanswer_sdk/models/report_template.py +155 -0
- qanswer_sdk/models/report_template_create_payload.py +132 -0
- qanswer_sdk/models/report_template_image_upload_response.py +87 -0
- qanswer_sdk/models/report_template_simplified.py +116 -0
- qanswer_sdk/models/report_template_simplified_payload.py +91 -0
- qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
- qanswer_sdk/models/report_template_update_payload.py +136 -0
- qanswer_sdk/models/report_templates_search_payload.py +106 -0
- qanswer_sdk/models/reset_password.py +87 -0
- qanswer_sdk/models/response_audit_model.py +99 -0
- qanswer_sdk/models/response_audit_stats_response.py +101 -0
- qanswer_sdk/models/response_get_dummy_union_connector_config_model_api_connectors_config_dummy_models_union_get.py +228 -0
- qanswer_sdk/models/retention_policy_dto.py +106 -0
- qanswer_sdk/models/retention_policy_update.py +101 -0
- qanswer_sdk/models/retention_preview_response.py +92 -0
- qanswer_sdk/models/retention_run_progress_event.py +98 -0
- qanswer_sdk/models/retention_run_status_response.py +91 -0
- qanswer_sdk/models/retention_scope_type.py +38 -0
- qanswer_sdk/models/retention_sweep_result.py +89 -0
- qanswer_sdk/models/retention_unit.py +38 -0
- qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
- qanswer_sdk/models/retry_params.py +89 -0
- qanswer_sdk/models/return_type.py +38 -0
- qanswer_sdk/models/role.py +90 -0
- qanswer_sdk/models/role_name.py +37 -0
- qanswer_sdk/models/scrolling_strategy.py +37 -0
- qanswer_sdk/models/search_conversation_messages_response.py +105 -0
- qanswer_sdk/models/search_document_response.py +107 -0
- qanswer_sdk/models/search_index_payload.py +114 -0
- qanswer_sdk/models/search_metadata_filter.py +94 -0
- qanswer_sdk/models/search_payload.py +150 -0
- qanswer_sdk/models/search_response.py +120 -0
- qanswer_sdk/models/search_synonyms_resp.py +91 -0
- qanswer_sdk/models/search_task_settings.py +135 -0
- qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/search_task_update.py +133 -0
- qanswer_sdk/models/sender_type.py +38 -0
- qanswer_sdk/models/serve_pdf200_response.py +87 -0
- qanswer_sdk/models/share_point_connector_settings.py +99 -0
- qanswer_sdk/models/share_point_download_by_ids.py +99 -0
- qanswer_sdk/models/share_point_download_request.py +103 -0
- qanswer_sdk/models/shared_by.py +38 -0
- qanswer_sdk/models/shared_entity_type.py +38 -0
- qanswer_sdk/models/shared_organization_access_dto.py +116 -0
- qanswer_sdk/models/shared_team_access_dto.py +116 -0
- qanswer_sdk/models/shared_user.py +90 -0
- qanswer_sdk/models/sign_out_request.py +87 -0
- qanswer_sdk/models/sign_up_request.py +99 -0
- qanswer_sdk/models/slot.py +153 -0
- qanswer_sdk/models/slot_history_entry.py +119 -0
- qanswer_sdk/models/slot_in_prompt.py +91 -0
- qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
- qanswer_sdk/models/slot_update.py +133 -0
- qanswer_sdk/models/socker_join_user.py +91 -0
- qanswer_sdk/models/socket_audio_transcription_status.py +102 -0
- qanswer_sdk/models/socket_conversation_message.py +245 -0
- qanswer_sdk/models/socket_dataset_reindexing_status.py +97 -0
- qanswer_sdk/models/socket_events_q_answer.py +55 -0
- qanswer_sdk/models/socket_feedback_evaluation_progress.py +108 -0
- qanswer_sdk/models/socket_file_metadata.py +194 -0
- qanswer_sdk/models/socket_file_status_batch.py +103 -0
- qanswer_sdk/models/socket_file_status_item.py +99 -0
- qanswer_sdk/models/socket_join_conversation.py +97 -0
- qanswer_sdk/models/socket_join_dataset.py +93 -0
- qanswer_sdk/models/socket_message_status.py +40 -0
- qanswer_sdk/models/socket_notification.py +109 -0
- qanswer_sdk/models/socket_report_continuation_response.py +100 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +116 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +116 -0
- qanswer_sdk/models/socket_report_copilot_refinement_response.py +102 -0
- qanswer_sdk/models/socket_speech2_text_response.py +122 -0
- qanswer_sdk/models/socket_stop_conversation.py +97 -0
- qanswer_sdk/models/source.py +125 -0
- qanswer_sdk/models/source_metadata.py +109 -0
- qanswer_sdk/models/speech2_text_response.py +110 -0
- qanswer_sdk/models/stat_per_date.py +89 -0
- qanswer_sdk/models/status_response.py +89 -0
- qanswer_sdk/models/storage_active_status.py +37 -0
- qanswer_sdk/models/subscription_response.py +92 -0
- qanswer_sdk/models/subscription_status.py +39 -0
- qanswer_sdk/models/suggested_replies.py +87 -0
- qanswer_sdk/models/suggestion_list_response.py +87 -0
- qanswer_sdk/models/summa_server.py +101 -0
- qanswer_sdk/models/task_category.py +61 -0
- qanswer_sdk/models/task_name.py +43 -0
- qanswer_sdk/models/team_admin_dto.py +95 -0
- qanswer_sdk/models/team_creation_dto.py +89 -0
- qanswer_sdk/models/team_dto.py +93 -0
- qanswer_sdk/models/team_list_dto.py +101 -0
- qanswer_sdk/models/team_list_dto_teams_inner.py +149 -0
- qanswer_sdk/models/team_role.py +37 -0
- qanswer_sdk/models/team_with_count_dto.py +95 -0
- qanswer_sdk/models/teams_bot_auth_type.py +38 -0
- qanswer_sdk/models/teams_bot_registration_dto.py +107 -0
- qanswer_sdk/models/teams_bot_registration_upsert_dto.py +105 -0
- qanswer_sdk/models/template_clip_structure.py +114 -0
- qanswer_sdk/models/template_toggle_request.py +93 -0
- qanswer_sdk/models/terms_bucket.py +107 -0
- qanswer_sdk/models/test_imap_connection_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_payload.py +187 -0
- qanswer_sdk/models/text2_sparql_task_settings.py +119 -0
- qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_task_update.py +119 -0
- qanswer_sdk/models/text_classification_payload.py +99 -0
- qanswer_sdk/models/text_classification_response.py +87 -0
- qanswer_sdk/models/text_classification_v2_payload.py +99 -0
- qanswer_sdk/models/text_classification_v2_response.py +95 -0
- qanswer_sdk/models/thinking_block.py +91 -0
- qanswer_sdk/models/tool_selection.py +89 -0
- qanswer_sdk/models/total_stat.py +96 -0
- qanswer_sdk/models/ui_mappings.py +141 -0
- qanswer_sdk/models/update_file_es_meta_data.py +116 -0
- qanswer_sdk/models/update_metadata_model.py +97 -0
- qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
- qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
- qanswer_sdk/models/update_synonyms.py +95 -0
- qanswer_sdk/models/update_synonyms_resp.py +89 -0
- qanswer_sdk/models/upload_metadata.py +115 -0
- qanswer_sdk/models/user_credits_config_dto.py +99 -0
- qanswer_sdk/models/user_credits_dto.py +106 -0
- qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
- qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +100 -0
- qanswer_sdk/models/user_dto.py +91 -0
- qanswer_sdk/models/user_identity_availability.py +87 -0
- qanswer_sdk/models/user_info_dto.py +95 -0
- qanswer_sdk/models/user_list_dto.py +101 -0
- qanswer_sdk/models/user_log_dto.py +102 -0
- qanswer_sdk/models/user_logs_list_dto.py +97 -0
- qanswer_sdk/models/user_mcp_tool_selection_dto.py +107 -0
- qanswer_sdk/models/user_oauth_token_dto.py +96 -0
- qanswer_sdk/models/user_profile_dto.py +199 -0
- qanswer_sdk/models/user_profile_list_dto.py +101 -0
- qanswer_sdk/models/user_team_dto.py +94 -0
- qanswer_sdk/models/validation_error.py +108 -0
- qanswer_sdk/models/validation_error_loc_inner.py +138 -0
- qanswer_sdk/models/warn_visibility.py +40 -0
- qanswer_sdk/models/websearch_connector_config.py +102 -0
- qanswer_sdk/models/websearch_scraping_site.py +91 -0
- qanswer_sdk/models/website_add_payload.py +102 -0
- qanswer_sdk/models/website_connector_config.py +102 -0
- qanswer_sdk/models/website_connector_settings.py +123 -0
- qanswer_sdk/models/widget_configs.py +109 -0
- qanswer_sdk/models/x_wiki_add_request.py +97 -0
- qanswer_sdk/models/x_wiki_download_by_ids.py +89 -0
- qanswer_sdk/py.typed +0 -0
- qanswer_sdk/rest.py +258 -0
- qanswer_sdk-0.1.0.dev0.dist-info/METADATA +252 -0
- qanswer_sdk-0.1.0.dev0.dist-info/RECORD +618 -0
- qanswer_sdk-0.1.0.dev0.dist-info/WHEEL +5 -0
- qanswer_sdk-0.1.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,2685 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
free-text-client
|
|
5
|
+
|
|
6
|
+
QAnswer 2.0 API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictBytes, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, List, Optional, Tuple, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from qanswer_sdk.models.create_connector_request import CreateConnectorRequest
|
|
23
|
+
from qanswer_sdk.models.create_connector_response import CreateConnectorResponse
|
|
24
|
+
from qanswer_sdk.models.document_parsing_task_settings import DocumentParsingTaskSettings
|
|
25
|
+
from qanswer_sdk.models.document_parsing_task_settings_update_payload import DocumentParsingTaskSettingsUpdatePayload
|
|
26
|
+
from qanswer_sdk.models.file_upload_payload import FileUploadPayload
|
|
27
|
+
from qanswer_sdk.models.status_response import StatusResponse
|
|
28
|
+
|
|
29
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
|
30
|
+
from qanswer_sdk.api_response import ApiResponse
|
|
31
|
+
from qanswer_sdk.rest import RESTResponseType
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ConnectorDocumentApi:
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None) -> None:
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient.get_default()
|
|
44
|
+
self.api_client = api_client
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@validate_call
|
|
48
|
+
def add_documents(
|
|
49
|
+
self,
|
|
50
|
+
username: StrictStr,
|
|
51
|
+
dataset: StrictStr,
|
|
52
|
+
file: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
53
|
+
connector_id: Optional[StrictInt] = None,
|
|
54
|
+
conversation_id: Optional[StrictStr] = None,
|
|
55
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
56
|
+
metadata: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
57
|
+
_request_timeout: Union[
|
|
58
|
+
None,
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
60
|
+
Tuple[
|
|
61
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
63
|
+
]
|
|
64
|
+
] = None,
|
|
65
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
+
_content_type: Optional[StrictStr] = None,
|
|
67
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
68
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
69
|
+
) -> StatusResponse:
|
|
70
|
+
"""Add Documents
|
|
71
|
+
|
|
72
|
+
Add Documents
|
|
73
|
+
|
|
74
|
+
:param username: (required)
|
|
75
|
+
:type username: str
|
|
76
|
+
:param dataset: (required)
|
|
77
|
+
:type dataset: str
|
|
78
|
+
:param file: (required)
|
|
79
|
+
:type file: List[bytearray]
|
|
80
|
+
:param connector_id:
|
|
81
|
+
:type connector_id: int
|
|
82
|
+
:param conversation_id:
|
|
83
|
+
:type conversation_id: str
|
|
84
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
85
|
+
:type q_answer_api_key: str
|
|
86
|
+
:param metadata:
|
|
87
|
+
:type metadata: bytearray
|
|
88
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
89
|
+
number provided, it will be total request
|
|
90
|
+
timeout. It can also be a pair (tuple) of
|
|
91
|
+
(connection, read) timeouts.
|
|
92
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
93
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
94
|
+
request; this effectively ignores the
|
|
95
|
+
authentication in the spec for a single request.
|
|
96
|
+
:type _request_auth: dict, optional
|
|
97
|
+
:param _content_type: force content-type for the request.
|
|
98
|
+
:type _content_type: str, Optional
|
|
99
|
+
:param _headers: set to override the headers for a single
|
|
100
|
+
request; this effectively ignores the headers
|
|
101
|
+
in the spec for a single request.
|
|
102
|
+
:type _headers: dict, optional
|
|
103
|
+
:param _host_index: set to override the host_index for a single
|
|
104
|
+
request; this effectively ignores the host_index
|
|
105
|
+
in the spec for a single request.
|
|
106
|
+
:type _host_index: int, optional
|
|
107
|
+
:return: Returns the result object.
|
|
108
|
+
""" # noqa: E501
|
|
109
|
+
|
|
110
|
+
_param = self._add_documents_serialize(
|
|
111
|
+
username=username,
|
|
112
|
+
dataset=dataset,
|
|
113
|
+
file=file,
|
|
114
|
+
connector_id=connector_id,
|
|
115
|
+
conversation_id=conversation_id,
|
|
116
|
+
q_answer_api_key=q_answer_api_key,
|
|
117
|
+
metadata=metadata,
|
|
118
|
+
_request_auth=_request_auth,
|
|
119
|
+
_content_type=_content_type,
|
|
120
|
+
_headers=_headers,
|
|
121
|
+
_host_index=_host_index
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
125
|
+
'200': "StatusResponse",
|
|
126
|
+
'422': "HTTPValidationError",
|
|
127
|
+
}
|
|
128
|
+
response_data = self.api_client.call_api(
|
|
129
|
+
*_param,
|
|
130
|
+
_request_timeout=_request_timeout
|
|
131
|
+
)
|
|
132
|
+
response_data.read()
|
|
133
|
+
return self.api_client.response_deserialize(
|
|
134
|
+
response_data=response_data,
|
|
135
|
+
response_types_map=_response_types_map,
|
|
136
|
+
).data
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
@validate_call
|
|
140
|
+
def add_documents_with_http_info(
|
|
141
|
+
self,
|
|
142
|
+
username: StrictStr,
|
|
143
|
+
dataset: StrictStr,
|
|
144
|
+
file: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
145
|
+
connector_id: Optional[StrictInt] = None,
|
|
146
|
+
conversation_id: Optional[StrictStr] = None,
|
|
147
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
148
|
+
metadata: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
149
|
+
_request_timeout: Union[
|
|
150
|
+
None,
|
|
151
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
152
|
+
Tuple[
|
|
153
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
154
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
155
|
+
]
|
|
156
|
+
] = None,
|
|
157
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
158
|
+
_content_type: Optional[StrictStr] = None,
|
|
159
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
160
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
161
|
+
) -> ApiResponse[StatusResponse]:
|
|
162
|
+
"""Add Documents
|
|
163
|
+
|
|
164
|
+
Add Documents
|
|
165
|
+
|
|
166
|
+
:param username: (required)
|
|
167
|
+
:type username: str
|
|
168
|
+
:param dataset: (required)
|
|
169
|
+
:type dataset: str
|
|
170
|
+
:param file: (required)
|
|
171
|
+
:type file: List[bytearray]
|
|
172
|
+
:param connector_id:
|
|
173
|
+
:type connector_id: int
|
|
174
|
+
:param conversation_id:
|
|
175
|
+
:type conversation_id: str
|
|
176
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
177
|
+
:type q_answer_api_key: str
|
|
178
|
+
:param metadata:
|
|
179
|
+
:type metadata: bytearray
|
|
180
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
181
|
+
number provided, it will be total request
|
|
182
|
+
timeout. It can also be a pair (tuple) of
|
|
183
|
+
(connection, read) timeouts.
|
|
184
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
185
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
186
|
+
request; this effectively ignores the
|
|
187
|
+
authentication in the spec for a single request.
|
|
188
|
+
:type _request_auth: dict, optional
|
|
189
|
+
:param _content_type: force content-type for the request.
|
|
190
|
+
:type _content_type: str, Optional
|
|
191
|
+
:param _headers: set to override the headers for a single
|
|
192
|
+
request; this effectively ignores the headers
|
|
193
|
+
in the spec for a single request.
|
|
194
|
+
:type _headers: dict, optional
|
|
195
|
+
:param _host_index: set to override the host_index for a single
|
|
196
|
+
request; this effectively ignores the host_index
|
|
197
|
+
in the spec for a single request.
|
|
198
|
+
:type _host_index: int, optional
|
|
199
|
+
:return: Returns the result object.
|
|
200
|
+
""" # noqa: E501
|
|
201
|
+
|
|
202
|
+
_param = self._add_documents_serialize(
|
|
203
|
+
username=username,
|
|
204
|
+
dataset=dataset,
|
|
205
|
+
file=file,
|
|
206
|
+
connector_id=connector_id,
|
|
207
|
+
conversation_id=conversation_id,
|
|
208
|
+
q_answer_api_key=q_answer_api_key,
|
|
209
|
+
metadata=metadata,
|
|
210
|
+
_request_auth=_request_auth,
|
|
211
|
+
_content_type=_content_type,
|
|
212
|
+
_headers=_headers,
|
|
213
|
+
_host_index=_host_index
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
217
|
+
'200': "StatusResponse",
|
|
218
|
+
'422': "HTTPValidationError",
|
|
219
|
+
}
|
|
220
|
+
response_data = self.api_client.call_api(
|
|
221
|
+
*_param,
|
|
222
|
+
_request_timeout=_request_timeout
|
|
223
|
+
)
|
|
224
|
+
response_data.read()
|
|
225
|
+
return self.api_client.response_deserialize(
|
|
226
|
+
response_data=response_data,
|
|
227
|
+
response_types_map=_response_types_map,
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
@validate_call
|
|
232
|
+
def add_documents_without_preload_content(
|
|
233
|
+
self,
|
|
234
|
+
username: StrictStr,
|
|
235
|
+
dataset: StrictStr,
|
|
236
|
+
file: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
237
|
+
connector_id: Optional[StrictInt] = None,
|
|
238
|
+
conversation_id: Optional[StrictStr] = None,
|
|
239
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
240
|
+
metadata: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
241
|
+
_request_timeout: Union[
|
|
242
|
+
None,
|
|
243
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
244
|
+
Tuple[
|
|
245
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
246
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
247
|
+
]
|
|
248
|
+
] = None,
|
|
249
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
250
|
+
_content_type: Optional[StrictStr] = None,
|
|
251
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
252
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
253
|
+
) -> RESTResponseType:
|
|
254
|
+
"""Add Documents
|
|
255
|
+
|
|
256
|
+
Add Documents
|
|
257
|
+
|
|
258
|
+
:param username: (required)
|
|
259
|
+
:type username: str
|
|
260
|
+
:param dataset: (required)
|
|
261
|
+
:type dataset: str
|
|
262
|
+
:param file: (required)
|
|
263
|
+
:type file: List[bytearray]
|
|
264
|
+
:param connector_id:
|
|
265
|
+
:type connector_id: int
|
|
266
|
+
:param conversation_id:
|
|
267
|
+
:type conversation_id: str
|
|
268
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
269
|
+
:type q_answer_api_key: str
|
|
270
|
+
:param metadata:
|
|
271
|
+
:type metadata: bytearray
|
|
272
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
273
|
+
number provided, it will be total request
|
|
274
|
+
timeout. It can also be a pair (tuple) of
|
|
275
|
+
(connection, read) timeouts.
|
|
276
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
277
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
278
|
+
request; this effectively ignores the
|
|
279
|
+
authentication in the spec for a single request.
|
|
280
|
+
:type _request_auth: dict, optional
|
|
281
|
+
:param _content_type: force content-type for the request.
|
|
282
|
+
:type _content_type: str, Optional
|
|
283
|
+
:param _headers: set to override the headers for a single
|
|
284
|
+
request; this effectively ignores the headers
|
|
285
|
+
in the spec for a single request.
|
|
286
|
+
:type _headers: dict, optional
|
|
287
|
+
:param _host_index: set to override the host_index for a single
|
|
288
|
+
request; this effectively ignores the host_index
|
|
289
|
+
in the spec for a single request.
|
|
290
|
+
:type _host_index: int, optional
|
|
291
|
+
:return: Returns the result object.
|
|
292
|
+
""" # noqa: E501
|
|
293
|
+
|
|
294
|
+
_param = self._add_documents_serialize(
|
|
295
|
+
username=username,
|
|
296
|
+
dataset=dataset,
|
|
297
|
+
file=file,
|
|
298
|
+
connector_id=connector_id,
|
|
299
|
+
conversation_id=conversation_id,
|
|
300
|
+
q_answer_api_key=q_answer_api_key,
|
|
301
|
+
metadata=metadata,
|
|
302
|
+
_request_auth=_request_auth,
|
|
303
|
+
_content_type=_content_type,
|
|
304
|
+
_headers=_headers,
|
|
305
|
+
_host_index=_host_index
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
309
|
+
'200': "StatusResponse",
|
|
310
|
+
'422': "HTTPValidationError",
|
|
311
|
+
}
|
|
312
|
+
response_data = self.api_client.call_api(
|
|
313
|
+
*_param,
|
|
314
|
+
_request_timeout=_request_timeout
|
|
315
|
+
)
|
|
316
|
+
return response_data.response
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
def _add_documents_serialize(
|
|
320
|
+
self,
|
|
321
|
+
username,
|
|
322
|
+
dataset,
|
|
323
|
+
file,
|
|
324
|
+
connector_id,
|
|
325
|
+
conversation_id,
|
|
326
|
+
q_answer_api_key,
|
|
327
|
+
metadata,
|
|
328
|
+
_request_auth,
|
|
329
|
+
_content_type,
|
|
330
|
+
_headers,
|
|
331
|
+
_host_index,
|
|
332
|
+
) -> RequestSerialized:
|
|
333
|
+
|
|
334
|
+
_host = None
|
|
335
|
+
|
|
336
|
+
_collection_formats: Dict[str, str] = {
|
|
337
|
+
'file': 'csv',
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
_path_params: Dict[str, str] = {}
|
|
341
|
+
_query_params: List[Tuple[str, str]] = []
|
|
342
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
343
|
+
_form_params: List[Tuple[str, str]] = []
|
|
344
|
+
_files: Dict[
|
|
345
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
346
|
+
] = {}
|
|
347
|
+
_body_params: Optional[bytes] = None
|
|
348
|
+
|
|
349
|
+
# process the path parameters
|
|
350
|
+
# process the query parameters
|
|
351
|
+
if username is not None:
|
|
352
|
+
|
|
353
|
+
_query_params.append(('username', username))
|
|
354
|
+
|
|
355
|
+
if dataset is not None:
|
|
356
|
+
|
|
357
|
+
_query_params.append(('dataset', dataset))
|
|
358
|
+
|
|
359
|
+
if connector_id is not None:
|
|
360
|
+
|
|
361
|
+
_query_params.append(('connector_id', connector_id))
|
|
362
|
+
|
|
363
|
+
if conversation_id is not None:
|
|
364
|
+
|
|
365
|
+
_query_params.append(('conversationId', conversation_id))
|
|
366
|
+
|
|
367
|
+
# process the header parameters
|
|
368
|
+
if q_answer_api_key is not None:
|
|
369
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
370
|
+
# process the form parameters
|
|
371
|
+
if file is not None:
|
|
372
|
+
_files['file'] = file
|
|
373
|
+
if metadata is not None:
|
|
374
|
+
_files['metadata'] = metadata
|
|
375
|
+
# process the body parameter
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
# set the HTTP header `Accept`
|
|
379
|
+
if 'Accept' not in _header_params:
|
|
380
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
381
|
+
[
|
|
382
|
+
'application/json'
|
|
383
|
+
]
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
# set the HTTP header `Content-Type`
|
|
387
|
+
if _content_type:
|
|
388
|
+
_header_params['Content-Type'] = _content_type
|
|
389
|
+
else:
|
|
390
|
+
_default_content_type = (
|
|
391
|
+
self.api_client.select_header_content_type(
|
|
392
|
+
[
|
|
393
|
+
'multipart/form-data'
|
|
394
|
+
]
|
|
395
|
+
)
|
|
396
|
+
)
|
|
397
|
+
if _default_content_type is not None:
|
|
398
|
+
_header_params['Content-Type'] = _default_content_type
|
|
399
|
+
|
|
400
|
+
# authentication setting
|
|
401
|
+
_auth_settings: List[str] = [
|
|
402
|
+
'QAnswer-Api-Key',
|
|
403
|
+
'Bearer token'
|
|
404
|
+
]
|
|
405
|
+
|
|
406
|
+
return self.api_client.param_serialize(
|
|
407
|
+
method='POST',
|
|
408
|
+
resource_path='/api/connectors/document/add',
|
|
409
|
+
path_params=_path_params,
|
|
410
|
+
query_params=_query_params,
|
|
411
|
+
header_params=_header_params,
|
|
412
|
+
body=_body_params,
|
|
413
|
+
post_params=_form_params,
|
|
414
|
+
files=_files,
|
|
415
|
+
auth_settings=_auth_settings,
|
|
416
|
+
collection_formats=_collection_formats,
|
|
417
|
+
_host=_host,
|
|
418
|
+
_request_auth=_request_auth
|
|
419
|
+
)
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
@validate_call
|
|
425
|
+
def add_documents_doc(
|
|
426
|
+
self,
|
|
427
|
+
username: StrictStr,
|
|
428
|
+
dataset: StrictStr,
|
|
429
|
+
connector_id: StrictInt,
|
|
430
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
431
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
432
|
+
metadata: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
433
|
+
_request_timeout: Union[
|
|
434
|
+
None,
|
|
435
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
436
|
+
Tuple[
|
|
437
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
438
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
439
|
+
]
|
|
440
|
+
] = None,
|
|
441
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
442
|
+
_content_type: Optional[StrictStr] = None,
|
|
443
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
444
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
445
|
+
) -> object:
|
|
446
|
+
"""Add Documents Doc
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
:param username: (required)
|
|
450
|
+
:type username: str
|
|
451
|
+
:param dataset: (required)
|
|
452
|
+
:type dataset: str
|
|
453
|
+
:param connector_id: (required)
|
|
454
|
+
:type connector_id: int
|
|
455
|
+
:param file: (required)
|
|
456
|
+
:type file: bytearray
|
|
457
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
458
|
+
:type q_answer_api_key: str
|
|
459
|
+
:param metadata:
|
|
460
|
+
:type metadata: bytearray
|
|
461
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
462
|
+
number provided, it will be total request
|
|
463
|
+
timeout. It can also be a pair (tuple) of
|
|
464
|
+
(connection, read) timeouts.
|
|
465
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
466
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
467
|
+
request; this effectively ignores the
|
|
468
|
+
authentication in the spec for a single request.
|
|
469
|
+
:type _request_auth: dict, optional
|
|
470
|
+
:param _content_type: force content-type for the request.
|
|
471
|
+
:type _content_type: str, Optional
|
|
472
|
+
:param _headers: set to override the headers for a single
|
|
473
|
+
request; this effectively ignores the headers
|
|
474
|
+
in the spec for a single request.
|
|
475
|
+
:type _headers: dict, optional
|
|
476
|
+
:param _host_index: set to override the host_index for a single
|
|
477
|
+
request; this effectively ignores the host_index
|
|
478
|
+
in the spec for a single request.
|
|
479
|
+
:type _host_index: int, optional
|
|
480
|
+
:return: Returns the result object.
|
|
481
|
+
""" # noqa: E501
|
|
482
|
+
|
|
483
|
+
_param = self._add_documents_doc_serialize(
|
|
484
|
+
username=username,
|
|
485
|
+
dataset=dataset,
|
|
486
|
+
connector_id=connector_id,
|
|
487
|
+
file=file,
|
|
488
|
+
q_answer_api_key=q_answer_api_key,
|
|
489
|
+
metadata=metadata,
|
|
490
|
+
_request_auth=_request_auth,
|
|
491
|
+
_content_type=_content_type,
|
|
492
|
+
_headers=_headers,
|
|
493
|
+
_host_index=_host_index
|
|
494
|
+
)
|
|
495
|
+
|
|
496
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
497
|
+
'200': "object",
|
|
498
|
+
'422': "HTTPValidationError",
|
|
499
|
+
}
|
|
500
|
+
response_data = self.api_client.call_api(
|
|
501
|
+
*_param,
|
|
502
|
+
_request_timeout=_request_timeout
|
|
503
|
+
)
|
|
504
|
+
response_data.read()
|
|
505
|
+
return self.api_client.response_deserialize(
|
|
506
|
+
response_data=response_data,
|
|
507
|
+
response_types_map=_response_types_map,
|
|
508
|
+
).data
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
@validate_call
|
|
512
|
+
def add_documents_doc_with_http_info(
|
|
513
|
+
self,
|
|
514
|
+
username: StrictStr,
|
|
515
|
+
dataset: StrictStr,
|
|
516
|
+
connector_id: StrictInt,
|
|
517
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
518
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
519
|
+
metadata: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
520
|
+
_request_timeout: Union[
|
|
521
|
+
None,
|
|
522
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
523
|
+
Tuple[
|
|
524
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
525
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
526
|
+
]
|
|
527
|
+
] = None,
|
|
528
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
529
|
+
_content_type: Optional[StrictStr] = None,
|
|
530
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
531
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
532
|
+
) -> ApiResponse[object]:
|
|
533
|
+
"""Add Documents Doc
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
:param username: (required)
|
|
537
|
+
:type username: str
|
|
538
|
+
:param dataset: (required)
|
|
539
|
+
:type dataset: str
|
|
540
|
+
:param connector_id: (required)
|
|
541
|
+
:type connector_id: int
|
|
542
|
+
:param file: (required)
|
|
543
|
+
:type file: bytearray
|
|
544
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
545
|
+
:type q_answer_api_key: str
|
|
546
|
+
:param metadata:
|
|
547
|
+
:type metadata: bytearray
|
|
548
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
549
|
+
number provided, it will be total request
|
|
550
|
+
timeout. It can also be a pair (tuple) of
|
|
551
|
+
(connection, read) timeouts.
|
|
552
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
553
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
554
|
+
request; this effectively ignores the
|
|
555
|
+
authentication in the spec for a single request.
|
|
556
|
+
:type _request_auth: dict, optional
|
|
557
|
+
:param _content_type: force content-type for the request.
|
|
558
|
+
:type _content_type: str, Optional
|
|
559
|
+
:param _headers: set to override the headers for a single
|
|
560
|
+
request; this effectively ignores the headers
|
|
561
|
+
in the spec for a single request.
|
|
562
|
+
:type _headers: dict, optional
|
|
563
|
+
:param _host_index: set to override the host_index for a single
|
|
564
|
+
request; this effectively ignores the host_index
|
|
565
|
+
in the spec for a single request.
|
|
566
|
+
:type _host_index: int, optional
|
|
567
|
+
:return: Returns the result object.
|
|
568
|
+
""" # noqa: E501
|
|
569
|
+
|
|
570
|
+
_param = self._add_documents_doc_serialize(
|
|
571
|
+
username=username,
|
|
572
|
+
dataset=dataset,
|
|
573
|
+
connector_id=connector_id,
|
|
574
|
+
file=file,
|
|
575
|
+
q_answer_api_key=q_answer_api_key,
|
|
576
|
+
metadata=metadata,
|
|
577
|
+
_request_auth=_request_auth,
|
|
578
|
+
_content_type=_content_type,
|
|
579
|
+
_headers=_headers,
|
|
580
|
+
_host_index=_host_index
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
584
|
+
'200': "object",
|
|
585
|
+
'422': "HTTPValidationError",
|
|
586
|
+
}
|
|
587
|
+
response_data = self.api_client.call_api(
|
|
588
|
+
*_param,
|
|
589
|
+
_request_timeout=_request_timeout
|
|
590
|
+
)
|
|
591
|
+
response_data.read()
|
|
592
|
+
return self.api_client.response_deserialize(
|
|
593
|
+
response_data=response_data,
|
|
594
|
+
response_types_map=_response_types_map,
|
|
595
|
+
)
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
@validate_call
|
|
599
|
+
def add_documents_doc_without_preload_content(
|
|
600
|
+
self,
|
|
601
|
+
username: StrictStr,
|
|
602
|
+
dataset: StrictStr,
|
|
603
|
+
connector_id: StrictInt,
|
|
604
|
+
file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
|
|
605
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
606
|
+
metadata: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
607
|
+
_request_timeout: Union[
|
|
608
|
+
None,
|
|
609
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
610
|
+
Tuple[
|
|
611
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
612
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
613
|
+
]
|
|
614
|
+
] = None,
|
|
615
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
616
|
+
_content_type: Optional[StrictStr] = None,
|
|
617
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
618
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
619
|
+
) -> RESTResponseType:
|
|
620
|
+
"""Add Documents Doc
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
:param username: (required)
|
|
624
|
+
:type username: str
|
|
625
|
+
:param dataset: (required)
|
|
626
|
+
:type dataset: str
|
|
627
|
+
:param connector_id: (required)
|
|
628
|
+
:type connector_id: int
|
|
629
|
+
:param file: (required)
|
|
630
|
+
:type file: bytearray
|
|
631
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
632
|
+
:type q_answer_api_key: str
|
|
633
|
+
:param metadata:
|
|
634
|
+
:type metadata: bytearray
|
|
635
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
636
|
+
number provided, it will be total request
|
|
637
|
+
timeout. It can also be a pair (tuple) of
|
|
638
|
+
(connection, read) timeouts.
|
|
639
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
640
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
641
|
+
request; this effectively ignores the
|
|
642
|
+
authentication in the spec for a single request.
|
|
643
|
+
:type _request_auth: dict, optional
|
|
644
|
+
:param _content_type: force content-type for the request.
|
|
645
|
+
:type _content_type: str, Optional
|
|
646
|
+
:param _headers: set to override the headers for a single
|
|
647
|
+
request; this effectively ignores the headers
|
|
648
|
+
in the spec for a single request.
|
|
649
|
+
:type _headers: dict, optional
|
|
650
|
+
:param _host_index: set to override the host_index for a single
|
|
651
|
+
request; this effectively ignores the host_index
|
|
652
|
+
in the spec for a single request.
|
|
653
|
+
:type _host_index: int, optional
|
|
654
|
+
:return: Returns the result object.
|
|
655
|
+
""" # noqa: E501
|
|
656
|
+
|
|
657
|
+
_param = self._add_documents_doc_serialize(
|
|
658
|
+
username=username,
|
|
659
|
+
dataset=dataset,
|
|
660
|
+
connector_id=connector_id,
|
|
661
|
+
file=file,
|
|
662
|
+
q_answer_api_key=q_answer_api_key,
|
|
663
|
+
metadata=metadata,
|
|
664
|
+
_request_auth=_request_auth,
|
|
665
|
+
_content_type=_content_type,
|
|
666
|
+
_headers=_headers,
|
|
667
|
+
_host_index=_host_index
|
|
668
|
+
)
|
|
669
|
+
|
|
670
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
671
|
+
'200': "object",
|
|
672
|
+
'422': "HTTPValidationError",
|
|
673
|
+
}
|
|
674
|
+
response_data = self.api_client.call_api(
|
|
675
|
+
*_param,
|
|
676
|
+
_request_timeout=_request_timeout
|
|
677
|
+
)
|
|
678
|
+
return response_data.response
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
def _add_documents_doc_serialize(
|
|
682
|
+
self,
|
|
683
|
+
username,
|
|
684
|
+
dataset,
|
|
685
|
+
connector_id,
|
|
686
|
+
file,
|
|
687
|
+
q_answer_api_key,
|
|
688
|
+
metadata,
|
|
689
|
+
_request_auth,
|
|
690
|
+
_content_type,
|
|
691
|
+
_headers,
|
|
692
|
+
_host_index,
|
|
693
|
+
) -> RequestSerialized:
|
|
694
|
+
|
|
695
|
+
_host = None
|
|
696
|
+
|
|
697
|
+
_collection_formats: Dict[str, str] = {
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
_path_params: Dict[str, str] = {}
|
|
701
|
+
_query_params: List[Tuple[str, str]] = []
|
|
702
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
703
|
+
_form_params: List[Tuple[str, str]] = []
|
|
704
|
+
_files: Dict[
|
|
705
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
706
|
+
] = {}
|
|
707
|
+
_body_params: Optional[bytes] = None
|
|
708
|
+
|
|
709
|
+
# process the path parameters
|
|
710
|
+
# process the query parameters
|
|
711
|
+
if username is not None:
|
|
712
|
+
|
|
713
|
+
_query_params.append(('username', username))
|
|
714
|
+
|
|
715
|
+
if dataset is not None:
|
|
716
|
+
|
|
717
|
+
_query_params.append(('dataset', dataset))
|
|
718
|
+
|
|
719
|
+
if connector_id is not None:
|
|
720
|
+
|
|
721
|
+
_query_params.append(('connector_id', connector_id))
|
|
722
|
+
|
|
723
|
+
# process the header parameters
|
|
724
|
+
if q_answer_api_key is not None:
|
|
725
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
726
|
+
# process the form parameters
|
|
727
|
+
if file is not None:
|
|
728
|
+
_files['file'] = file
|
|
729
|
+
if metadata is not None:
|
|
730
|
+
_files['metadata'] = metadata
|
|
731
|
+
# process the body parameter
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
# set the HTTP header `Accept`
|
|
735
|
+
if 'Accept' not in _header_params:
|
|
736
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
737
|
+
[
|
|
738
|
+
'application/json'
|
|
739
|
+
]
|
|
740
|
+
)
|
|
741
|
+
|
|
742
|
+
# set the HTTP header `Content-Type`
|
|
743
|
+
if _content_type:
|
|
744
|
+
_header_params['Content-Type'] = _content_type
|
|
745
|
+
else:
|
|
746
|
+
_default_content_type = (
|
|
747
|
+
self.api_client.select_header_content_type(
|
|
748
|
+
[
|
|
749
|
+
'multipart/form-data'
|
|
750
|
+
]
|
|
751
|
+
)
|
|
752
|
+
)
|
|
753
|
+
if _default_content_type is not None:
|
|
754
|
+
_header_params['Content-Type'] = _default_content_type
|
|
755
|
+
|
|
756
|
+
# authentication setting
|
|
757
|
+
_auth_settings: List[str] = [
|
|
758
|
+
'QAnswer-Api-Key',
|
|
759
|
+
'Bearer token'
|
|
760
|
+
]
|
|
761
|
+
|
|
762
|
+
return self.api_client.param_serialize(
|
|
763
|
+
method='POST',
|
|
764
|
+
resource_path='/api/connectors/document/doc/add',
|
|
765
|
+
path_params=_path_params,
|
|
766
|
+
query_params=_query_params,
|
|
767
|
+
header_params=_header_params,
|
|
768
|
+
body=_body_params,
|
|
769
|
+
post_params=_form_params,
|
|
770
|
+
files=_files,
|
|
771
|
+
auth_settings=_auth_settings,
|
|
772
|
+
collection_formats=_collection_formats,
|
|
773
|
+
_host=_host,
|
|
774
|
+
_request_auth=_request_auth
|
|
775
|
+
)
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
@validate_call
|
|
781
|
+
def add_documents_load_test(
|
|
782
|
+
self,
|
|
783
|
+
data: FileUploadPayload,
|
|
784
|
+
files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
785
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
786
|
+
_request_timeout: Union[
|
|
787
|
+
None,
|
|
788
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
789
|
+
Tuple[
|
|
790
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
791
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
792
|
+
]
|
|
793
|
+
] = None,
|
|
794
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
795
|
+
_content_type: Optional[StrictStr] = None,
|
|
796
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
797
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
798
|
+
) -> StatusResponse:
|
|
799
|
+
"""Add Documents Load Test
|
|
800
|
+
|
|
801
|
+
Add Documents Synchronously
|
|
802
|
+
|
|
803
|
+
:param data: (required)
|
|
804
|
+
:type data: FileUploadPayload
|
|
805
|
+
:param files: (required)
|
|
806
|
+
:type files: List[bytearray]
|
|
807
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
808
|
+
:type q_answer_api_key: str
|
|
809
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
810
|
+
number provided, it will be total request
|
|
811
|
+
timeout. It can also be a pair (tuple) of
|
|
812
|
+
(connection, read) timeouts.
|
|
813
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
814
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
815
|
+
request; this effectively ignores the
|
|
816
|
+
authentication in the spec for a single request.
|
|
817
|
+
:type _request_auth: dict, optional
|
|
818
|
+
:param _content_type: force content-type for the request.
|
|
819
|
+
:type _content_type: str, Optional
|
|
820
|
+
:param _headers: set to override the headers for a single
|
|
821
|
+
request; this effectively ignores the headers
|
|
822
|
+
in the spec for a single request.
|
|
823
|
+
:type _headers: dict, optional
|
|
824
|
+
:param _host_index: set to override the host_index for a single
|
|
825
|
+
request; this effectively ignores the host_index
|
|
826
|
+
in the spec for a single request.
|
|
827
|
+
:type _host_index: int, optional
|
|
828
|
+
:return: Returns the result object.
|
|
829
|
+
""" # noqa: E501
|
|
830
|
+
|
|
831
|
+
_param = self._add_documents_load_test_serialize(
|
|
832
|
+
data=data,
|
|
833
|
+
files=files,
|
|
834
|
+
q_answer_api_key=q_answer_api_key,
|
|
835
|
+
_request_auth=_request_auth,
|
|
836
|
+
_content_type=_content_type,
|
|
837
|
+
_headers=_headers,
|
|
838
|
+
_host_index=_host_index
|
|
839
|
+
)
|
|
840
|
+
|
|
841
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
842
|
+
'200': "StatusResponse",
|
|
843
|
+
'422': "HTTPValidationError",
|
|
844
|
+
}
|
|
845
|
+
response_data = self.api_client.call_api(
|
|
846
|
+
*_param,
|
|
847
|
+
_request_timeout=_request_timeout
|
|
848
|
+
)
|
|
849
|
+
response_data.read()
|
|
850
|
+
return self.api_client.response_deserialize(
|
|
851
|
+
response_data=response_data,
|
|
852
|
+
response_types_map=_response_types_map,
|
|
853
|
+
).data
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
@validate_call
|
|
857
|
+
def add_documents_load_test_with_http_info(
|
|
858
|
+
self,
|
|
859
|
+
data: FileUploadPayload,
|
|
860
|
+
files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
861
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
862
|
+
_request_timeout: Union[
|
|
863
|
+
None,
|
|
864
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
865
|
+
Tuple[
|
|
866
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
867
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
868
|
+
]
|
|
869
|
+
] = None,
|
|
870
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
871
|
+
_content_type: Optional[StrictStr] = None,
|
|
872
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
873
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
874
|
+
) -> ApiResponse[StatusResponse]:
|
|
875
|
+
"""Add Documents Load Test
|
|
876
|
+
|
|
877
|
+
Add Documents Synchronously
|
|
878
|
+
|
|
879
|
+
:param data: (required)
|
|
880
|
+
:type data: FileUploadPayload
|
|
881
|
+
:param files: (required)
|
|
882
|
+
:type files: List[bytearray]
|
|
883
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
884
|
+
:type q_answer_api_key: str
|
|
885
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
886
|
+
number provided, it will be total request
|
|
887
|
+
timeout. It can also be a pair (tuple) of
|
|
888
|
+
(connection, read) timeouts.
|
|
889
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
890
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
891
|
+
request; this effectively ignores the
|
|
892
|
+
authentication in the spec for a single request.
|
|
893
|
+
:type _request_auth: dict, optional
|
|
894
|
+
:param _content_type: force content-type for the request.
|
|
895
|
+
:type _content_type: str, Optional
|
|
896
|
+
:param _headers: set to override the headers for a single
|
|
897
|
+
request; this effectively ignores the headers
|
|
898
|
+
in the spec for a single request.
|
|
899
|
+
:type _headers: dict, optional
|
|
900
|
+
:param _host_index: set to override the host_index for a single
|
|
901
|
+
request; this effectively ignores the host_index
|
|
902
|
+
in the spec for a single request.
|
|
903
|
+
:type _host_index: int, optional
|
|
904
|
+
:return: Returns the result object.
|
|
905
|
+
""" # noqa: E501
|
|
906
|
+
|
|
907
|
+
_param = self._add_documents_load_test_serialize(
|
|
908
|
+
data=data,
|
|
909
|
+
files=files,
|
|
910
|
+
q_answer_api_key=q_answer_api_key,
|
|
911
|
+
_request_auth=_request_auth,
|
|
912
|
+
_content_type=_content_type,
|
|
913
|
+
_headers=_headers,
|
|
914
|
+
_host_index=_host_index
|
|
915
|
+
)
|
|
916
|
+
|
|
917
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
918
|
+
'200': "StatusResponse",
|
|
919
|
+
'422': "HTTPValidationError",
|
|
920
|
+
}
|
|
921
|
+
response_data = self.api_client.call_api(
|
|
922
|
+
*_param,
|
|
923
|
+
_request_timeout=_request_timeout
|
|
924
|
+
)
|
|
925
|
+
response_data.read()
|
|
926
|
+
return self.api_client.response_deserialize(
|
|
927
|
+
response_data=response_data,
|
|
928
|
+
response_types_map=_response_types_map,
|
|
929
|
+
)
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
@validate_call
|
|
933
|
+
def add_documents_load_test_without_preload_content(
|
|
934
|
+
self,
|
|
935
|
+
data: FileUploadPayload,
|
|
936
|
+
files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
937
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
938
|
+
_request_timeout: Union[
|
|
939
|
+
None,
|
|
940
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
941
|
+
Tuple[
|
|
942
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
943
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
944
|
+
]
|
|
945
|
+
] = None,
|
|
946
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
947
|
+
_content_type: Optional[StrictStr] = None,
|
|
948
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
949
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
950
|
+
) -> RESTResponseType:
|
|
951
|
+
"""Add Documents Load Test
|
|
952
|
+
|
|
953
|
+
Add Documents Synchronously
|
|
954
|
+
|
|
955
|
+
:param data: (required)
|
|
956
|
+
:type data: FileUploadPayload
|
|
957
|
+
:param files: (required)
|
|
958
|
+
:type files: List[bytearray]
|
|
959
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
960
|
+
:type q_answer_api_key: str
|
|
961
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
962
|
+
number provided, it will be total request
|
|
963
|
+
timeout. It can also be a pair (tuple) of
|
|
964
|
+
(connection, read) timeouts.
|
|
965
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
966
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
967
|
+
request; this effectively ignores the
|
|
968
|
+
authentication in the spec for a single request.
|
|
969
|
+
:type _request_auth: dict, optional
|
|
970
|
+
:param _content_type: force content-type for the request.
|
|
971
|
+
:type _content_type: str, Optional
|
|
972
|
+
:param _headers: set to override the headers for a single
|
|
973
|
+
request; this effectively ignores the headers
|
|
974
|
+
in the spec for a single request.
|
|
975
|
+
:type _headers: dict, optional
|
|
976
|
+
:param _host_index: set to override the host_index for a single
|
|
977
|
+
request; this effectively ignores the host_index
|
|
978
|
+
in the spec for a single request.
|
|
979
|
+
:type _host_index: int, optional
|
|
980
|
+
:return: Returns the result object.
|
|
981
|
+
""" # noqa: E501
|
|
982
|
+
|
|
983
|
+
_param = self._add_documents_load_test_serialize(
|
|
984
|
+
data=data,
|
|
985
|
+
files=files,
|
|
986
|
+
q_answer_api_key=q_answer_api_key,
|
|
987
|
+
_request_auth=_request_auth,
|
|
988
|
+
_content_type=_content_type,
|
|
989
|
+
_headers=_headers,
|
|
990
|
+
_host_index=_host_index
|
|
991
|
+
)
|
|
992
|
+
|
|
993
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
994
|
+
'200': "StatusResponse",
|
|
995
|
+
'422': "HTTPValidationError",
|
|
996
|
+
}
|
|
997
|
+
response_data = self.api_client.call_api(
|
|
998
|
+
*_param,
|
|
999
|
+
_request_timeout=_request_timeout
|
|
1000
|
+
)
|
|
1001
|
+
return response_data.response
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
def _add_documents_load_test_serialize(
|
|
1005
|
+
self,
|
|
1006
|
+
data,
|
|
1007
|
+
files,
|
|
1008
|
+
q_answer_api_key,
|
|
1009
|
+
_request_auth,
|
|
1010
|
+
_content_type,
|
|
1011
|
+
_headers,
|
|
1012
|
+
_host_index,
|
|
1013
|
+
) -> RequestSerialized:
|
|
1014
|
+
|
|
1015
|
+
_host = None
|
|
1016
|
+
|
|
1017
|
+
_collection_formats: Dict[str, str] = {
|
|
1018
|
+
'files': 'csv',
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
_path_params: Dict[str, str] = {}
|
|
1022
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1023
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1024
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1025
|
+
_files: Dict[
|
|
1026
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1027
|
+
] = {}
|
|
1028
|
+
_body_params: Optional[bytes] = None
|
|
1029
|
+
|
|
1030
|
+
# process the path parameters
|
|
1031
|
+
# process the query parameters
|
|
1032
|
+
# process the header parameters
|
|
1033
|
+
if q_answer_api_key is not None:
|
|
1034
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1035
|
+
# process the form parameters
|
|
1036
|
+
if data is not None:
|
|
1037
|
+
_form_params.append(('data', data))
|
|
1038
|
+
if files is not None:
|
|
1039
|
+
_files['files'] = files
|
|
1040
|
+
# process the body parameter
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
# set the HTTP header `Accept`
|
|
1044
|
+
if 'Accept' not in _header_params:
|
|
1045
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1046
|
+
[
|
|
1047
|
+
'application/json'
|
|
1048
|
+
]
|
|
1049
|
+
)
|
|
1050
|
+
|
|
1051
|
+
# set the HTTP header `Content-Type`
|
|
1052
|
+
if _content_type:
|
|
1053
|
+
_header_params['Content-Type'] = _content_type
|
|
1054
|
+
else:
|
|
1055
|
+
_default_content_type = (
|
|
1056
|
+
self.api_client.select_header_content_type(
|
|
1057
|
+
[
|
|
1058
|
+
'multipart/form-data'
|
|
1059
|
+
]
|
|
1060
|
+
)
|
|
1061
|
+
)
|
|
1062
|
+
if _default_content_type is not None:
|
|
1063
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1064
|
+
|
|
1065
|
+
# authentication setting
|
|
1066
|
+
_auth_settings: List[str] = [
|
|
1067
|
+
'QAnswer-Api-Key',
|
|
1068
|
+
'Bearer token'
|
|
1069
|
+
]
|
|
1070
|
+
|
|
1071
|
+
return self.api_client.param_serialize(
|
|
1072
|
+
method='POST',
|
|
1073
|
+
resource_path='/api/connectors/document/add-async-loadtest',
|
|
1074
|
+
path_params=_path_params,
|
|
1075
|
+
query_params=_query_params,
|
|
1076
|
+
header_params=_header_params,
|
|
1077
|
+
body=_body_params,
|
|
1078
|
+
post_params=_form_params,
|
|
1079
|
+
files=_files,
|
|
1080
|
+
auth_settings=_auth_settings,
|
|
1081
|
+
collection_formats=_collection_formats,
|
|
1082
|
+
_host=_host,
|
|
1083
|
+
_request_auth=_request_auth
|
|
1084
|
+
)
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
@validate_call
|
|
1090
|
+
def add_documents_sync(
|
|
1091
|
+
self,
|
|
1092
|
+
data: FileUploadPayload,
|
|
1093
|
+
files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
1094
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1095
|
+
_request_timeout: Union[
|
|
1096
|
+
None,
|
|
1097
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1098
|
+
Tuple[
|
|
1099
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1100
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1101
|
+
]
|
|
1102
|
+
] = None,
|
|
1103
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1104
|
+
_content_type: Optional[StrictStr] = None,
|
|
1105
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1106
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1107
|
+
) -> StatusResponse:
|
|
1108
|
+
"""Add Documents Sync
|
|
1109
|
+
|
|
1110
|
+
Add Documents Synchronously
|
|
1111
|
+
|
|
1112
|
+
:param data: (required)
|
|
1113
|
+
:type data: FileUploadPayload
|
|
1114
|
+
:param files: (required)
|
|
1115
|
+
:type files: List[bytearray]
|
|
1116
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1117
|
+
:type q_answer_api_key: str
|
|
1118
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1119
|
+
number provided, it will be total request
|
|
1120
|
+
timeout. It can also be a pair (tuple) of
|
|
1121
|
+
(connection, read) timeouts.
|
|
1122
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1123
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1124
|
+
request; this effectively ignores the
|
|
1125
|
+
authentication in the spec for a single request.
|
|
1126
|
+
:type _request_auth: dict, optional
|
|
1127
|
+
:param _content_type: force content-type for the request.
|
|
1128
|
+
:type _content_type: str, Optional
|
|
1129
|
+
:param _headers: set to override the headers for a single
|
|
1130
|
+
request; this effectively ignores the headers
|
|
1131
|
+
in the spec for a single request.
|
|
1132
|
+
:type _headers: dict, optional
|
|
1133
|
+
:param _host_index: set to override the host_index for a single
|
|
1134
|
+
request; this effectively ignores the host_index
|
|
1135
|
+
in the spec for a single request.
|
|
1136
|
+
:type _host_index: int, optional
|
|
1137
|
+
:return: Returns the result object.
|
|
1138
|
+
""" # noqa: E501
|
|
1139
|
+
|
|
1140
|
+
_param = self._add_documents_sync_serialize(
|
|
1141
|
+
data=data,
|
|
1142
|
+
files=files,
|
|
1143
|
+
q_answer_api_key=q_answer_api_key,
|
|
1144
|
+
_request_auth=_request_auth,
|
|
1145
|
+
_content_type=_content_type,
|
|
1146
|
+
_headers=_headers,
|
|
1147
|
+
_host_index=_host_index
|
|
1148
|
+
)
|
|
1149
|
+
|
|
1150
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1151
|
+
'200': "StatusResponse",
|
|
1152
|
+
'422': "HTTPValidationError",
|
|
1153
|
+
}
|
|
1154
|
+
response_data = self.api_client.call_api(
|
|
1155
|
+
*_param,
|
|
1156
|
+
_request_timeout=_request_timeout
|
|
1157
|
+
)
|
|
1158
|
+
response_data.read()
|
|
1159
|
+
return self.api_client.response_deserialize(
|
|
1160
|
+
response_data=response_data,
|
|
1161
|
+
response_types_map=_response_types_map,
|
|
1162
|
+
).data
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
@validate_call
|
|
1166
|
+
def add_documents_sync_with_http_info(
|
|
1167
|
+
self,
|
|
1168
|
+
data: FileUploadPayload,
|
|
1169
|
+
files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
1170
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1171
|
+
_request_timeout: Union[
|
|
1172
|
+
None,
|
|
1173
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1174
|
+
Tuple[
|
|
1175
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1176
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1177
|
+
]
|
|
1178
|
+
] = None,
|
|
1179
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1180
|
+
_content_type: Optional[StrictStr] = None,
|
|
1181
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1182
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1183
|
+
) -> ApiResponse[StatusResponse]:
|
|
1184
|
+
"""Add Documents Sync
|
|
1185
|
+
|
|
1186
|
+
Add Documents Synchronously
|
|
1187
|
+
|
|
1188
|
+
:param data: (required)
|
|
1189
|
+
:type data: FileUploadPayload
|
|
1190
|
+
:param files: (required)
|
|
1191
|
+
:type files: List[bytearray]
|
|
1192
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1193
|
+
:type q_answer_api_key: str
|
|
1194
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1195
|
+
number provided, it will be total request
|
|
1196
|
+
timeout. It can also be a pair (tuple) of
|
|
1197
|
+
(connection, read) timeouts.
|
|
1198
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1199
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1200
|
+
request; this effectively ignores the
|
|
1201
|
+
authentication in the spec for a single request.
|
|
1202
|
+
:type _request_auth: dict, optional
|
|
1203
|
+
:param _content_type: force content-type for the request.
|
|
1204
|
+
:type _content_type: str, Optional
|
|
1205
|
+
:param _headers: set to override the headers for a single
|
|
1206
|
+
request; this effectively ignores the headers
|
|
1207
|
+
in the spec for a single request.
|
|
1208
|
+
:type _headers: dict, optional
|
|
1209
|
+
:param _host_index: set to override the host_index for a single
|
|
1210
|
+
request; this effectively ignores the host_index
|
|
1211
|
+
in the spec for a single request.
|
|
1212
|
+
:type _host_index: int, optional
|
|
1213
|
+
:return: Returns the result object.
|
|
1214
|
+
""" # noqa: E501
|
|
1215
|
+
|
|
1216
|
+
_param = self._add_documents_sync_serialize(
|
|
1217
|
+
data=data,
|
|
1218
|
+
files=files,
|
|
1219
|
+
q_answer_api_key=q_answer_api_key,
|
|
1220
|
+
_request_auth=_request_auth,
|
|
1221
|
+
_content_type=_content_type,
|
|
1222
|
+
_headers=_headers,
|
|
1223
|
+
_host_index=_host_index
|
|
1224
|
+
)
|
|
1225
|
+
|
|
1226
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1227
|
+
'200': "StatusResponse",
|
|
1228
|
+
'422': "HTTPValidationError",
|
|
1229
|
+
}
|
|
1230
|
+
response_data = self.api_client.call_api(
|
|
1231
|
+
*_param,
|
|
1232
|
+
_request_timeout=_request_timeout
|
|
1233
|
+
)
|
|
1234
|
+
response_data.read()
|
|
1235
|
+
return self.api_client.response_deserialize(
|
|
1236
|
+
response_data=response_data,
|
|
1237
|
+
response_types_map=_response_types_map,
|
|
1238
|
+
)
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
@validate_call
|
|
1242
|
+
def add_documents_sync_without_preload_content(
|
|
1243
|
+
self,
|
|
1244
|
+
data: FileUploadPayload,
|
|
1245
|
+
files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
1246
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1247
|
+
_request_timeout: Union[
|
|
1248
|
+
None,
|
|
1249
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1250
|
+
Tuple[
|
|
1251
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1252
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1253
|
+
]
|
|
1254
|
+
] = None,
|
|
1255
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1256
|
+
_content_type: Optional[StrictStr] = None,
|
|
1257
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1258
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1259
|
+
) -> RESTResponseType:
|
|
1260
|
+
"""Add Documents Sync
|
|
1261
|
+
|
|
1262
|
+
Add Documents Synchronously
|
|
1263
|
+
|
|
1264
|
+
:param data: (required)
|
|
1265
|
+
:type data: FileUploadPayload
|
|
1266
|
+
:param files: (required)
|
|
1267
|
+
:type files: List[bytearray]
|
|
1268
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1269
|
+
:type q_answer_api_key: str
|
|
1270
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1271
|
+
number provided, it will be total request
|
|
1272
|
+
timeout. It can also be a pair (tuple) of
|
|
1273
|
+
(connection, read) timeouts.
|
|
1274
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1275
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1276
|
+
request; this effectively ignores the
|
|
1277
|
+
authentication in the spec for a single request.
|
|
1278
|
+
:type _request_auth: dict, optional
|
|
1279
|
+
:param _content_type: force content-type for the request.
|
|
1280
|
+
:type _content_type: str, Optional
|
|
1281
|
+
:param _headers: set to override the headers for a single
|
|
1282
|
+
request; this effectively ignores the headers
|
|
1283
|
+
in the spec for a single request.
|
|
1284
|
+
:type _headers: dict, optional
|
|
1285
|
+
:param _host_index: set to override the host_index for a single
|
|
1286
|
+
request; this effectively ignores the host_index
|
|
1287
|
+
in the spec for a single request.
|
|
1288
|
+
:type _host_index: int, optional
|
|
1289
|
+
:return: Returns the result object.
|
|
1290
|
+
""" # noqa: E501
|
|
1291
|
+
|
|
1292
|
+
_param = self._add_documents_sync_serialize(
|
|
1293
|
+
data=data,
|
|
1294
|
+
files=files,
|
|
1295
|
+
q_answer_api_key=q_answer_api_key,
|
|
1296
|
+
_request_auth=_request_auth,
|
|
1297
|
+
_content_type=_content_type,
|
|
1298
|
+
_headers=_headers,
|
|
1299
|
+
_host_index=_host_index
|
|
1300
|
+
)
|
|
1301
|
+
|
|
1302
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1303
|
+
'200': "StatusResponse",
|
|
1304
|
+
'422': "HTTPValidationError",
|
|
1305
|
+
}
|
|
1306
|
+
response_data = self.api_client.call_api(
|
|
1307
|
+
*_param,
|
|
1308
|
+
_request_timeout=_request_timeout
|
|
1309
|
+
)
|
|
1310
|
+
return response_data.response
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
def _add_documents_sync_serialize(
|
|
1314
|
+
self,
|
|
1315
|
+
data,
|
|
1316
|
+
files,
|
|
1317
|
+
q_answer_api_key,
|
|
1318
|
+
_request_auth,
|
|
1319
|
+
_content_type,
|
|
1320
|
+
_headers,
|
|
1321
|
+
_host_index,
|
|
1322
|
+
) -> RequestSerialized:
|
|
1323
|
+
|
|
1324
|
+
_host = None
|
|
1325
|
+
|
|
1326
|
+
_collection_formats: Dict[str, str] = {
|
|
1327
|
+
'files': 'csv',
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
_path_params: Dict[str, str] = {}
|
|
1331
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1332
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1333
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1334
|
+
_files: Dict[
|
|
1335
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1336
|
+
] = {}
|
|
1337
|
+
_body_params: Optional[bytes] = None
|
|
1338
|
+
|
|
1339
|
+
# process the path parameters
|
|
1340
|
+
# process the query parameters
|
|
1341
|
+
# process the header parameters
|
|
1342
|
+
if q_answer_api_key is not None:
|
|
1343
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1344
|
+
# process the form parameters
|
|
1345
|
+
if data is not None:
|
|
1346
|
+
_form_params.append(('data', data))
|
|
1347
|
+
if files is not None:
|
|
1348
|
+
_files['files'] = files
|
|
1349
|
+
# process the body parameter
|
|
1350
|
+
|
|
1351
|
+
|
|
1352
|
+
# set the HTTP header `Accept`
|
|
1353
|
+
if 'Accept' not in _header_params:
|
|
1354
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1355
|
+
[
|
|
1356
|
+
'application/json'
|
|
1357
|
+
]
|
|
1358
|
+
)
|
|
1359
|
+
|
|
1360
|
+
# set the HTTP header `Content-Type`
|
|
1361
|
+
if _content_type:
|
|
1362
|
+
_header_params['Content-Type'] = _content_type
|
|
1363
|
+
else:
|
|
1364
|
+
_default_content_type = (
|
|
1365
|
+
self.api_client.select_header_content_type(
|
|
1366
|
+
[
|
|
1367
|
+
'multipart/form-data'
|
|
1368
|
+
]
|
|
1369
|
+
)
|
|
1370
|
+
)
|
|
1371
|
+
if _default_content_type is not None:
|
|
1372
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1373
|
+
|
|
1374
|
+
# authentication setting
|
|
1375
|
+
_auth_settings: List[str] = [
|
|
1376
|
+
'QAnswer-Api-Key',
|
|
1377
|
+
'Bearer token'
|
|
1378
|
+
]
|
|
1379
|
+
|
|
1380
|
+
return self.api_client.param_serialize(
|
|
1381
|
+
method='POST',
|
|
1382
|
+
resource_path='/api/connectors/document/add-async',
|
|
1383
|
+
path_params=_path_params,
|
|
1384
|
+
query_params=_query_params,
|
|
1385
|
+
header_params=_header_params,
|
|
1386
|
+
body=_body_params,
|
|
1387
|
+
post_params=_form_params,
|
|
1388
|
+
files=_files,
|
|
1389
|
+
auth_settings=_auth_settings,
|
|
1390
|
+
collection_formats=_collection_formats,
|
|
1391
|
+
_host=_host,
|
|
1392
|
+
_request_auth=_request_auth
|
|
1393
|
+
)
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
@validate_call
|
|
1399
|
+
def create_document_connector(
|
|
1400
|
+
self,
|
|
1401
|
+
create_connector_request: CreateConnectorRequest,
|
|
1402
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1403
|
+
_request_timeout: Union[
|
|
1404
|
+
None,
|
|
1405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1406
|
+
Tuple[
|
|
1407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1408
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1409
|
+
]
|
|
1410
|
+
] = None,
|
|
1411
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1412
|
+
_content_type: Optional[StrictStr] = None,
|
|
1413
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1414
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1415
|
+
) -> CreateConnectorResponse:
|
|
1416
|
+
"""Create Document Connector
|
|
1417
|
+
|
|
1418
|
+
Create Document Connector
|
|
1419
|
+
|
|
1420
|
+
:param create_connector_request: (required)
|
|
1421
|
+
:type create_connector_request: CreateConnectorRequest
|
|
1422
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1423
|
+
:type q_answer_api_key: str
|
|
1424
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1425
|
+
number provided, it will be total request
|
|
1426
|
+
timeout. It can also be a pair (tuple) of
|
|
1427
|
+
(connection, read) timeouts.
|
|
1428
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1429
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1430
|
+
request; this effectively ignores the
|
|
1431
|
+
authentication in the spec for a single request.
|
|
1432
|
+
:type _request_auth: dict, optional
|
|
1433
|
+
:param _content_type: force content-type for the request.
|
|
1434
|
+
:type _content_type: str, Optional
|
|
1435
|
+
:param _headers: set to override the headers for a single
|
|
1436
|
+
request; this effectively ignores the headers
|
|
1437
|
+
in the spec for a single request.
|
|
1438
|
+
:type _headers: dict, optional
|
|
1439
|
+
:param _host_index: set to override the host_index for a single
|
|
1440
|
+
request; this effectively ignores the host_index
|
|
1441
|
+
in the spec for a single request.
|
|
1442
|
+
:type _host_index: int, optional
|
|
1443
|
+
:return: Returns the result object.
|
|
1444
|
+
""" # noqa: E501
|
|
1445
|
+
|
|
1446
|
+
_param = self._create_document_connector_serialize(
|
|
1447
|
+
create_connector_request=create_connector_request,
|
|
1448
|
+
q_answer_api_key=q_answer_api_key,
|
|
1449
|
+
_request_auth=_request_auth,
|
|
1450
|
+
_content_type=_content_type,
|
|
1451
|
+
_headers=_headers,
|
|
1452
|
+
_host_index=_host_index
|
|
1453
|
+
)
|
|
1454
|
+
|
|
1455
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1456
|
+
'200': "CreateConnectorResponse",
|
|
1457
|
+
'422': "HTTPValidationError",
|
|
1458
|
+
}
|
|
1459
|
+
response_data = self.api_client.call_api(
|
|
1460
|
+
*_param,
|
|
1461
|
+
_request_timeout=_request_timeout
|
|
1462
|
+
)
|
|
1463
|
+
response_data.read()
|
|
1464
|
+
return self.api_client.response_deserialize(
|
|
1465
|
+
response_data=response_data,
|
|
1466
|
+
response_types_map=_response_types_map,
|
|
1467
|
+
).data
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
@validate_call
|
|
1471
|
+
def create_document_connector_with_http_info(
|
|
1472
|
+
self,
|
|
1473
|
+
create_connector_request: CreateConnectorRequest,
|
|
1474
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1475
|
+
_request_timeout: Union[
|
|
1476
|
+
None,
|
|
1477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1478
|
+
Tuple[
|
|
1479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1480
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1481
|
+
]
|
|
1482
|
+
] = None,
|
|
1483
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1484
|
+
_content_type: Optional[StrictStr] = None,
|
|
1485
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1486
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1487
|
+
) -> ApiResponse[CreateConnectorResponse]:
|
|
1488
|
+
"""Create Document Connector
|
|
1489
|
+
|
|
1490
|
+
Create Document Connector
|
|
1491
|
+
|
|
1492
|
+
:param create_connector_request: (required)
|
|
1493
|
+
:type create_connector_request: CreateConnectorRequest
|
|
1494
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1495
|
+
:type q_answer_api_key: str
|
|
1496
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1497
|
+
number provided, it will be total request
|
|
1498
|
+
timeout. It can also be a pair (tuple) of
|
|
1499
|
+
(connection, read) timeouts.
|
|
1500
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1501
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1502
|
+
request; this effectively ignores the
|
|
1503
|
+
authentication in the spec for a single request.
|
|
1504
|
+
:type _request_auth: dict, optional
|
|
1505
|
+
:param _content_type: force content-type for the request.
|
|
1506
|
+
:type _content_type: str, Optional
|
|
1507
|
+
:param _headers: set to override the headers for a single
|
|
1508
|
+
request; this effectively ignores the headers
|
|
1509
|
+
in the spec for a single request.
|
|
1510
|
+
:type _headers: dict, optional
|
|
1511
|
+
:param _host_index: set to override the host_index for a single
|
|
1512
|
+
request; this effectively ignores the host_index
|
|
1513
|
+
in the spec for a single request.
|
|
1514
|
+
:type _host_index: int, optional
|
|
1515
|
+
:return: Returns the result object.
|
|
1516
|
+
""" # noqa: E501
|
|
1517
|
+
|
|
1518
|
+
_param = self._create_document_connector_serialize(
|
|
1519
|
+
create_connector_request=create_connector_request,
|
|
1520
|
+
q_answer_api_key=q_answer_api_key,
|
|
1521
|
+
_request_auth=_request_auth,
|
|
1522
|
+
_content_type=_content_type,
|
|
1523
|
+
_headers=_headers,
|
|
1524
|
+
_host_index=_host_index
|
|
1525
|
+
)
|
|
1526
|
+
|
|
1527
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1528
|
+
'200': "CreateConnectorResponse",
|
|
1529
|
+
'422': "HTTPValidationError",
|
|
1530
|
+
}
|
|
1531
|
+
response_data = self.api_client.call_api(
|
|
1532
|
+
*_param,
|
|
1533
|
+
_request_timeout=_request_timeout
|
|
1534
|
+
)
|
|
1535
|
+
response_data.read()
|
|
1536
|
+
return self.api_client.response_deserialize(
|
|
1537
|
+
response_data=response_data,
|
|
1538
|
+
response_types_map=_response_types_map,
|
|
1539
|
+
)
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
@validate_call
|
|
1543
|
+
def create_document_connector_without_preload_content(
|
|
1544
|
+
self,
|
|
1545
|
+
create_connector_request: CreateConnectorRequest,
|
|
1546
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1547
|
+
_request_timeout: Union[
|
|
1548
|
+
None,
|
|
1549
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1550
|
+
Tuple[
|
|
1551
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1552
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1553
|
+
]
|
|
1554
|
+
] = None,
|
|
1555
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1556
|
+
_content_type: Optional[StrictStr] = None,
|
|
1557
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1558
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1559
|
+
) -> RESTResponseType:
|
|
1560
|
+
"""Create Document Connector
|
|
1561
|
+
|
|
1562
|
+
Create Document Connector
|
|
1563
|
+
|
|
1564
|
+
:param create_connector_request: (required)
|
|
1565
|
+
:type create_connector_request: CreateConnectorRequest
|
|
1566
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1567
|
+
:type q_answer_api_key: str
|
|
1568
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1569
|
+
number provided, it will be total request
|
|
1570
|
+
timeout. It can also be a pair (tuple) of
|
|
1571
|
+
(connection, read) timeouts.
|
|
1572
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1573
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1574
|
+
request; this effectively ignores the
|
|
1575
|
+
authentication in the spec for a single request.
|
|
1576
|
+
:type _request_auth: dict, optional
|
|
1577
|
+
:param _content_type: force content-type for the request.
|
|
1578
|
+
:type _content_type: str, Optional
|
|
1579
|
+
:param _headers: set to override the headers for a single
|
|
1580
|
+
request; this effectively ignores the headers
|
|
1581
|
+
in the spec for a single request.
|
|
1582
|
+
:type _headers: dict, optional
|
|
1583
|
+
:param _host_index: set to override the host_index for a single
|
|
1584
|
+
request; this effectively ignores the host_index
|
|
1585
|
+
in the spec for a single request.
|
|
1586
|
+
:type _host_index: int, optional
|
|
1587
|
+
:return: Returns the result object.
|
|
1588
|
+
""" # noqa: E501
|
|
1589
|
+
|
|
1590
|
+
_param = self._create_document_connector_serialize(
|
|
1591
|
+
create_connector_request=create_connector_request,
|
|
1592
|
+
q_answer_api_key=q_answer_api_key,
|
|
1593
|
+
_request_auth=_request_auth,
|
|
1594
|
+
_content_type=_content_type,
|
|
1595
|
+
_headers=_headers,
|
|
1596
|
+
_host_index=_host_index
|
|
1597
|
+
)
|
|
1598
|
+
|
|
1599
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1600
|
+
'200': "CreateConnectorResponse",
|
|
1601
|
+
'422': "HTTPValidationError",
|
|
1602
|
+
}
|
|
1603
|
+
response_data = self.api_client.call_api(
|
|
1604
|
+
*_param,
|
|
1605
|
+
_request_timeout=_request_timeout
|
|
1606
|
+
)
|
|
1607
|
+
return response_data.response
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
def _create_document_connector_serialize(
|
|
1611
|
+
self,
|
|
1612
|
+
create_connector_request,
|
|
1613
|
+
q_answer_api_key,
|
|
1614
|
+
_request_auth,
|
|
1615
|
+
_content_type,
|
|
1616
|
+
_headers,
|
|
1617
|
+
_host_index,
|
|
1618
|
+
) -> RequestSerialized:
|
|
1619
|
+
|
|
1620
|
+
_host = None
|
|
1621
|
+
|
|
1622
|
+
_collection_formats: Dict[str, str] = {
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
_path_params: Dict[str, str] = {}
|
|
1626
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1627
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1628
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1629
|
+
_files: Dict[
|
|
1630
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1631
|
+
] = {}
|
|
1632
|
+
_body_params: Optional[bytes] = None
|
|
1633
|
+
|
|
1634
|
+
# process the path parameters
|
|
1635
|
+
# process the query parameters
|
|
1636
|
+
# process the header parameters
|
|
1637
|
+
if q_answer_api_key is not None:
|
|
1638
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1639
|
+
# process the form parameters
|
|
1640
|
+
# process the body parameter
|
|
1641
|
+
if create_connector_request is not None:
|
|
1642
|
+
_body_params = create_connector_request
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
# set the HTTP header `Accept`
|
|
1646
|
+
if 'Accept' not in _header_params:
|
|
1647
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1648
|
+
[
|
|
1649
|
+
'application/json'
|
|
1650
|
+
]
|
|
1651
|
+
)
|
|
1652
|
+
|
|
1653
|
+
# set the HTTP header `Content-Type`
|
|
1654
|
+
if _content_type:
|
|
1655
|
+
_header_params['Content-Type'] = _content_type
|
|
1656
|
+
else:
|
|
1657
|
+
_default_content_type = (
|
|
1658
|
+
self.api_client.select_header_content_type(
|
|
1659
|
+
[
|
|
1660
|
+
'application/json'
|
|
1661
|
+
]
|
|
1662
|
+
)
|
|
1663
|
+
)
|
|
1664
|
+
if _default_content_type is not None:
|
|
1665
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1666
|
+
|
|
1667
|
+
# authentication setting
|
|
1668
|
+
_auth_settings: List[str] = [
|
|
1669
|
+
'QAnswer-Api-Key',
|
|
1670
|
+
'Bearer token'
|
|
1671
|
+
]
|
|
1672
|
+
|
|
1673
|
+
return self.api_client.param_serialize(
|
|
1674
|
+
method='POST',
|
|
1675
|
+
resource_path='/api/connectors/document/create',
|
|
1676
|
+
path_params=_path_params,
|
|
1677
|
+
query_params=_query_params,
|
|
1678
|
+
header_params=_header_params,
|
|
1679
|
+
body=_body_params,
|
|
1680
|
+
post_params=_form_params,
|
|
1681
|
+
files=_files,
|
|
1682
|
+
auth_settings=_auth_settings,
|
|
1683
|
+
collection_formats=_collection_formats,
|
|
1684
|
+
_host=_host,
|
|
1685
|
+
_request_auth=_request_auth
|
|
1686
|
+
)
|
|
1687
|
+
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
|
|
1691
|
+
@validate_call
|
|
1692
|
+
def get_document_parsing_settings(
|
|
1693
|
+
self,
|
|
1694
|
+
username: StrictStr,
|
|
1695
|
+
dataset: StrictStr,
|
|
1696
|
+
assistant_id: Optional[StrictStr] = None,
|
|
1697
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1698
|
+
_request_timeout: Union[
|
|
1699
|
+
None,
|
|
1700
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1701
|
+
Tuple[
|
|
1702
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1703
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1704
|
+
]
|
|
1705
|
+
] = None,
|
|
1706
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1707
|
+
_content_type: Optional[StrictStr] = None,
|
|
1708
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1709
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1710
|
+
) -> DocumentParsingTaskSettings:
|
|
1711
|
+
"""Get Document Parsing Settings
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
:param username: (required)
|
|
1715
|
+
:type username: str
|
|
1716
|
+
:param dataset: (required)
|
|
1717
|
+
:type dataset: str
|
|
1718
|
+
:param assistant_id:
|
|
1719
|
+
:type assistant_id: str
|
|
1720
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1721
|
+
:type q_answer_api_key: str
|
|
1722
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1723
|
+
number provided, it will be total request
|
|
1724
|
+
timeout. It can also be a pair (tuple) of
|
|
1725
|
+
(connection, read) timeouts.
|
|
1726
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1727
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1728
|
+
request; this effectively ignores the
|
|
1729
|
+
authentication in the spec for a single request.
|
|
1730
|
+
:type _request_auth: dict, optional
|
|
1731
|
+
:param _content_type: force content-type for the request.
|
|
1732
|
+
:type _content_type: str, Optional
|
|
1733
|
+
:param _headers: set to override the headers for a single
|
|
1734
|
+
request; this effectively ignores the headers
|
|
1735
|
+
in the spec for a single request.
|
|
1736
|
+
:type _headers: dict, optional
|
|
1737
|
+
:param _host_index: set to override the host_index for a single
|
|
1738
|
+
request; this effectively ignores the host_index
|
|
1739
|
+
in the spec for a single request.
|
|
1740
|
+
:type _host_index: int, optional
|
|
1741
|
+
:return: Returns the result object.
|
|
1742
|
+
""" # noqa: E501
|
|
1743
|
+
|
|
1744
|
+
_param = self._get_document_parsing_settings_serialize(
|
|
1745
|
+
username=username,
|
|
1746
|
+
dataset=dataset,
|
|
1747
|
+
assistant_id=assistant_id,
|
|
1748
|
+
q_answer_api_key=q_answer_api_key,
|
|
1749
|
+
_request_auth=_request_auth,
|
|
1750
|
+
_content_type=_content_type,
|
|
1751
|
+
_headers=_headers,
|
|
1752
|
+
_host_index=_host_index
|
|
1753
|
+
)
|
|
1754
|
+
|
|
1755
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1756
|
+
'200': "DocumentParsingTaskSettings",
|
|
1757
|
+
'422': "HTTPValidationError",
|
|
1758
|
+
}
|
|
1759
|
+
response_data = self.api_client.call_api(
|
|
1760
|
+
*_param,
|
|
1761
|
+
_request_timeout=_request_timeout
|
|
1762
|
+
)
|
|
1763
|
+
response_data.read()
|
|
1764
|
+
return self.api_client.response_deserialize(
|
|
1765
|
+
response_data=response_data,
|
|
1766
|
+
response_types_map=_response_types_map,
|
|
1767
|
+
).data
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
@validate_call
|
|
1771
|
+
def get_document_parsing_settings_with_http_info(
|
|
1772
|
+
self,
|
|
1773
|
+
username: StrictStr,
|
|
1774
|
+
dataset: StrictStr,
|
|
1775
|
+
assistant_id: Optional[StrictStr] = None,
|
|
1776
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1777
|
+
_request_timeout: Union[
|
|
1778
|
+
None,
|
|
1779
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1780
|
+
Tuple[
|
|
1781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1782
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1783
|
+
]
|
|
1784
|
+
] = None,
|
|
1785
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1786
|
+
_content_type: Optional[StrictStr] = None,
|
|
1787
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1788
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1789
|
+
) -> ApiResponse[DocumentParsingTaskSettings]:
|
|
1790
|
+
"""Get Document Parsing Settings
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
:param username: (required)
|
|
1794
|
+
:type username: str
|
|
1795
|
+
:param dataset: (required)
|
|
1796
|
+
:type dataset: str
|
|
1797
|
+
:param assistant_id:
|
|
1798
|
+
:type assistant_id: str
|
|
1799
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1800
|
+
:type q_answer_api_key: str
|
|
1801
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1802
|
+
number provided, it will be total request
|
|
1803
|
+
timeout. It can also be a pair (tuple) of
|
|
1804
|
+
(connection, read) timeouts.
|
|
1805
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1806
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1807
|
+
request; this effectively ignores the
|
|
1808
|
+
authentication in the spec for a single request.
|
|
1809
|
+
:type _request_auth: dict, optional
|
|
1810
|
+
:param _content_type: force content-type for the request.
|
|
1811
|
+
:type _content_type: str, Optional
|
|
1812
|
+
:param _headers: set to override the headers for a single
|
|
1813
|
+
request; this effectively ignores the headers
|
|
1814
|
+
in the spec for a single request.
|
|
1815
|
+
:type _headers: dict, optional
|
|
1816
|
+
:param _host_index: set to override the host_index for a single
|
|
1817
|
+
request; this effectively ignores the host_index
|
|
1818
|
+
in the spec for a single request.
|
|
1819
|
+
:type _host_index: int, optional
|
|
1820
|
+
:return: Returns the result object.
|
|
1821
|
+
""" # noqa: E501
|
|
1822
|
+
|
|
1823
|
+
_param = self._get_document_parsing_settings_serialize(
|
|
1824
|
+
username=username,
|
|
1825
|
+
dataset=dataset,
|
|
1826
|
+
assistant_id=assistant_id,
|
|
1827
|
+
q_answer_api_key=q_answer_api_key,
|
|
1828
|
+
_request_auth=_request_auth,
|
|
1829
|
+
_content_type=_content_type,
|
|
1830
|
+
_headers=_headers,
|
|
1831
|
+
_host_index=_host_index
|
|
1832
|
+
)
|
|
1833
|
+
|
|
1834
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1835
|
+
'200': "DocumentParsingTaskSettings",
|
|
1836
|
+
'422': "HTTPValidationError",
|
|
1837
|
+
}
|
|
1838
|
+
response_data = self.api_client.call_api(
|
|
1839
|
+
*_param,
|
|
1840
|
+
_request_timeout=_request_timeout
|
|
1841
|
+
)
|
|
1842
|
+
response_data.read()
|
|
1843
|
+
return self.api_client.response_deserialize(
|
|
1844
|
+
response_data=response_data,
|
|
1845
|
+
response_types_map=_response_types_map,
|
|
1846
|
+
)
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
@validate_call
|
|
1850
|
+
def get_document_parsing_settings_without_preload_content(
|
|
1851
|
+
self,
|
|
1852
|
+
username: StrictStr,
|
|
1853
|
+
dataset: StrictStr,
|
|
1854
|
+
assistant_id: Optional[StrictStr] = None,
|
|
1855
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1856
|
+
_request_timeout: Union[
|
|
1857
|
+
None,
|
|
1858
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1859
|
+
Tuple[
|
|
1860
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1861
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1862
|
+
]
|
|
1863
|
+
] = None,
|
|
1864
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1865
|
+
_content_type: Optional[StrictStr] = None,
|
|
1866
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1867
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1868
|
+
) -> RESTResponseType:
|
|
1869
|
+
"""Get Document Parsing Settings
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
:param username: (required)
|
|
1873
|
+
:type username: str
|
|
1874
|
+
:param dataset: (required)
|
|
1875
|
+
:type dataset: str
|
|
1876
|
+
:param assistant_id:
|
|
1877
|
+
:type assistant_id: str
|
|
1878
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1879
|
+
:type q_answer_api_key: str
|
|
1880
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1881
|
+
number provided, it will be total request
|
|
1882
|
+
timeout. It can also be a pair (tuple) of
|
|
1883
|
+
(connection, read) timeouts.
|
|
1884
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1885
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1886
|
+
request; this effectively ignores the
|
|
1887
|
+
authentication in the spec for a single request.
|
|
1888
|
+
:type _request_auth: dict, optional
|
|
1889
|
+
:param _content_type: force content-type for the request.
|
|
1890
|
+
:type _content_type: str, Optional
|
|
1891
|
+
:param _headers: set to override the headers for a single
|
|
1892
|
+
request; this effectively ignores the headers
|
|
1893
|
+
in the spec for a single request.
|
|
1894
|
+
:type _headers: dict, optional
|
|
1895
|
+
:param _host_index: set to override the host_index for a single
|
|
1896
|
+
request; this effectively ignores the host_index
|
|
1897
|
+
in the spec for a single request.
|
|
1898
|
+
:type _host_index: int, optional
|
|
1899
|
+
:return: Returns the result object.
|
|
1900
|
+
""" # noqa: E501
|
|
1901
|
+
|
|
1902
|
+
_param = self._get_document_parsing_settings_serialize(
|
|
1903
|
+
username=username,
|
|
1904
|
+
dataset=dataset,
|
|
1905
|
+
assistant_id=assistant_id,
|
|
1906
|
+
q_answer_api_key=q_answer_api_key,
|
|
1907
|
+
_request_auth=_request_auth,
|
|
1908
|
+
_content_type=_content_type,
|
|
1909
|
+
_headers=_headers,
|
|
1910
|
+
_host_index=_host_index
|
|
1911
|
+
)
|
|
1912
|
+
|
|
1913
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1914
|
+
'200': "DocumentParsingTaskSettings",
|
|
1915
|
+
'422': "HTTPValidationError",
|
|
1916
|
+
}
|
|
1917
|
+
response_data = self.api_client.call_api(
|
|
1918
|
+
*_param,
|
|
1919
|
+
_request_timeout=_request_timeout
|
|
1920
|
+
)
|
|
1921
|
+
return response_data.response
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
def _get_document_parsing_settings_serialize(
|
|
1925
|
+
self,
|
|
1926
|
+
username,
|
|
1927
|
+
dataset,
|
|
1928
|
+
assistant_id,
|
|
1929
|
+
q_answer_api_key,
|
|
1930
|
+
_request_auth,
|
|
1931
|
+
_content_type,
|
|
1932
|
+
_headers,
|
|
1933
|
+
_host_index,
|
|
1934
|
+
) -> RequestSerialized:
|
|
1935
|
+
|
|
1936
|
+
_host = None
|
|
1937
|
+
|
|
1938
|
+
_collection_formats: Dict[str, str] = {
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
_path_params: Dict[str, str] = {}
|
|
1942
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1943
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1944
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1945
|
+
_files: Dict[
|
|
1946
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1947
|
+
] = {}
|
|
1948
|
+
_body_params: Optional[bytes] = None
|
|
1949
|
+
|
|
1950
|
+
# process the path parameters
|
|
1951
|
+
# process the query parameters
|
|
1952
|
+
if username is not None:
|
|
1953
|
+
|
|
1954
|
+
_query_params.append(('username', username))
|
|
1955
|
+
|
|
1956
|
+
if dataset is not None:
|
|
1957
|
+
|
|
1958
|
+
_query_params.append(('dataset', dataset))
|
|
1959
|
+
|
|
1960
|
+
if assistant_id is not None:
|
|
1961
|
+
|
|
1962
|
+
_query_params.append(('assistantId', assistant_id))
|
|
1963
|
+
|
|
1964
|
+
# process the header parameters
|
|
1965
|
+
if q_answer_api_key is not None:
|
|
1966
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1967
|
+
# process the form parameters
|
|
1968
|
+
# process the body parameter
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
# set the HTTP header `Accept`
|
|
1972
|
+
if 'Accept' not in _header_params:
|
|
1973
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1974
|
+
[
|
|
1975
|
+
'application/json'
|
|
1976
|
+
]
|
|
1977
|
+
)
|
|
1978
|
+
|
|
1979
|
+
|
|
1980
|
+
# authentication setting
|
|
1981
|
+
_auth_settings: List[str] = [
|
|
1982
|
+
'QAnswer-Api-Key',
|
|
1983
|
+
'Bearer token'
|
|
1984
|
+
]
|
|
1985
|
+
|
|
1986
|
+
return self.api_client.param_serialize(
|
|
1987
|
+
method='GET',
|
|
1988
|
+
resource_path='/api/connectors/document/document-parsing/settings',
|
|
1989
|
+
path_params=_path_params,
|
|
1990
|
+
query_params=_query_params,
|
|
1991
|
+
header_params=_header_params,
|
|
1992
|
+
body=_body_params,
|
|
1993
|
+
post_params=_form_params,
|
|
1994
|
+
files=_files,
|
|
1995
|
+
auth_settings=_auth_settings,
|
|
1996
|
+
collection_formats=_collection_formats,
|
|
1997
|
+
_host=_host,
|
|
1998
|
+
_request_auth=_request_auth
|
|
1999
|
+
)
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
|
|
2004
|
+
@validate_call
|
|
2005
|
+
def override_document(
|
|
2006
|
+
self,
|
|
2007
|
+
username: StrictStr,
|
|
2008
|
+
dataset: StrictStr,
|
|
2009
|
+
file_id: StrictStr,
|
|
2010
|
+
file: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
2011
|
+
connector_id: Optional[StrictInt] = None,
|
|
2012
|
+
conversation_id: Optional[StrictStr] = None,
|
|
2013
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2014
|
+
metadata: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
2015
|
+
_request_timeout: Union[
|
|
2016
|
+
None,
|
|
2017
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2018
|
+
Tuple[
|
|
2019
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2020
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2021
|
+
]
|
|
2022
|
+
] = None,
|
|
2023
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2024
|
+
_content_type: Optional[StrictStr] = None,
|
|
2025
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2026
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2027
|
+
) -> StatusResponse:
|
|
2028
|
+
"""Override Document
|
|
2029
|
+
|
|
2030
|
+
Override an existing document with a newly uploaded file. * we will not perform in-place override, we will delete the existing file and add the new one ! file_id will be preserved in the new file
|
|
2031
|
+
|
|
2032
|
+
:param username: (required)
|
|
2033
|
+
:type username: str
|
|
2034
|
+
:param dataset: (required)
|
|
2035
|
+
:type dataset: str
|
|
2036
|
+
:param file_id: (required)
|
|
2037
|
+
:type file_id: str
|
|
2038
|
+
:param file: (required)
|
|
2039
|
+
:type file: List[bytearray]
|
|
2040
|
+
:param connector_id:
|
|
2041
|
+
:type connector_id: int
|
|
2042
|
+
:param conversation_id:
|
|
2043
|
+
:type conversation_id: str
|
|
2044
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2045
|
+
:type q_answer_api_key: str
|
|
2046
|
+
:param metadata:
|
|
2047
|
+
:type metadata: bytearray
|
|
2048
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2049
|
+
number provided, it will be total request
|
|
2050
|
+
timeout. It can also be a pair (tuple) of
|
|
2051
|
+
(connection, read) timeouts.
|
|
2052
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2053
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2054
|
+
request; this effectively ignores the
|
|
2055
|
+
authentication in the spec for a single request.
|
|
2056
|
+
:type _request_auth: dict, optional
|
|
2057
|
+
:param _content_type: force content-type for the request.
|
|
2058
|
+
:type _content_type: str, Optional
|
|
2059
|
+
:param _headers: set to override the headers for a single
|
|
2060
|
+
request; this effectively ignores the headers
|
|
2061
|
+
in the spec for a single request.
|
|
2062
|
+
:type _headers: dict, optional
|
|
2063
|
+
:param _host_index: set to override the host_index for a single
|
|
2064
|
+
request; this effectively ignores the host_index
|
|
2065
|
+
in the spec for a single request.
|
|
2066
|
+
:type _host_index: int, optional
|
|
2067
|
+
:return: Returns the result object.
|
|
2068
|
+
""" # noqa: E501
|
|
2069
|
+
|
|
2070
|
+
_param = self._override_document_serialize(
|
|
2071
|
+
username=username,
|
|
2072
|
+
dataset=dataset,
|
|
2073
|
+
file_id=file_id,
|
|
2074
|
+
file=file,
|
|
2075
|
+
connector_id=connector_id,
|
|
2076
|
+
conversation_id=conversation_id,
|
|
2077
|
+
q_answer_api_key=q_answer_api_key,
|
|
2078
|
+
metadata=metadata,
|
|
2079
|
+
_request_auth=_request_auth,
|
|
2080
|
+
_content_type=_content_type,
|
|
2081
|
+
_headers=_headers,
|
|
2082
|
+
_host_index=_host_index
|
|
2083
|
+
)
|
|
2084
|
+
|
|
2085
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2086
|
+
'200': "StatusResponse",
|
|
2087
|
+
'422': "HTTPValidationError",
|
|
2088
|
+
}
|
|
2089
|
+
response_data = self.api_client.call_api(
|
|
2090
|
+
*_param,
|
|
2091
|
+
_request_timeout=_request_timeout
|
|
2092
|
+
)
|
|
2093
|
+
response_data.read()
|
|
2094
|
+
return self.api_client.response_deserialize(
|
|
2095
|
+
response_data=response_data,
|
|
2096
|
+
response_types_map=_response_types_map,
|
|
2097
|
+
).data
|
|
2098
|
+
|
|
2099
|
+
|
|
2100
|
+
@validate_call
|
|
2101
|
+
def override_document_with_http_info(
|
|
2102
|
+
self,
|
|
2103
|
+
username: StrictStr,
|
|
2104
|
+
dataset: StrictStr,
|
|
2105
|
+
file_id: StrictStr,
|
|
2106
|
+
file: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
2107
|
+
connector_id: Optional[StrictInt] = None,
|
|
2108
|
+
conversation_id: Optional[StrictStr] = None,
|
|
2109
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2110
|
+
metadata: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
2111
|
+
_request_timeout: Union[
|
|
2112
|
+
None,
|
|
2113
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2114
|
+
Tuple[
|
|
2115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2116
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2117
|
+
]
|
|
2118
|
+
] = None,
|
|
2119
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2120
|
+
_content_type: Optional[StrictStr] = None,
|
|
2121
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2122
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2123
|
+
) -> ApiResponse[StatusResponse]:
|
|
2124
|
+
"""Override Document
|
|
2125
|
+
|
|
2126
|
+
Override an existing document with a newly uploaded file. * we will not perform in-place override, we will delete the existing file and add the new one ! file_id will be preserved in the new file
|
|
2127
|
+
|
|
2128
|
+
:param username: (required)
|
|
2129
|
+
:type username: str
|
|
2130
|
+
:param dataset: (required)
|
|
2131
|
+
:type dataset: str
|
|
2132
|
+
:param file_id: (required)
|
|
2133
|
+
:type file_id: str
|
|
2134
|
+
:param file: (required)
|
|
2135
|
+
:type file: List[bytearray]
|
|
2136
|
+
:param connector_id:
|
|
2137
|
+
:type connector_id: int
|
|
2138
|
+
:param conversation_id:
|
|
2139
|
+
:type conversation_id: str
|
|
2140
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2141
|
+
:type q_answer_api_key: str
|
|
2142
|
+
:param metadata:
|
|
2143
|
+
:type metadata: bytearray
|
|
2144
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2145
|
+
number provided, it will be total request
|
|
2146
|
+
timeout. It can also be a pair (tuple) of
|
|
2147
|
+
(connection, read) timeouts.
|
|
2148
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2149
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2150
|
+
request; this effectively ignores the
|
|
2151
|
+
authentication in the spec for a single request.
|
|
2152
|
+
:type _request_auth: dict, optional
|
|
2153
|
+
:param _content_type: force content-type for the request.
|
|
2154
|
+
:type _content_type: str, Optional
|
|
2155
|
+
:param _headers: set to override the headers for a single
|
|
2156
|
+
request; this effectively ignores the headers
|
|
2157
|
+
in the spec for a single request.
|
|
2158
|
+
:type _headers: dict, optional
|
|
2159
|
+
:param _host_index: set to override the host_index for a single
|
|
2160
|
+
request; this effectively ignores the host_index
|
|
2161
|
+
in the spec for a single request.
|
|
2162
|
+
:type _host_index: int, optional
|
|
2163
|
+
:return: Returns the result object.
|
|
2164
|
+
""" # noqa: E501
|
|
2165
|
+
|
|
2166
|
+
_param = self._override_document_serialize(
|
|
2167
|
+
username=username,
|
|
2168
|
+
dataset=dataset,
|
|
2169
|
+
file_id=file_id,
|
|
2170
|
+
file=file,
|
|
2171
|
+
connector_id=connector_id,
|
|
2172
|
+
conversation_id=conversation_id,
|
|
2173
|
+
q_answer_api_key=q_answer_api_key,
|
|
2174
|
+
metadata=metadata,
|
|
2175
|
+
_request_auth=_request_auth,
|
|
2176
|
+
_content_type=_content_type,
|
|
2177
|
+
_headers=_headers,
|
|
2178
|
+
_host_index=_host_index
|
|
2179
|
+
)
|
|
2180
|
+
|
|
2181
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2182
|
+
'200': "StatusResponse",
|
|
2183
|
+
'422': "HTTPValidationError",
|
|
2184
|
+
}
|
|
2185
|
+
response_data = self.api_client.call_api(
|
|
2186
|
+
*_param,
|
|
2187
|
+
_request_timeout=_request_timeout
|
|
2188
|
+
)
|
|
2189
|
+
response_data.read()
|
|
2190
|
+
return self.api_client.response_deserialize(
|
|
2191
|
+
response_data=response_data,
|
|
2192
|
+
response_types_map=_response_types_map,
|
|
2193
|
+
)
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
@validate_call
|
|
2197
|
+
def override_document_without_preload_content(
|
|
2198
|
+
self,
|
|
2199
|
+
username: StrictStr,
|
|
2200
|
+
dataset: StrictStr,
|
|
2201
|
+
file_id: StrictStr,
|
|
2202
|
+
file: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
|
|
2203
|
+
connector_id: Optional[StrictInt] = None,
|
|
2204
|
+
conversation_id: Optional[StrictStr] = None,
|
|
2205
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2206
|
+
metadata: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
|
|
2207
|
+
_request_timeout: Union[
|
|
2208
|
+
None,
|
|
2209
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2210
|
+
Tuple[
|
|
2211
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2212
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2213
|
+
]
|
|
2214
|
+
] = None,
|
|
2215
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2216
|
+
_content_type: Optional[StrictStr] = None,
|
|
2217
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2218
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2219
|
+
) -> RESTResponseType:
|
|
2220
|
+
"""Override Document
|
|
2221
|
+
|
|
2222
|
+
Override an existing document with a newly uploaded file. * we will not perform in-place override, we will delete the existing file and add the new one ! file_id will be preserved in the new file
|
|
2223
|
+
|
|
2224
|
+
:param username: (required)
|
|
2225
|
+
:type username: str
|
|
2226
|
+
:param dataset: (required)
|
|
2227
|
+
:type dataset: str
|
|
2228
|
+
:param file_id: (required)
|
|
2229
|
+
:type file_id: str
|
|
2230
|
+
:param file: (required)
|
|
2231
|
+
:type file: List[bytearray]
|
|
2232
|
+
:param connector_id:
|
|
2233
|
+
:type connector_id: int
|
|
2234
|
+
:param conversation_id:
|
|
2235
|
+
:type conversation_id: str
|
|
2236
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2237
|
+
:type q_answer_api_key: str
|
|
2238
|
+
:param metadata:
|
|
2239
|
+
:type metadata: bytearray
|
|
2240
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2241
|
+
number provided, it will be total request
|
|
2242
|
+
timeout. It can also be a pair (tuple) of
|
|
2243
|
+
(connection, read) timeouts.
|
|
2244
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2245
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2246
|
+
request; this effectively ignores the
|
|
2247
|
+
authentication in the spec for a single request.
|
|
2248
|
+
:type _request_auth: dict, optional
|
|
2249
|
+
:param _content_type: force content-type for the request.
|
|
2250
|
+
:type _content_type: str, Optional
|
|
2251
|
+
:param _headers: set to override the headers for a single
|
|
2252
|
+
request; this effectively ignores the headers
|
|
2253
|
+
in the spec for a single request.
|
|
2254
|
+
:type _headers: dict, optional
|
|
2255
|
+
:param _host_index: set to override the host_index for a single
|
|
2256
|
+
request; this effectively ignores the host_index
|
|
2257
|
+
in the spec for a single request.
|
|
2258
|
+
:type _host_index: int, optional
|
|
2259
|
+
:return: Returns the result object.
|
|
2260
|
+
""" # noqa: E501
|
|
2261
|
+
|
|
2262
|
+
_param = self._override_document_serialize(
|
|
2263
|
+
username=username,
|
|
2264
|
+
dataset=dataset,
|
|
2265
|
+
file_id=file_id,
|
|
2266
|
+
file=file,
|
|
2267
|
+
connector_id=connector_id,
|
|
2268
|
+
conversation_id=conversation_id,
|
|
2269
|
+
q_answer_api_key=q_answer_api_key,
|
|
2270
|
+
metadata=metadata,
|
|
2271
|
+
_request_auth=_request_auth,
|
|
2272
|
+
_content_type=_content_type,
|
|
2273
|
+
_headers=_headers,
|
|
2274
|
+
_host_index=_host_index
|
|
2275
|
+
)
|
|
2276
|
+
|
|
2277
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2278
|
+
'200': "StatusResponse",
|
|
2279
|
+
'422': "HTTPValidationError",
|
|
2280
|
+
}
|
|
2281
|
+
response_data = self.api_client.call_api(
|
|
2282
|
+
*_param,
|
|
2283
|
+
_request_timeout=_request_timeout
|
|
2284
|
+
)
|
|
2285
|
+
return response_data.response
|
|
2286
|
+
|
|
2287
|
+
|
|
2288
|
+
def _override_document_serialize(
|
|
2289
|
+
self,
|
|
2290
|
+
username,
|
|
2291
|
+
dataset,
|
|
2292
|
+
file_id,
|
|
2293
|
+
file,
|
|
2294
|
+
connector_id,
|
|
2295
|
+
conversation_id,
|
|
2296
|
+
q_answer_api_key,
|
|
2297
|
+
metadata,
|
|
2298
|
+
_request_auth,
|
|
2299
|
+
_content_type,
|
|
2300
|
+
_headers,
|
|
2301
|
+
_host_index,
|
|
2302
|
+
) -> RequestSerialized:
|
|
2303
|
+
|
|
2304
|
+
_host = None
|
|
2305
|
+
|
|
2306
|
+
_collection_formats: Dict[str, str] = {
|
|
2307
|
+
'file': 'csv',
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
_path_params: Dict[str, str] = {}
|
|
2311
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2312
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2313
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2314
|
+
_files: Dict[
|
|
2315
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2316
|
+
] = {}
|
|
2317
|
+
_body_params: Optional[bytes] = None
|
|
2318
|
+
|
|
2319
|
+
# process the path parameters
|
|
2320
|
+
# process the query parameters
|
|
2321
|
+
if username is not None:
|
|
2322
|
+
|
|
2323
|
+
_query_params.append(('username', username))
|
|
2324
|
+
|
|
2325
|
+
if dataset is not None:
|
|
2326
|
+
|
|
2327
|
+
_query_params.append(('dataset', dataset))
|
|
2328
|
+
|
|
2329
|
+
if connector_id is not None:
|
|
2330
|
+
|
|
2331
|
+
_query_params.append(('connector_id', connector_id))
|
|
2332
|
+
|
|
2333
|
+
if file_id is not None:
|
|
2334
|
+
|
|
2335
|
+
_query_params.append(('file_id', file_id))
|
|
2336
|
+
|
|
2337
|
+
if conversation_id is not None:
|
|
2338
|
+
|
|
2339
|
+
_query_params.append(('conversationId', conversation_id))
|
|
2340
|
+
|
|
2341
|
+
# process the header parameters
|
|
2342
|
+
if q_answer_api_key is not None:
|
|
2343
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2344
|
+
# process the form parameters
|
|
2345
|
+
if file is not None:
|
|
2346
|
+
_files['file'] = file
|
|
2347
|
+
if metadata is not None:
|
|
2348
|
+
_files['metadata'] = metadata
|
|
2349
|
+
# process the body parameter
|
|
2350
|
+
|
|
2351
|
+
|
|
2352
|
+
# set the HTTP header `Accept`
|
|
2353
|
+
if 'Accept' not in _header_params:
|
|
2354
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2355
|
+
[
|
|
2356
|
+
'application/json'
|
|
2357
|
+
]
|
|
2358
|
+
)
|
|
2359
|
+
|
|
2360
|
+
# set the HTTP header `Content-Type`
|
|
2361
|
+
if _content_type:
|
|
2362
|
+
_header_params['Content-Type'] = _content_type
|
|
2363
|
+
else:
|
|
2364
|
+
_default_content_type = (
|
|
2365
|
+
self.api_client.select_header_content_type(
|
|
2366
|
+
[
|
|
2367
|
+
'multipart/form-data'
|
|
2368
|
+
]
|
|
2369
|
+
)
|
|
2370
|
+
)
|
|
2371
|
+
if _default_content_type is not None:
|
|
2372
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2373
|
+
|
|
2374
|
+
# authentication setting
|
|
2375
|
+
_auth_settings: List[str] = [
|
|
2376
|
+
'QAnswer-Api-Key',
|
|
2377
|
+
'Bearer token'
|
|
2378
|
+
]
|
|
2379
|
+
|
|
2380
|
+
return self.api_client.param_serialize(
|
|
2381
|
+
method='POST',
|
|
2382
|
+
resource_path='/api/connectors/document/override',
|
|
2383
|
+
path_params=_path_params,
|
|
2384
|
+
query_params=_query_params,
|
|
2385
|
+
header_params=_header_params,
|
|
2386
|
+
body=_body_params,
|
|
2387
|
+
post_params=_form_params,
|
|
2388
|
+
files=_files,
|
|
2389
|
+
auth_settings=_auth_settings,
|
|
2390
|
+
collection_formats=_collection_formats,
|
|
2391
|
+
_host=_host,
|
|
2392
|
+
_request_auth=_request_auth
|
|
2393
|
+
)
|
|
2394
|
+
|
|
2395
|
+
|
|
2396
|
+
|
|
2397
|
+
|
|
2398
|
+
@validate_call
|
|
2399
|
+
def update_document_parsing_settings(
|
|
2400
|
+
self,
|
|
2401
|
+
document_parsing_task_settings_update_payload: DocumentParsingTaskSettingsUpdatePayload,
|
|
2402
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2403
|
+
_request_timeout: Union[
|
|
2404
|
+
None,
|
|
2405
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2406
|
+
Tuple[
|
|
2407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2408
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2409
|
+
]
|
|
2410
|
+
] = None,
|
|
2411
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2412
|
+
_content_type: Optional[StrictStr] = None,
|
|
2413
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2414
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2415
|
+
) -> DocumentParsingTaskSettings:
|
|
2416
|
+
"""Update Document Parsing Settings
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
:param document_parsing_task_settings_update_payload: (required)
|
|
2420
|
+
:type document_parsing_task_settings_update_payload: DocumentParsingTaskSettingsUpdatePayload
|
|
2421
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2422
|
+
:type q_answer_api_key: str
|
|
2423
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2424
|
+
number provided, it will be total request
|
|
2425
|
+
timeout. It can also be a pair (tuple) of
|
|
2426
|
+
(connection, read) timeouts.
|
|
2427
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2428
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2429
|
+
request; this effectively ignores the
|
|
2430
|
+
authentication in the spec for a single request.
|
|
2431
|
+
:type _request_auth: dict, optional
|
|
2432
|
+
:param _content_type: force content-type for the request.
|
|
2433
|
+
:type _content_type: str, Optional
|
|
2434
|
+
:param _headers: set to override the headers for a single
|
|
2435
|
+
request; this effectively ignores the headers
|
|
2436
|
+
in the spec for a single request.
|
|
2437
|
+
:type _headers: dict, optional
|
|
2438
|
+
:param _host_index: set to override the host_index for a single
|
|
2439
|
+
request; this effectively ignores the host_index
|
|
2440
|
+
in the spec for a single request.
|
|
2441
|
+
:type _host_index: int, optional
|
|
2442
|
+
:return: Returns the result object.
|
|
2443
|
+
""" # noqa: E501
|
|
2444
|
+
|
|
2445
|
+
_param = self._update_document_parsing_settings_serialize(
|
|
2446
|
+
document_parsing_task_settings_update_payload=document_parsing_task_settings_update_payload,
|
|
2447
|
+
q_answer_api_key=q_answer_api_key,
|
|
2448
|
+
_request_auth=_request_auth,
|
|
2449
|
+
_content_type=_content_type,
|
|
2450
|
+
_headers=_headers,
|
|
2451
|
+
_host_index=_host_index
|
|
2452
|
+
)
|
|
2453
|
+
|
|
2454
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2455
|
+
'200': "DocumentParsingTaskSettings",
|
|
2456
|
+
'422': "HTTPValidationError",
|
|
2457
|
+
}
|
|
2458
|
+
response_data = self.api_client.call_api(
|
|
2459
|
+
*_param,
|
|
2460
|
+
_request_timeout=_request_timeout
|
|
2461
|
+
)
|
|
2462
|
+
response_data.read()
|
|
2463
|
+
return self.api_client.response_deserialize(
|
|
2464
|
+
response_data=response_data,
|
|
2465
|
+
response_types_map=_response_types_map,
|
|
2466
|
+
).data
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
@validate_call
|
|
2470
|
+
def update_document_parsing_settings_with_http_info(
|
|
2471
|
+
self,
|
|
2472
|
+
document_parsing_task_settings_update_payload: DocumentParsingTaskSettingsUpdatePayload,
|
|
2473
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2474
|
+
_request_timeout: Union[
|
|
2475
|
+
None,
|
|
2476
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2477
|
+
Tuple[
|
|
2478
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2479
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2480
|
+
]
|
|
2481
|
+
] = None,
|
|
2482
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2483
|
+
_content_type: Optional[StrictStr] = None,
|
|
2484
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2485
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2486
|
+
) -> ApiResponse[DocumentParsingTaskSettings]:
|
|
2487
|
+
"""Update Document Parsing Settings
|
|
2488
|
+
|
|
2489
|
+
|
|
2490
|
+
:param document_parsing_task_settings_update_payload: (required)
|
|
2491
|
+
:type document_parsing_task_settings_update_payload: DocumentParsingTaskSettingsUpdatePayload
|
|
2492
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2493
|
+
:type q_answer_api_key: str
|
|
2494
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2495
|
+
number provided, it will be total request
|
|
2496
|
+
timeout. It can also be a pair (tuple) of
|
|
2497
|
+
(connection, read) timeouts.
|
|
2498
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2499
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2500
|
+
request; this effectively ignores the
|
|
2501
|
+
authentication in the spec for a single request.
|
|
2502
|
+
:type _request_auth: dict, optional
|
|
2503
|
+
:param _content_type: force content-type for the request.
|
|
2504
|
+
:type _content_type: str, Optional
|
|
2505
|
+
:param _headers: set to override the headers for a single
|
|
2506
|
+
request; this effectively ignores the headers
|
|
2507
|
+
in the spec for a single request.
|
|
2508
|
+
:type _headers: dict, optional
|
|
2509
|
+
:param _host_index: set to override the host_index for a single
|
|
2510
|
+
request; this effectively ignores the host_index
|
|
2511
|
+
in the spec for a single request.
|
|
2512
|
+
:type _host_index: int, optional
|
|
2513
|
+
:return: Returns the result object.
|
|
2514
|
+
""" # noqa: E501
|
|
2515
|
+
|
|
2516
|
+
_param = self._update_document_parsing_settings_serialize(
|
|
2517
|
+
document_parsing_task_settings_update_payload=document_parsing_task_settings_update_payload,
|
|
2518
|
+
q_answer_api_key=q_answer_api_key,
|
|
2519
|
+
_request_auth=_request_auth,
|
|
2520
|
+
_content_type=_content_type,
|
|
2521
|
+
_headers=_headers,
|
|
2522
|
+
_host_index=_host_index
|
|
2523
|
+
)
|
|
2524
|
+
|
|
2525
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2526
|
+
'200': "DocumentParsingTaskSettings",
|
|
2527
|
+
'422': "HTTPValidationError",
|
|
2528
|
+
}
|
|
2529
|
+
response_data = self.api_client.call_api(
|
|
2530
|
+
*_param,
|
|
2531
|
+
_request_timeout=_request_timeout
|
|
2532
|
+
)
|
|
2533
|
+
response_data.read()
|
|
2534
|
+
return self.api_client.response_deserialize(
|
|
2535
|
+
response_data=response_data,
|
|
2536
|
+
response_types_map=_response_types_map,
|
|
2537
|
+
)
|
|
2538
|
+
|
|
2539
|
+
|
|
2540
|
+
@validate_call
|
|
2541
|
+
def update_document_parsing_settings_without_preload_content(
|
|
2542
|
+
self,
|
|
2543
|
+
document_parsing_task_settings_update_payload: DocumentParsingTaskSettingsUpdatePayload,
|
|
2544
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
2545
|
+
_request_timeout: Union[
|
|
2546
|
+
None,
|
|
2547
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2548
|
+
Tuple[
|
|
2549
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2550
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2551
|
+
]
|
|
2552
|
+
] = None,
|
|
2553
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2554
|
+
_content_type: Optional[StrictStr] = None,
|
|
2555
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2556
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2557
|
+
) -> RESTResponseType:
|
|
2558
|
+
"""Update Document Parsing Settings
|
|
2559
|
+
|
|
2560
|
+
|
|
2561
|
+
:param document_parsing_task_settings_update_payload: (required)
|
|
2562
|
+
:type document_parsing_task_settings_update_payload: DocumentParsingTaskSettingsUpdatePayload
|
|
2563
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
2564
|
+
:type q_answer_api_key: str
|
|
2565
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2566
|
+
number provided, it will be total request
|
|
2567
|
+
timeout. It can also be a pair (tuple) of
|
|
2568
|
+
(connection, read) timeouts.
|
|
2569
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2570
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2571
|
+
request; this effectively ignores the
|
|
2572
|
+
authentication in the spec for a single request.
|
|
2573
|
+
:type _request_auth: dict, optional
|
|
2574
|
+
:param _content_type: force content-type for the request.
|
|
2575
|
+
:type _content_type: str, Optional
|
|
2576
|
+
:param _headers: set to override the headers for a single
|
|
2577
|
+
request; this effectively ignores the headers
|
|
2578
|
+
in the spec for a single request.
|
|
2579
|
+
:type _headers: dict, optional
|
|
2580
|
+
:param _host_index: set to override the host_index for a single
|
|
2581
|
+
request; this effectively ignores the host_index
|
|
2582
|
+
in the spec for a single request.
|
|
2583
|
+
:type _host_index: int, optional
|
|
2584
|
+
:return: Returns the result object.
|
|
2585
|
+
""" # noqa: E501
|
|
2586
|
+
|
|
2587
|
+
_param = self._update_document_parsing_settings_serialize(
|
|
2588
|
+
document_parsing_task_settings_update_payload=document_parsing_task_settings_update_payload,
|
|
2589
|
+
q_answer_api_key=q_answer_api_key,
|
|
2590
|
+
_request_auth=_request_auth,
|
|
2591
|
+
_content_type=_content_type,
|
|
2592
|
+
_headers=_headers,
|
|
2593
|
+
_host_index=_host_index
|
|
2594
|
+
)
|
|
2595
|
+
|
|
2596
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2597
|
+
'200': "DocumentParsingTaskSettings",
|
|
2598
|
+
'422': "HTTPValidationError",
|
|
2599
|
+
}
|
|
2600
|
+
response_data = self.api_client.call_api(
|
|
2601
|
+
*_param,
|
|
2602
|
+
_request_timeout=_request_timeout
|
|
2603
|
+
)
|
|
2604
|
+
return response_data.response
|
|
2605
|
+
|
|
2606
|
+
|
|
2607
|
+
def _update_document_parsing_settings_serialize(
|
|
2608
|
+
self,
|
|
2609
|
+
document_parsing_task_settings_update_payload,
|
|
2610
|
+
q_answer_api_key,
|
|
2611
|
+
_request_auth,
|
|
2612
|
+
_content_type,
|
|
2613
|
+
_headers,
|
|
2614
|
+
_host_index,
|
|
2615
|
+
) -> RequestSerialized:
|
|
2616
|
+
|
|
2617
|
+
_host = None
|
|
2618
|
+
|
|
2619
|
+
_collection_formats: Dict[str, str] = {
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
_path_params: Dict[str, str] = {}
|
|
2623
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2624
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2625
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2626
|
+
_files: Dict[
|
|
2627
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2628
|
+
] = {}
|
|
2629
|
+
_body_params: Optional[bytes] = None
|
|
2630
|
+
|
|
2631
|
+
# process the path parameters
|
|
2632
|
+
# process the query parameters
|
|
2633
|
+
# process the header parameters
|
|
2634
|
+
if q_answer_api_key is not None:
|
|
2635
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2636
|
+
# process the form parameters
|
|
2637
|
+
# process the body parameter
|
|
2638
|
+
if document_parsing_task_settings_update_payload is not None:
|
|
2639
|
+
_body_params = document_parsing_task_settings_update_payload
|
|
2640
|
+
|
|
2641
|
+
|
|
2642
|
+
# set the HTTP header `Accept`
|
|
2643
|
+
if 'Accept' not in _header_params:
|
|
2644
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2645
|
+
[
|
|
2646
|
+
'application/json'
|
|
2647
|
+
]
|
|
2648
|
+
)
|
|
2649
|
+
|
|
2650
|
+
# set the HTTP header `Content-Type`
|
|
2651
|
+
if _content_type:
|
|
2652
|
+
_header_params['Content-Type'] = _content_type
|
|
2653
|
+
else:
|
|
2654
|
+
_default_content_type = (
|
|
2655
|
+
self.api_client.select_header_content_type(
|
|
2656
|
+
[
|
|
2657
|
+
'application/json'
|
|
2658
|
+
]
|
|
2659
|
+
)
|
|
2660
|
+
)
|
|
2661
|
+
if _default_content_type is not None:
|
|
2662
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2663
|
+
|
|
2664
|
+
# authentication setting
|
|
2665
|
+
_auth_settings: List[str] = [
|
|
2666
|
+
'QAnswer-Api-Key',
|
|
2667
|
+
'Bearer token'
|
|
2668
|
+
]
|
|
2669
|
+
|
|
2670
|
+
return self.api_client.param_serialize(
|
|
2671
|
+
method='PUT',
|
|
2672
|
+
resource_path='/api/connectors/document/document-parsing/settings',
|
|
2673
|
+
path_params=_path_params,
|
|
2674
|
+
query_params=_query_params,
|
|
2675
|
+
header_params=_header_params,
|
|
2676
|
+
body=_body_params,
|
|
2677
|
+
post_params=_form_params,
|
|
2678
|
+
files=_files,
|
|
2679
|
+
auth_settings=_auth_settings,
|
|
2680
|
+
collection_formats=_collection_formats,
|
|
2681
|
+
_host=_host,
|
|
2682
|
+
_request_auth=_request_auth
|
|
2683
|
+
)
|
|
2684
|
+
|
|
2685
|
+
|