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,2079 @@
|
|
|
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, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, List, Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from qanswer_sdk.models.assistant_message_stop import AssistantMessageStop
|
|
23
|
+
from qanswer_sdk.models.available_aggregation import AvailableAggregation
|
|
24
|
+
from qanswer_sdk.models.chat_task_settings import ChatTaskSettings
|
|
25
|
+
from qanswer_sdk.models.chat_task_settings_update_payload import ChatTaskSettingsUpdatePayload
|
|
26
|
+
from qanswer_sdk.models.enable_enhanced_context_payload import EnableEnhancedContextPayload
|
|
27
|
+
from qanswer_sdk.models.enable_enhanced_context_response import EnableEnhancedContextResponse
|
|
28
|
+
from qanswer_sdk.models.llm_endpoint import LLMEndpoint
|
|
29
|
+
from qanswer_sdk.models.rag_payload import RAGPayload
|
|
30
|
+
from qanswer_sdk.models.rag_response import RAGResponse
|
|
31
|
+
|
|
32
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
|
33
|
+
from qanswer_sdk.api_response import ApiResponse
|
|
34
|
+
from qanswer_sdk.rest import RESTResponseType
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class TaskChatApi:
|
|
38
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
39
|
+
Ref: https://openapi-generator.tech
|
|
40
|
+
|
|
41
|
+
Do not edit the class manually.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
def __init__(self, api_client=None) -> None:
|
|
45
|
+
if api_client is None:
|
|
46
|
+
api_client = ApiClient.get_default()
|
|
47
|
+
self.api_client = api_client
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@validate_call
|
|
51
|
+
def dummy_llm_endpoint(
|
|
52
|
+
self,
|
|
53
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
54
|
+
_request_timeout: Union[
|
|
55
|
+
None,
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Tuple[
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
60
|
+
]
|
|
61
|
+
] = None,
|
|
62
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_content_type: Optional[StrictStr] = None,
|
|
64
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
65
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
66
|
+
) -> LLMEndpoint:
|
|
67
|
+
"""Dummy Llm Endpoint
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
71
|
+
:type q_answer_api_key: str
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._dummy_llm_endpoint_serialize(
|
|
95
|
+
q_answer_api_key=q_answer_api_key,
|
|
96
|
+
_request_auth=_request_auth,
|
|
97
|
+
_content_type=_content_type,
|
|
98
|
+
_headers=_headers,
|
|
99
|
+
_host_index=_host_index
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
103
|
+
'200': "LLMEndpoint",
|
|
104
|
+
'422': "HTTPValidationError",
|
|
105
|
+
}
|
|
106
|
+
response_data = self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
def dummy_llm_endpoint_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
121
|
+
_request_timeout: Union[
|
|
122
|
+
None,
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Tuple[
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
127
|
+
]
|
|
128
|
+
] = None,
|
|
129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_content_type: Optional[StrictStr] = None,
|
|
131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
+
) -> ApiResponse[LLMEndpoint]:
|
|
134
|
+
"""Dummy Llm Endpoint
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
138
|
+
:type q_answer_api_key: str
|
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
140
|
+
number provided, it will be total request
|
|
141
|
+
timeout. It can also be a pair (tuple) of
|
|
142
|
+
(connection, read) timeouts.
|
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
145
|
+
request; this effectively ignores the
|
|
146
|
+
authentication in the spec for a single request.
|
|
147
|
+
:type _request_auth: dict, optional
|
|
148
|
+
:param _content_type: force content-type for the request.
|
|
149
|
+
:type _content_type: str, Optional
|
|
150
|
+
:param _headers: set to override the headers for a single
|
|
151
|
+
request; this effectively ignores the headers
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _headers: dict, optional
|
|
154
|
+
:param _host_index: set to override the host_index for a single
|
|
155
|
+
request; this effectively ignores the host_index
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _host_index: int, optional
|
|
158
|
+
:return: Returns the result object.
|
|
159
|
+
""" # noqa: E501
|
|
160
|
+
|
|
161
|
+
_param = self._dummy_llm_endpoint_serialize(
|
|
162
|
+
q_answer_api_key=q_answer_api_key,
|
|
163
|
+
_request_auth=_request_auth,
|
|
164
|
+
_content_type=_content_type,
|
|
165
|
+
_headers=_headers,
|
|
166
|
+
_host_index=_host_index
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
170
|
+
'200': "LLMEndpoint",
|
|
171
|
+
'422': "HTTPValidationError",
|
|
172
|
+
}
|
|
173
|
+
response_data = self.api_client.call_api(
|
|
174
|
+
*_param,
|
|
175
|
+
_request_timeout=_request_timeout
|
|
176
|
+
)
|
|
177
|
+
response_data.read()
|
|
178
|
+
return self.api_client.response_deserialize(
|
|
179
|
+
response_data=response_data,
|
|
180
|
+
response_types_map=_response_types_map,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
@validate_call
|
|
185
|
+
def dummy_llm_endpoint_without_preload_content(
|
|
186
|
+
self,
|
|
187
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
188
|
+
_request_timeout: Union[
|
|
189
|
+
None,
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
191
|
+
Tuple[
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
194
|
+
]
|
|
195
|
+
] = None,
|
|
196
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
197
|
+
_content_type: Optional[StrictStr] = None,
|
|
198
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
199
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
200
|
+
) -> RESTResponseType:
|
|
201
|
+
"""Dummy Llm Endpoint
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
205
|
+
:type q_answer_api_key: str
|
|
206
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
207
|
+
number provided, it will be total request
|
|
208
|
+
timeout. It can also be a pair (tuple) of
|
|
209
|
+
(connection, read) timeouts.
|
|
210
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
211
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
212
|
+
request; this effectively ignores the
|
|
213
|
+
authentication in the spec for a single request.
|
|
214
|
+
:type _request_auth: dict, optional
|
|
215
|
+
:param _content_type: force content-type for the request.
|
|
216
|
+
:type _content_type: str, Optional
|
|
217
|
+
:param _headers: set to override the headers for a single
|
|
218
|
+
request; this effectively ignores the headers
|
|
219
|
+
in the spec for a single request.
|
|
220
|
+
:type _headers: dict, optional
|
|
221
|
+
:param _host_index: set to override the host_index for a single
|
|
222
|
+
request; this effectively ignores the host_index
|
|
223
|
+
in the spec for a single request.
|
|
224
|
+
:type _host_index: int, optional
|
|
225
|
+
:return: Returns the result object.
|
|
226
|
+
""" # noqa: E501
|
|
227
|
+
|
|
228
|
+
_param = self._dummy_llm_endpoint_serialize(
|
|
229
|
+
q_answer_api_key=q_answer_api_key,
|
|
230
|
+
_request_auth=_request_auth,
|
|
231
|
+
_content_type=_content_type,
|
|
232
|
+
_headers=_headers,
|
|
233
|
+
_host_index=_host_index
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
237
|
+
'200': "LLMEndpoint",
|
|
238
|
+
'422': "HTTPValidationError",
|
|
239
|
+
}
|
|
240
|
+
response_data = self.api_client.call_api(
|
|
241
|
+
*_param,
|
|
242
|
+
_request_timeout=_request_timeout
|
|
243
|
+
)
|
|
244
|
+
return response_data.response
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
def _dummy_llm_endpoint_serialize(
|
|
248
|
+
self,
|
|
249
|
+
q_answer_api_key,
|
|
250
|
+
_request_auth,
|
|
251
|
+
_content_type,
|
|
252
|
+
_headers,
|
|
253
|
+
_host_index,
|
|
254
|
+
) -> RequestSerialized:
|
|
255
|
+
|
|
256
|
+
_host = None
|
|
257
|
+
|
|
258
|
+
_collection_formats: Dict[str, str] = {
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
_path_params: Dict[str, str] = {}
|
|
262
|
+
_query_params: List[Tuple[str, str]] = []
|
|
263
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
264
|
+
_form_params: List[Tuple[str, str]] = []
|
|
265
|
+
_files: Dict[
|
|
266
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
267
|
+
] = {}
|
|
268
|
+
_body_params: Optional[bytes] = None
|
|
269
|
+
|
|
270
|
+
# process the path parameters
|
|
271
|
+
# process the query parameters
|
|
272
|
+
# process the header parameters
|
|
273
|
+
if q_answer_api_key is not None:
|
|
274
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
275
|
+
# process the form parameters
|
|
276
|
+
# process the body parameter
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
# set the HTTP header `Accept`
|
|
280
|
+
if 'Accept' not in _header_params:
|
|
281
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
282
|
+
[
|
|
283
|
+
'application/json'
|
|
284
|
+
]
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
# authentication setting
|
|
289
|
+
_auth_settings: List[str] = [
|
|
290
|
+
]
|
|
291
|
+
|
|
292
|
+
return self.api_client.param_serialize(
|
|
293
|
+
method='GET',
|
|
294
|
+
resource_path='/api/tasks/chat/dummy-llm-endpoint',
|
|
295
|
+
path_params=_path_params,
|
|
296
|
+
query_params=_query_params,
|
|
297
|
+
header_params=_header_params,
|
|
298
|
+
body=_body_params,
|
|
299
|
+
post_params=_form_params,
|
|
300
|
+
files=_files,
|
|
301
|
+
auth_settings=_auth_settings,
|
|
302
|
+
collection_formats=_collection_formats,
|
|
303
|
+
_host=_host,
|
|
304
|
+
_request_auth=_request_auth
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
@validate_call
|
|
311
|
+
def get_chat_available_aggregations(
|
|
312
|
+
self,
|
|
313
|
+
username: Annotated[StrictStr, Field(description="Username")],
|
|
314
|
+
dataset: Annotated[StrictStr, Field(description="Dataset")],
|
|
315
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
316
|
+
_request_timeout: Union[
|
|
317
|
+
None,
|
|
318
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
319
|
+
Tuple[
|
|
320
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
321
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
322
|
+
]
|
|
323
|
+
] = None,
|
|
324
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
325
|
+
_content_type: Optional[StrictStr] = None,
|
|
326
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
327
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
328
|
+
) -> List[AvailableAggregation]:
|
|
329
|
+
"""Get Chat Available Aggregations
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
:param username: Username (required)
|
|
333
|
+
:type username: str
|
|
334
|
+
:param dataset: Dataset (required)
|
|
335
|
+
:type dataset: str
|
|
336
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
337
|
+
:type q_answer_api_key: str
|
|
338
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
339
|
+
number provided, it will be total request
|
|
340
|
+
timeout. It can also be a pair (tuple) of
|
|
341
|
+
(connection, read) timeouts.
|
|
342
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
343
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
344
|
+
request; this effectively ignores the
|
|
345
|
+
authentication in the spec for a single request.
|
|
346
|
+
:type _request_auth: dict, optional
|
|
347
|
+
:param _content_type: force content-type for the request.
|
|
348
|
+
:type _content_type: str, Optional
|
|
349
|
+
:param _headers: set to override the headers for a single
|
|
350
|
+
request; this effectively ignores the headers
|
|
351
|
+
in the spec for a single request.
|
|
352
|
+
:type _headers: dict, optional
|
|
353
|
+
:param _host_index: set to override the host_index for a single
|
|
354
|
+
request; this effectively ignores the host_index
|
|
355
|
+
in the spec for a single request.
|
|
356
|
+
:type _host_index: int, optional
|
|
357
|
+
:return: Returns the result object.
|
|
358
|
+
""" # noqa: E501
|
|
359
|
+
|
|
360
|
+
_param = self._get_chat_available_aggregations_serialize(
|
|
361
|
+
username=username,
|
|
362
|
+
dataset=dataset,
|
|
363
|
+
q_answer_api_key=q_answer_api_key,
|
|
364
|
+
_request_auth=_request_auth,
|
|
365
|
+
_content_type=_content_type,
|
|
366
|
+
_headers=_headers,
|
|
367
|
+
_host_index=_host_index
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
371
|
+
'200': "List[AvailableAggregation]",
|
|
372
|
+
'422': "HTTPValidationError",
|
|
373
|
+
}
|
|
374
|
+
response_data = self.api_client.call_api(
|
|
375
|
+
*_param,
|
|
376
|
+
_request_timeout=_request_timeout
|
|
377
|
+
)
|
|
378
|
+
response_data.read()
|
|
379
|
+
return self.api_client.response_deserialize(
|
|
380
|
+
response_data=response_data,
|
|
381
|
+
response_types_map=_response_types_map,
|
|
382
|
+
).data
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
@validate_call
|
|
386
|
+
def get_chat_available_aggregations_with_http_info(
|
|
387
|
+
self,
|
|
388
|
+
username: Annotated[StrictStr, Field(description="Username")],
|
|
389
|
+
dataset: Annotated[StrictStr, Field(description="Dataset")],
|
|
390
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
391
|
+
_request_timeout: Union[
|
|
392
|
+
None,
|
|
393
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
394
|
+
Tuple[
|
|
395
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
396
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
397
|
+
]
|
|
398
|
+
] = None,
|
|
399
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
400
|
+
_content_type: Optional[StrictStr] = None,
|
|
401
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
402
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
403
|
+
) -> ApiResponse[List[AvailableAggregation]]:
|
|
404
|
+
"""Get Chat Available Aggregations
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
:param username: Username (required)
|
|
408
|
+
:type username: str
|
|
409
|
+
:param dataset: Dataset (required)
|
|
410
|
+
:type dataset: str
|
|
411
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
412
|
+
:type q_answer_api_key: str
|
|
413
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
414
|
+
number provided, it will be total request
|
|
415
|
+
timeout. It can also be a pair (tuple) of
|
|
416
|
+
(connection, read) timeouts.
|
|
417
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
418
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
419
|
+
request; this effectively ignores the
|
|
420
|
+
authentication in the spec for a single request.
|
|
421
|
+
:type _request_auth: dict, optional
|
|
422
|
+
:param _content_type: force content-type for the request.
|
|
423
|
+
:type _content_type: str, Optional
|
|
424
|
+
:param _headers: set to override the headers for a single
|
|
425
|
+
request; this effectively ignores the headers
|
|
426
|
+
in the spec for a single request.
|
|
427
|
+
:type _headers: dict, optional
|
|
428
|
+
:param _host_index: set to override the host_index for a single
|
|
429
|
+
request; this effectively ignores the host_index
|
|
430
|
+
in the spec for a single request.
|
|
431
|
+
:type _host_index: int, optional
|
|
432
|
+
:return: Returns the result object.
|
|
433
|
+
""" # noqa: E501
|
|
434
|
+
|
|
435
|
+
_param = self._get_chat_available_aggregations_serialize(
|
|
436
|
+
username=username,
|
|
437
|
+
dataset=dataset,
|
|
438
|
+
q_answer_api_key=q_answer_api_key,
|
|
439
|
+
_request_auth=_request_auth,
|
|
440
|
+
_content_type=_content_type,
|
|
441
|
+
_headers=_headers,
|
|
442
|
+
_host_index=_host_index
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
446
|
+
'200': "List[AvailableAggregation]",
|
|
447
|
+
'422': "HTTPValidationError",
|
|
448
|
+
}
|
|
449
|
+
response_data = self.api_client.call_api(
|
|
450
|
+
*_param,
|
|
451
|
+
_request_timeout=_request_timeout
|
|
452
|
+
)
|
|
453
|
+
response_data.read()
|
|
454
|
+
return self.api_client.response_deserialize(
|
|
455
|
+
response_data=response_data,
|
|
456
|
+
response_types_map=_response_types_map,
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
@validate_call
|
|
461
|
+
def get_chat_available_aggregations_without_preload_content(
|
|
462
|
+
self,
|
|
463
|
+
username: Annotated[StrictStr, Field(description="Username")],
|
|
464
|
+
dataset: Annotated[StrictStr, Field(description="Dataset")],
|
|
465
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
466
|
+
_request_timeout: Union[
|
|
467
|
+
None,
|
|
468
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
469
|
+
Tuple[
|
|
470
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
471
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
472
|
+
]
|
|
473
|
+
] = None,
|
|
474
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
475
|
+
_content_type: Optional[StrictStr] = None,
|
|
476
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
477
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
478
|
+
) -> RESTResponseType:
|
|
479
|
+
"""Get Chat Available Aggregations
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
:param username: Username (required)
|
|
483
|
+
:type username: str
|
|
484
|
+
:param dataset: Dataset (required)
|
|
485
|
+
:type dataset: str
|
|
486
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
487
|
+
:type q_answer_api_key: str
|
|
488
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
489
|
+
number provided, it will be total request
|
|
490
|
+
timeout. It can also be a pair (tuple) of
|
|
491
|
+
(connection, read) timeouts.
|
|
492
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
493
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
494
|
+
request; this effectively ignores the
|
|
495
|
+
authentication in the spec for a single request.
|
|
496
|
+
:type _request_auth: dict, optional
|
|
497
|
+
:param _content_type: force content-type for the request.
|
|
498
|
+
:type _content_type: str, Optional
|
|
499
|
+
:param _headers: set to override the headers for a single
|
|
500
|
+
request; this effectively ignores the headers
|
|
501
|
+
in the spec for a single request.
|
|
502
|
+
:type _headers: dict, optional
|
|
503
|
+
:param _host_index: set to override the host_index for a single
|
|
504
|
+
request; this effectively ignores the host_index
|
|
505
|
+
in the spec for a single request.
|
|
506
|
+
:type _host_index: int, optional
|
|
507
|
+
:return: Returns the result object.
|
|
508
|
+
""" # noqa: E501
|
|
509
|
+
|
|
510
|
+
_param = self._get_chat_available_aggregations_serialize(
|
|
511
|
+
username=username,
|
|
512
|
+
dataset=dataset,
|
|
513
|
+
q_answer_api_key=q_answer_api_key,
|
|
514
|
+
_request_auth=_request_auth,
|
|
515
|
+
_content_type=_content_type,
|
|
516
|
+
_headers=_headers,
|
|
517
|
+
_host_index=_host_index
|
|
518
|
+
)
|
|
519
|
+
|
|
520
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
521
|
+
'200': "List[AvailableAggregation]",
|
|
522
|
+
'422': "HTTPValidationError",
|
|
523
|
+
}
|
|
524
|
+
response_data = self.api_client.call_api(
|
|
525
|
+
*_param,
|
|
526
|
+
_request_timeout=_request_timeout
|
|
527
|
+
)
|
|
528
|
+
return response_data.response
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
def _get_chat_available_aggregations_serialize(
|
|
532
|
+
self,
|
|
533
|
+
username,
|
|
534
|
+
dataset,
|
|
535
|
+
q_answer_api_key,
|
|
536
|
+
_request_auth,
|
|
537
|
+
_content_type,
|
|
538
|
+
_headers,
|
|
539
|
+
_host_index,
|
|
540
|
+
) -> RequestSerialized:
|
|
541
|
+
|
|
542
|
+
_host = None
|
|
543
|
+
|
|
544
|
+
_collection_formats: Dict[str, str] = {
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
_path_params: Dict[str, str] = {}
|
|
548
|
+
_query_params: List[Tuple[str, str]] = []
|
|
549
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
550
|
+
_form_params: List[Tuple[str, str]] = []
|
|
551
|
+
_files: Dict[
|
|
552
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
553
|
+
] = {}
|
|
554
|
+
_body_params: Optional[bytes] = None
|
|
555
|
+
|
|
556
|
+
# process the path parameters
|
|
557
|
+
# process the query parameters
|
|
558
|
+
if username is not None:
|
|
559
|
+
|
|
560
|
+
_query_params.append(('username', username))
|
|
561
|
+
|
|
562
|
+
if dataset is not None:
|
|
563
|
+
|
|
564
|
+
_query_params.append(('dataset', dataset))
|
|
565
|
+
|
|
566
|
+
# process the header parameters
|
|
567
|
+
if q_answer_api_key is not None:
|
|
568
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
569
|
+
# process the form parameters
|
|
570
|
+
# process the body parameter
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
# set the HTTP header `Accept`
|
|
574
|
+
if 'Accept' not in _header_params:
|
|
575
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
576
|
+
[
|
|
577
|
+
'application/json'
|
|
578
|
+
]
|
|
579
|
+
)
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
# authentication setting
|
|
583
|
+
_auth_settings: List[str] = [
|
|
584
|
+
'QAnswer-Api-Key',
|
|
585
|
+
'Bearer token'
|
|
586
|
+
]
|
|
587
|
+
|
|
588
|
+
return self.api_client.param_serialize(
|
|
589
|
+
method='GET',
|
|
590
|
+
resource_path='/api/tasks/chat/available-aggregations',
|
|
591
|
+
path_params=_path_params,
|
|
592
|
+
query_params=_query_params,
|
|
593
|
+
header_params=_header_params,
|
|
594
|
+
body=_body_params,
|
|
595
|
+
post_params=_form_params,
|
|
596
|
+
files=_files,
|
|
597
|
+
auth_settings=_auth_settings,
|
|
598
|
+
collection_formats=_collection_formats,
|
|
599
|
+
_host=_host,
|
|
600
|
+
_request_auth=_request_auth
|
|
601
|
+
)
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
@validate_call
|
|
607
|
+
def read_chat_task_settings(
|
|
608
|
+
self,
|
|
609
|
+
username: StrictStr,
|
|
610
|
+
dataset: StrictStr,
|
|
611
|
+
organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
|
|
612
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
613
|
+
_request_timeout: Union[
|
|
614
|
+
None,
|
|
615
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
616
|
+
Tuple[
|
|
617
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
618
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
619
|
+
]
|
|
620
|
+
] = None,
|
|
621
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
622
|
+
_content_type: Optional[StrictStr] = None,
|
|
623
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
624
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
625
|
+
) -> ChatTaskSettings:
|
|
626
|
+
"""Read Chat Task Settings
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
:param username: (required)
|
|
630
|
+
:type username: str
|
|
631
|
+
:param dataset: (required)
|
|
632
|
+
:type dataset: str
|
|
633
|
+
:param organization_id: organization identifier
|
|
634
|
+
:type organization_id: int
|
|
635
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
636
|
+
:type q_answer_api_key: str
|
|
637
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
638
|
+
number provided, it will be total request
|
|
639
|
+
timeout. It can also be a pair (tuple) of
|
|
640
|
+
(connection, read) timeouts.
|
|
641
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
642
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
643
|
+
request; this effectively ignores the
|
|
644
|
+
authentication in the spec for a single request.
|
|
645
|
+
:type _request_auth: dict, optional
|
|
646
|
+
:param _content_type: force content-type for the request.
|
|
647
|
+
:type _content_type: str, Optional
|
|
648
|
+
:param _headers: set to override the headers for a single
|
|
649
|
+
request; this effectively ignores the headers
|
|
650
|
+
in the spec for a single request.
|
|
651
|
+
:type _headers: dict, optional
|
|
652
|
+
:param _host_index: set to override the host_index for a single
|
|
653
|
+
request; this effectively ignores the host_index
|
|
654
|
+
in the spec for a single request.
|
|
655
|
+
:type _host_index: int, optional
|
|
656
|
+
:return: Returns the result object.
|
|
657
|
+
""" # noqa: E501
|
|
658
|
+
|
|
659
|
+
_param = self._read_chat_task_settings_serialize(
|
|
660
|
+
username=username,
|
|
661
|
+
dataset=dataset,
|
|
662
|
+
organization_id=organization_id,
|
|
663
|
+
q_answer_api_key=q_answer_api_key,
|
|
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': "ChatTaskSettings",
|
|
672
|
+
'422': "HTTPValidationError",
|
|
673
|
+
}
|
|
674
|
+
response_data = self.api_client.call_api(
|
|
675
|
+
*_param,
|
|
676
|
+
_request_timeout=_request_timeout
|
|
677
|
+
)
|
|
678
|
+
response_data.read()
|
|
679
|
+
return self.api_client.response_deserialize(
|
|
680
|
+
response_data=response_data,
|
|
681
|
+
response_types_map=_response_types_map,
|
|
682
|
+
).data
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
@validate_call
|
|
686
|
+
def read_chat_task_settings_with_http_info(
|
|
687
|
+
self,
|
|
688
|
+
username: StrictStr,
|
|
689
|
+
dataset: StrictStr,
|
|
690
|
+
organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
|
|
691
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
692
|
+
_request_timeout: Union[
|
|
693
|
+
None,
|
|
694
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
695
|
+
Tuple[
|
|
696
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
697
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
698
|
+
]
|
|
699
|
+
] = None,
|
|
700
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
701
|
+
_content_type: Optional[StrictStr] = None,
|
|
702
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
703
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
704
|
+
) -> ApiResponse[ChatTaskSettings]:
|
|
705
|
+
"""Read Chat Task Settings
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
:param username: (required)
|
|
709
|
+
:type username: str
|
|
710
|
+
:param dataset: (required)
|
|
711
|
+
:type dataset: str
|
|
712
|
+
:param organization_id: organization identifier
|
|
713
|
+
:type organization_id: int
|
|
714
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
715
|
+
:type q_answer_api_key: str
|
|
716
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
717
|
+
number provided, it will be total request
|
|
718
|
+
timeout. It can also be a pair (tuple) of
|
|
719
|
+
(connection, read) timeouts.
|
|
720
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
721
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
722
|
+
request; this effectively ignores the
|
|
723
|
+
authentication in the spec for a single request.
|
|
724
|
+
:type _request_auth: dict, optional
|
|
725
|
+
:param _content_type: force content-type for the request.
|
|
726
|
+
:type _content_type: str, Optional
|
|
727
|
+
:param _headers: set to override the headers for a single
|
|
728
|
+
request; this effectively ignores the headers
|
|
729
|
+
in the spec for a single request.
|
|
730
|
+
:type _headers: dict, optional
|
|
731
|
+
:param _host_index: set to override the host_index for a single
|
|
732
|
+
request; this effectively ignores the host_index
|
|
733
|
+
in the spec for a single request.
|
|
734
|
+
:type _host_index: int, optional
|
|
735
|
+
:return: Returns the result object.
|
|
736
|
+
""" # noqa: E501
|
|
737
|
+
|
|
738
|
+
_param = self._read_chat_task_settings_serialize(
|
|
739
|
+
username=username,
|
|
740
|
+
dataset=dataset,
|
|
741
|
+
organization_id=organization_id,
|
|
742
|
+
q_answer_api_key=q_answer_api_key,
|
|
743
|
+
_request_auth=_request_auth,
|
|
744
|
+
_content_type=_content_type,
|
|
745
|
+
_headers=_headers,
|
|
746
|
+
_host_index=_host_index
|
|
747
|
+
)
|
|
748
|
+
|
|
749
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
750
|
+
'200': "ChatTaskSettings",
|
|
751
|
+
'422': "HTTPValidationError",
|
|
752
|
+
}
|
|
753
|
+
response_data = self.api_client.call_api(
|
|
754
|
+
*_param,
|
|
755
|
+
_request_timeout=_request_timeout
|
|
756
|
+
)
|
|
757
|
+
response_data.read()
|
|
758
|
+
return self.api_client.response_deserialize(
|
|
759
|
+
response_data=response_data,
|
|
760
|
+
response_types_map=_response_types_map,
|
|
761
|
+
)
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
@validate_call
|
|
765
|
+
def read_chat_task_settings_without_preload_content(
|
|
766
|
+
self,
|
|
767
|
+
username: StrictStr,
|
|
768
|
+
dataset: StrictStr,
|
|
769
|
+
organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
|
|
770
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
771
|
+
_request_timeout: Union[
|
|
772
|
+
None,
|
|
773
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
774
|
+
Tuple[
|
|
775
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
776
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
777
|
+
]
|
|
778
|
+
] = None,
|
|
779
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
780
|
+
_content_type: Optional[StrictStr] = None,
|
|
781
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
782
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
783
|
+
) -> RESTResponseType:
|
|
784
|
+
"""Read Chat Task Settings
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
:param username: (required)
|
|
788
|
+
:type username: str
|
|
789
|
+
:param dataset: (required)
|
|
790
|
+
:type dataset: str
|
|
791
|
+
:param organization_id: organization identifier
|
|
792
|
+
:type organization_id: int
|
|
793
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
794
|
+
:type q_answer_api_key: str
|
|
795
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
796
|
+
number provided, it will be total request
|
|
797
|
+
timeout. It can also be a pair (tuple) of
|
|
798
|
+
(connection, read) timeouts.
|
|
799
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
800
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
801
|
+
request; this effectively ignores the
|
|
802
|
+
authentication in the spec for a single request.
|
|
803
|
+
:type _request_auth: dict, optional
|
|
804
|
+
:param _content_type: force content-type for the request.
|
|
805
|
+
:type _content_type: str, Optional
|
|
806
|
+
:param _headers: set to override the headers for a single
|
|
807
|
+
request; this effectively ignores the headers
|
|
808
|
+
in the spec for a single request.
|
|
809
|
+
:type _headers: dict, optional
|
|
810
|
+
:param _host_index: set to override the host_index for a single
|
|
811
|
+
request; this effectively ignores the host_index
|
|
812
|
+
in the spec for a single request.
|
|
813
|
+
:type _host_index: int, optional
|
|
814
|
+
:return: Returns the result object.
|
|
815
|
+
""" # noqa: E501
|
|
816
|
+
|
|
817
|
+
_param = self._read_chat_task_settings_serialize(
|
|
818
|
+
username=username,
|
|
819
|
+
dataset=dataset,
|
|
820
|
+
organization_id=organization_id,
|
|
821
|
+
q_answer_api_key=q_answer_api_key,
|
|
822
|
+
_request_auth=_request_auth,
|
|
823
|
+
_content_type=_content_type,
|
|
824
|
+
_headers=_headers,
|
|
825
|
+
_host_index=_host_index
|
|
826
|
+
)
|
|
827
|
+
|
|
828
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
829
|
+
'200': "ChatTaskSettings",
|
|
830
|
+
'422': "HTTPValidationError",
|
|
831
|
+
}
|
|
832
|
+
response_data = self.api_client.call_api(
|
|
833
|
+
*_param,
|
|
834
|
+
_request_timeout=_request_timeout
|
|
835
|
+
)
|
|
836
|
+
return response_data.response
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
def _read_chat_task_settings_serialize(
|
|
840
|
+
self,
|
|
841
|
+
username,
|
|
842
|
+
dataset,
|
|
843
|
+
organization_id,
|
|
844
|
+
q_answer_api_key,
|
|
845
|
+
_request_auth,
|
|
846
|
+
_content_type,
|
|
847
|
+
_headers,
|
|
848
|
+
_host_index,
|
|
849
|
+
) -> RequestSerialized:
|
|
850
|
+
|
|
851
|
+
_host = None
|
|
852
|
+
|
|
853
|
+
_collection_formats: Dict[str, str] = {
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
_path_params: Dict[str, str] = {}
|
|
857
|
+
_query_params: List[Tuple[str, str]] = []
|
|
858
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
859
|
+
_form_params: List[Tuple[str, str]] = []
|
|
860
|
+
_files: Dict[
|
|
861
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
862
|
+
] = {}
|
|
863
|
+
_body_params: Optional[bytes] = None
|
|
864
|
+
|
|
865
|
+
# process the path parameters
|
|
866
|
+
# process the query parameters
|
|
867
|
+
if username is not None:
|
|
868
|
+
|
|
869
|
+
_query_params.append(('username', username))
|
|
870
|
+
|
|
871
|
+
if dataset is not None:
|
|
872
|
+
|
|
873
|
+
_query_params.append(('dataset', dataset))
|
|
874
|
+
|
|
875
|
+
if organization_id is not None:
|
|
876
|
+
|
|
877
|
+
_query_params.append(('organization_id', organization_id))
|
|
878
|
+
|
|
879
|
+
# process the header parameters
|
|
880
|
+
if q_answer_api_key is not None:
|
|
881
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
882
|
+
# process the form parameters
|
|
883
|
+
# process the body parameter
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
# set the HTTP header `Accept`
|
|
887
|
+
if 'Accept' not in _header_params:
|
|
888
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
889
|
+
[
|
|
890
|
+
'application/json'
|
|
891
|
+
]
|
|
892
|
+
)
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
# authentication setting
|
|
896
|
+
_auth_settings: List[str] = [
|
|
897
|
+
'QAnswer-Api-Key',
|
|
898
|
+
'Bearer token'
|
|
899
|
+
]
|
|
900
|
+
|
|
901
|
+
return self.api_client.param_serialize(
|
|
902
|
+
method='GET',
|
|
903
|
+
resource_path='/api/tasks/chat/settings',
|
|
904
|
+
path_params=_path_params,
|
|
905
|
+
query_params=_query_params,
|
|
906
|
+
header_params=_header_params,
|
|
907
|
+
body=_body_params,
|
|
908
|
+
post_params=_form_params,
|
|
909
|
+
files=_files,
|
|
910
|
+
auth_settings=_auth_settings,
|
|
911
|
+
collection_formats=_collection_formats,
|
|
912
|
+
_host=_host,
|
|
913
|
+
_request_auth=_request_auth
|
|
914
|
+
)
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
@validate_call
|
|
920
|
+
def task_chat(
|
|
921
|
+
self,
|
|
922
|
+
rag_payload: RAGPayload,
|
|
923
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
924
|
+
_request_timeout: Union[
|
|
925
|
+
None,
|
|
926
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
927
|
+
Tuple[
|
|
928
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
929
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
930
|
+
]
|
|
931
|
+
] = None,
|
|
932
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
933
|
+
_content_type: Optional[StrictStr] = None,
|
|
934
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
935
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
936
|
+
) -> RAGResponse:
|
|
937
|
+
"""Task Chat
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
:param rag_payload: (required)
|
|
941
|
+
:type rag_payload: RAGPayload
|
|
942
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
943
|
+
:type q_answer_api_key: str
|
|
944
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
945
|
+
number provided, it will be total request
|
|
946
|
+
timeout. It can also be a pair (tuple) of
|
|
947
|
+
(connection, read) timeouts.
|
|
948
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
949
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
950
|
+
request; this effectively ignores the
|
|
951
|
+
authentication in the spec for a single request.
|
|
952
|
+
:type _request_auth: dict, optional
|
|
953
|
+
:param _content_type: force content-type for the request.
|
|
954
|
+
:type _content_type: str, Optional
|
|
955
|
+
:param _headers: set to override the headers for a single
|
|
956
|
+
request; this effectively ignores the headers
|
|
957
|
+
in the spec for a single request.
|
|
958
|
+
:type _headers: dict, optional
|
|
959
|
+
:param _host_index: set to override the host_index for a single
|
|
960
|
+
request; this effectively ignores the host_index
|
|
961
|
+
in the spec for a single request.
|
|
962
|
+
:type _host_index: int, optional
|
|
963
|
+
:return: Returns the result object.
|
|
964
|
+
""" # noqa: E501
|
|
965
|
+
|
|
966
|
+
_param = self._task_chat_serialize(
|
|
967
|
+
rag_payload=rag_payload,
|
|
968
|
+
q_answer_api_key=q_answer_api_key,
|
|
969
|
+
_request_auth=_request_auth,
|
|
970
|
+
_content_type=_content_type,
|
|
971
|
+
_headers=_headers,
|
|
972
|
+
_host_index=_host_index
|
|
973
|
+
)
|
|
974
|
+
|
|
975
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
976
|
+
'200': "RAGResponse",
|
|
977
|
+
'307': None,
|
|
978
|
+
'422': "HTTPValidationError",
|
|
979
|
+
}
|
|
980
|
+
response_data = self.api_client.call_api(
|
|
981
|
+
*_param,
|
|
982
|
+
_request_timeout=_request_timeout
|
|
983
|
+
)
|
|
984
|
+
response_data.read()
|
|
985
|
+
return self.api_client.response_deserialize(
|
|
986
|
+
response_data=response_data,
|
|
987
|
+
response_types_map=_response_types_map,
|
|
988
|
+
).data
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
@validate_call
|
|
992
|
+
def task_chat_with_http_info(
|
|
993
|
+
self,
|
|
994
|
+
rag_payload: RAGPayload,
|
|
995
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
996
|
+
_request_timeout: Union[
|
|
997
|
+
None,
|
|
998
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
999
|
+
Tuple[
|
|
1000
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1001
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1002
|
+
]
|
|
1003
|
+
] = None,
|
|
1004
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1005
|
+
_content_type: Optional[StrictStr] = None,
|
|
1006
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1007
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1008
|
+
) -> ApiResponse[RAGResponse]:
|
|
1009
|
+
"""Task Chat
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
:param rag_payload: (required)
|
|
1013
|
+
:type rag_payload: RAGPayload
|
|
1014
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1015
|
+
:type q_answer_api_key: str
|
|
1016
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1017
|
+
number provided, it will be total request
|
|
1018
|
+
timeout. It can also be a pair (tuple) of
|
|
1019
|
+
(connection, read) timeouts.
|
|
1020
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1021
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1022
|
+
request; this effectively ignores the
|
|
1023
|
+
authentication in the spec for a single request.
|
|
1024
|
+
:type _request_auth: dict, optional
|
|
1025
|
+
:param _content_type: force content-type for the request.
|
|
1026
|
+
:type _content_type: str, Optional
|
|
1027
|
+
:param _headers: set to override the headers for a single
|
|
1028
|
+
request; this effectively ignores the headers
|
|
1029
|
+
in the spec for a single request.
|
|
1030
|
+
:type _headers: dict, optional
|
|
1031
|
+
:param _host_index: set to override the host_index for a single
|
|
1032
|
+
request; this effectively ignores the host_index
|
|
1033
|
+
in the spec for a single request.
|
|
1034
|
+
:type _host_index: int, optional
|
|
1035
|
+
:return: Returns the result object.
|
|
1036
|
+
""" # noqa: E501
|
|
1037
|
+
|
|
1038
|
+
_param = self._task_chat_serialize(
|
|
1039
|
+
rag_payload=rag_payload,
|
|
1040
|
+
q_answer_api_key=q_answer_api_key,
|
|
1041
|
+
_request_auth=_request_auth,
|
|
1042
|
+
_content_type=_content_type,
|
|
1043
|
+
_headers=_headers,
|
|
1044
|
+
_host_index=_host_index
|
|
1045
|
+
)
|
|
1046
|
+
|
|
1047
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1048
|
+
'200': "RAGResponse",
|
|
1049
|
+
'307': None,
|
|
1050
|
+
'422': "HTTPValidationError",
|
|
1051
|
+
}
|
|
1052
|
+
response_data = self.api_client.call_api(
|
|
1053
|
+
*_param,
|
|
1054
|
+
_request_timeout=_request_timeout
|
|
1055
|
+
)
|
|
1056
|
+
response_data.read()
|
|
1057
|
+
return self.api_client.response_deserialize(
|
|
1058
|
+
response_data=response_data,
|
|
1059
|
+
response_types_map=_response_types_map,
|
|
1060
|
+
)
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
@validate_call
|
|
1064
|
+
def task_chat_without_preload_content(
|
|
1065
|
+
self,
|
|
1066
|
+
rag_payload: RAGPayload,
|
|
1067
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1068
|
+
_request_timeout: Union[
|
|
1069
|
+
None,
|
|
1070
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1071
|
+
Tuple[
|
|
1072
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1073
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1074
|
+
]
|
|
1075
|
+
] = None,
|
|
1076
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1077
|
+
_content_type: Optional[StrictStr] = None,
|
|
1078
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1079
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1080
|
+
) -> RESTResponseType:
|
|
1081
|
+
"""Task Chat
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
:param rag_payload: (required)
|
|
1085
|
+
:type rag_payload: RAGPayload
|
|
1086
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1087
|
+
:type q_answer_api_key: str
|
|
1088
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1089
|
+
number provided, it will be total request
|
|
1090
|
+
timeout. It can also be a pair (tuple) of
|
|
1091
|
+
(connection, read) timeouts.
|
|
1092
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1093
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1094
|
+
request; this effectively ignores the
|
|
1095
|
+
authentication in the spec for a single request.
|
|
1096
|
+
:type _request_auth: dict, optional
|
|
1097
|
+
:param _content_type: force content-type for the request.
|
|
1098
|
+
:type _content_type: str, Optional
|
|
1099
|
+
:param _headers: set to override the headers for a single
|
|
1100
|
+
request; this effectively ignores the headers
|
|
1101
|
+
in the spec for a single request.
|
|
1102
|
+
:type _headers: dict, optional
|
|
1103
|
+
:param _host_index: set to override the host_index for a single
|
|
1104
|
+
request; this effectively ignores the host_index
|
|
1105
|
+
in the spec for a single request.
|
|
1106
|
+
:type _host_index: int, optional
|
|
1107
|
+
:return: Returns the result object.
|
|
1108
|
+
""" # noqa: E501
|
|
1109
|
+
|
|
1110
|
+
_param = self._task_chat_serialize(
|
|
1111
|
+
rag_payload=rag_payload,
|
|
1112
|
+
q_answer_api_key=q_answer_api_key,
|
|
1113
|
+
_request_auth=_request_auth,
|
|
1114
|
+
_content_type=_content_type,
|
|
1115
|
+
_headers=_headers,
|
|
1116
|
+
_host_index=_host_index
|
|
1117
|
+
)
|
|
1118
|
+
|
|
1119
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1120
|
+
'200': "RAGResponse",
|
|
1121
|
+
'307': None,
|
|
1122
|
+
'422': "HTTPValidationError",
|
|
1123
|
+
}
|
|
1124
|
+
response_data = self.api_client.call_api(
|
|
1125
|
+
*_param,
|
|
1126
|
+
_request_timeout=_request_timeout
|
|
1127
|
+
)
|
|
1128
|
+
return response_data.response
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
def _task_chat_serialize(
|
|
1132
|
+
self,
|
|
1133
|
+
rag_payload,
|
|
1134
|
+
q_answer_api_key,
|
|
1135
|
+
_request_auth,
|
|
1136
|
+
_content_type,
|
|
1137
|
+
_headers,
|
|
1138
|
+
_host_index,
|
|
1139
|
+
) -> RequestSerialized:
|
|
1140
|
+
|
|
1141
|
+
_host = None
|
|
1142
|
+
|
|
1143
|
+
_collection_formats: Dict[str, str] = {
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
_path_params: Dict[str, str] = {}
|
|
1147
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1148
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1149
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1150
|
+
_files: Dict[
|
|
1151
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1152
|
+
] = {}
|
|
1153
|
+
_body_params: Optional[bytes] = None
|
|
1154
|
+
|
|
1155
|
+
# process the path parameters
|
|
1156
|
+
# process the query parameters
|
|
1157
|
+
# process the header parameters
|
|
1158
|
+
if q_answer_api_key is not None:
|
|
1159
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1160
|
+
# process the form parameters
|
|
1161
|
+
# process the body parameter
|
|
1162
|
+
if rag_payload is not None:
|
|
1163
|
+
_body_params = rag_payload
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
# set the HTTP header `Accept`
|
|
1167
|
+
if 'Accept' not in _header_params:
|
|
1168
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1169
|
+
[
|
|
1170
|
+
'application/json'
|
|
1171
|
+
]
|
|
1172
|
+
)
|
|
1173
|
+
|
|
1174
|
+
# set the HTTP header `Content-Type`
|
|
1175
|
+
if _content_type:
|
|
1176
|
+
_header_params['Content-Type'] = _content_type
|
|
1177
|
+
else:
|
|
1178
|
+
_default_content_type = (
|
|
1179
|
+
self.api_client.select_header_content_type(
|
|
1180
|
+
[
|
|
1181
|
+
'application/json'
|
|
1182
|
+
]
|
|
1183
|
+
)
|
|
1184
|
+
)
|
|
1185
|
+
if _default_content_type is not None:
|
|
1186
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1187
|
+
|
|
1188
|
+
# authentication setting
|
|
1189
|
+
_auth_settings: List[str] = [
|
|
1190
|
+
'QAnswer-Api-Key',
|
|
1191
|
+
'Bearer token'
|
|
1192
|
+
]
|
|
1193
|
+
|
|
1194
|
+
return self.api_client.param_serialize(
|
|
1195
|
+
method='POST',
|
|
1196
|
+
resource_path='/api/tasks/chat',
|
|
1197
|
+
path_params=_path_params,
|
|
1198
|
+
query_params=_query_params,
|
|
1199
|
+
header_params=_header_params,
|
|
1200
|
+
body=_body_params,
|
|
1201
|
+
post_params=_form_params,
|
|
1202
|
+
files=_files,
|
|
1203
|
+
auth_settings=_auth_settings,
|
|
1204
|
+
collection_formats=_collection_formats,
|
|
1205
|
+
_host=_host,
|
|
1206
|
+
_request_auth=_request_auth
|
|
1207
|
+
)
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
@validate_call
|
|
1213
|
+
def task_chat_stop(
|
|
1214
|
+
self,
|
|
1215
|
+
assistant_message_stop: AssistantMessageStop,
|
|
1216
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1217
|
+
_request_timeout: Union[
|
|
1218
|
+
None,
|
|
1219
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1220
|
+
Tuple[
|
|
1221
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1222
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1223
|
+
]
|
|
1224
|
+
] = None,
|
|
1225
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1226
|
+
_content_type: Optional[StrictStr] = None,
|
|
1227
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1228
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1229
|
+
) -> object:
|
|
1230
|
+
"""Task Chat Stop
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
:param assistant_message_stop: (required)
|
|
1234
|
+
:type assistant_message_stop: AssistantMessageStop
|
|
1235
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1236
|
+
:type q_answer_api_key: str
|
|
1237
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1238
|
+
number provided, it will be total request
|
|
1239
|
+
timeout. It can also be a pair (tuple) of
|
|
1240
|
+
(connection, read) timeouts.
|
|
1241
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1242
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1243
|
+
request; this effectively ignores the
|
|
1244
|
+
authentication in the spec for a single request.
|
|
1245
|
+
:type _request_auth: dict, optional
|
|
1246
|
+
:param _content_type: force content-type for the request.
|
|
1247
|
+
:type _content_type: str, Optional
|
|
1248
|
+
:param _headers: set to override the headers for a single
|
|
1249
|
+
request; this effectively ignores the headers
|
|
1250
|
+
in the spec for a single request.
|
|
1251
|
+
:type _headers: dict, optional
|
|
1252
|
+
:param _host_index: set to override the host_index for a single
|
|
1253
|
+
request; this effectively ignores the host_index
|
|
1254
|
+
in the spec for a single request.
|
|
1255
|
+
:type _host_index: int, optional
|
|
1256
|
+
:return: Returns the result object.
|
|
1257
|
+
""" # noqa: E501
|
|
1258
|
+
|
|
1259
|
+
_param = self._task_chat_stop_serialize(
|
|
1260
|
+
assistant_message_stop=assistant_message_stop,
|
|
1261
|
+
q_answer_api_key=q_answer_api_key,
|
|
1262
|
+
_request_auth=_request_auth,
|
|
1263
|
+
_content_type=_content_type,
|
|
1264
|
+
_headers=_headers,
|
|
1265
|
+
_host_index=_host_index
|
|
1266
|
+
)
|
|
1267
|
+
|
|
1268
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1269
|
+
'200': "object",
|
|
1270
|
+
'422': "HTTPValidationError",
|
|
1271
|
+
}
|
|
1272
|
+
response_data = self.api_client.call_api(
|
|
1273
|
+
*_param,
|
|
1274
|
+
_request_timeout=_request_timeout
|
|
1275
|
+
)
|
|
1276
|
+
response_data.read()
|
|
1277
|
+
return self.api_client.response_deserialize(
|
|
1278
|
+
response_data=response_data,
|
|
1279
|
+
response_types_map=_response_types_map,
|
|
1280
|
+
).data
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
@validate_call
|
|
1284
|
+
def task_chat_stop_with_http_info(
|
|
1285
|
+
self,
|
|
1286
|
+
assistant_message_stop: AssistantMessageStop,
|
|
1287
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1288
|
+
_request_timeout: Union[
|
|
1289
|
+
None,
|
|
1290
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1291
|
+
Tuple[
|
|
1292
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1293
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1294
|
+
]
|
|
1295
|
+
] = None,
|
|
1296
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1297
|
+
_content_type: Optional[StrictStr] = None,
|
|
1298
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1299
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1300
|
+
) -> ApiResponse[object]:
|
|
1301
|
+
"""Task Chat Stop
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
:param assistant_message_stop: (required)
|
|
1305
|
+
:type assistant_message_stop: AssistantMessageStop
|
|
1306
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1307
|
+
:type q_answer_api_key: str
|
|
1308
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1309
|
+
number provided, it will be total request
|
|
1310
|
+
timeout. It can also be a pair (tuple) of
|
|
1311
|
+
(connection, read) timeouts.
|
|
1312
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1313
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1314
|
+
request; this effectively ignores the
|
|
1315
|
+
authentication in the spec for a single request.
|
|
1316
|
+
:type _request_auth: dict, optional
|
|
1317
|
+
:param _content_type: force content-type for the request.
|
|
1318
|
+
:type _content_type: str, Optional
|
|
1319
|
+
:param _headers: set to override the headers for a single
|
|
1320
|
+
request; this effectively ignores the headers
|
|
1321
|
+
in the spec for a single request.
|
|
1322
|
+
:type _headers: dict, optional
|
|
1323
|
+
:param _host_index: set to override the host_index for a single
|
|
1324
|
+
request; this effectively ignores the host_index
|
|
1325
|
+
in the spec for a single request.
|
|
1326
|
+
:type _host_index: int, optional
|
|
1327
|
+
:return: Returns the result object.
|
|
1328
|
+
""" # noqa: E501
|
|
1329
|
+
|
|
1330
|
+
_param = self._task_chat_stop_serialize(
|
|
1331
|
+
assistant_message_stop=assistant_message_stop,
|
|
1332
|
+
q_answer_api_key=q_answer_api_key,
|
|
1333
|
+
_request_auth=_request_auth,
|
|
1334
|
+
_content_type=_content_type,
|
|
1335
|
+
_headers=_headers,
|
|
1336
|
+
_host_index=_host_index
|
|
1337
|
+
)
|
|
1338
|
+
|
|
1339
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1340
|
+
'200': "object",
|
|
1341
|
+
'422': "HTTPValidationError",
|
|
1342
|
+
}
|
|
1343
|
+
response_data = self.api_client.call_api(
|
|
1344
|
+
*_param,
|
|
1345
|
+
_request_timeout=_request_timeout
|
|
1346
|
+
)
|
|
1347
|
+
response_data.read()
|
|
1348
|
+
return self.api_client.response_deserialize(
|
|
1349
|
+
response_data=response_data,
|
|
1350
|
+
response_types_map=_response_types_map,
|
|
1351
|
+
)
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
@validate_call
|
|
1355
|
+
def task_chat_stop_without_preload_content(
|
|
1356
|
+
self,
|
|
1357
|
+
assistant_message_stop: AssistantMessageStop,
|
|
1358
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1359
|
+
_request_timeout: Union[
|
|
1360
|
+
None,
|
|
1361
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1362
|
+
Tuple[
|
|
1363
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1364
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1365
|
+
]
|
|
1366
|
+
] = None,
|
|
1367
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1368
|
+
_content_type: Optional[StrictStr] = None,
|
|
1369
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1370
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1371
|
+
) -> RESTResponseType:
|
|
1372
|
+
"""Task Chat Stop
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
:param assistant_message_stop: (required)
|
|
1376
|
+
:type assistant_message_stop: AssistantMessageStop
|
|
1377
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1378
|
+
:type q_answer_api_key: str
|
|
1379
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1380
|
+
number provided, it will be total request
|
|
1381
|
+
timeout. It can also be a pair (tuple) of
|
|
1382
|
+
(connection, read) timeouts.
|
|
1383
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1384
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1385
|
+
request; this effectively ignores the
|
|
1386
|
+
authentication in the spec for a single request.
|
|
1387
|
+
:type _request_auth: dict, optional
|
|
1388
|
+
:param _content_type: force content-type for the request.
|
|
1389
|
+
:type _content_type: str, Optional
|
|
1390
|
+
:param _headers: set to override the headers for a single
|
|
1391
|
+
request; this effectively ignores the headers
|
|
1392
|
+
in the spec for a single request.
|
|
1393
|
+
:type _headers: dict, optional
|
|
1394
|
+
:param _host_index: set to override the host_index for a single
|
|
1395
|
+
request; this effectively ignores the host_index
|
|
1396
|
+
in the spec for a single request.
|
|
1397
|
+
:type _host_index: int, optional
|
|
1398
|
+
:return: Returns the result object.
|
|
1399
|
+
""" # noqa: E501
|
|
1400
|
+
|
|
1401
|
+
_param = self._task_chat_stop_serialize(
|
|
1402
|
+
assistant_message_stop=assistant_message_stop,
|
|
1403
|
+
q_answer_api_key=q_answer_api_key,
|
|
1404
|
+
_request_auth=_request_auth,
|
|
1405
|
+
_content_type=_content_type,
|
|
1406
|
+
_headers=_headers,
|
|
1407
|
+
_host_index=_host_index
|
|
1408
|
+
)
|
|
1409
|
+
|
|
1410
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1411
|
+
'200': "object",
|
|
1412
|
+
'422': "HTTPValidationError",
|
|
1413
|
+
}
|
|
1414
|
+
response_data = self.api_client.call_api(
|
|
1415
|
+
*_param,
|
|
1416
|
+
_request_timeout=_request_timeout
|
|
1417
|
+
)
|
|
1418
|
+
return response_data.response
|
|
1419
|
+
|
|
1420
|
+
|
|
1421
|
+
def _task_chat_stop_serialize(
|
|
1422
|
+
self,
|
|
1423
|
+
assistant_message_stop,
|
|
1424
|
+
q_answer_api_key,
|
|
1425
|
+
_request_auth,
|
|
1426
|
+
_content_type,
|
|
1427
|
+
_headers,
|
|
1428
|
+
_host_index,
|
|
1429
|
+
) -> RequestSerialized:
|
|
1430
|
+
|
|
1431
|
+
_host = None
|
|
1432
|
+
|
|
1433
|
+
_collection_formats: Dict[str, str] = {
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
_path_params: Dict[str, str] = {}
|
|
1437
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1438
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1439
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1440
|
+
_files: Dict[
|
|
1441
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1442
|
+
] = {}
|
|
1443
|
+
_body_params: Optional[bytes] = None
|
|
1444
|
+
|
|
1445
|
+
# process the path parameters
|
|
1446
|
+
# process the query parameters
|
|
1447
|
+
# process the header parameters
|
|
1448
|
+
if q_answer_api_key is not None:
|
|
1449
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1450
|
+
# process the form parameters
|
|
1451
|
+
# process the body parameter
|
|
1452
|
+
if assistant_message_stop is not None:
|
|
1453
|
+
_body_params = assistant_message_stop
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
# set the HTTP header `Accept`
|
|
1457
|
+
if 'Accept' not in _header_params:
|
|
1458
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1459
|
+
[
|
|
1460
|
+
'application/json'
|
|
1461
|
+
]
|
|
1462
|
+
)
|
|
1463
|
+
|
|
1464
|
+
# set the HTTP header `Content-Type`
|
|
1465
|
+
if _content_type:
|
|
1466
|
+
_header_params['Content-Type'] = _content_type
|
|
1467
|
+
else:
|
|
1468
|
+
_default_content_type = (
|
|
1469
|
+
self.api_client.select_header_content_type(
|
|
1470
|
+
[
|
|
1471
|
+
'application/json'
|
|
1472
|
+
]
|
|
1473
|
+
)
|
|
1474
|
+
)
|
|
1475
|
+
if _default_content_type is not None:
|
|
1476
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1477
|
+
|
|
1478
|
+
# authentication setting
|
|
1479
|
+
_auth_settings: List[str] = [
|
|
1480
|
+
'QAnswer-Api-Key',
|
|
1481
|
+
'Bearer token'
|
|
1482
|
+
]
|
|
1483
|
+
|
|
1484
|
+
return self.api_client.param_serialize(
|
|
1485
|
+
method='PUT',
|
|
1486
|
+
resource_path='/api/tasks/chat/stop',
|
|
1487
|
+
path_params=_path_params,
|
|
1488
|
+
query_params=_query_params,
|
|
1489
|
+
header_params=_header_params,
|
|
1490
|
+
body=_body_params,
|
|
1491
|
+
post_params=_form_params,
|
|
1492
|
+
files=_files,
|
|
1493
|
+
auth_settings=_auth_settings,
|
|
1494
|
+
collection_formats=_collection_formats,
|
|
1495
|
+
_host=_host,
|
|
1496
|
+
_request_auth=_request_auth
|
|
1497
|
+
)
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
@validate_call
|
|
1503
|
+
def update_chat_task_settings(
|
|
1504
|
+
self,
|
|
1505
|
+
chat_task_settings_update_payload: ChatTaskSettingsUpdatePayload,
|
|
1506
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1507
|
+
_request_timeout: Union[
|
|
1508
|
+
None,
|
|
1509
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1510
|
+
Tuple[
|
|
1511
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1512
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1513
|
+
]
|
|
1514
|
+
] = None,
|
|
1515
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1516
|
+
_content_type: Optional[StrictStr] = None,
|
|
1517
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1518
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1519
|
+
) -> ChatTaskSettings:
|
|
1520
|
+
"""Update Chat Task Settings
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
:param chat_task_settings_update_payload: (required)
|
|
1524
|
+
:type chat_task_settings_update_payload: ChatTaskSettingsUpdatePayload
|
|
1525
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1526
|
+
:type q_answer_api_key: str
|
|
1527
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1528
|
+
number provided, it will be total request
|
|
1529
|
+
timeout. It can also be a pair (tuple) of
|
|
1530
|
+
(connection, read) timeouts.
|
|
1531
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1532
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1533
|
+
request; this effectively ignores the
|
|
1534
|
+
authentication in the spec for a single request.
|
|
1535
|
+
:type _request_auth: dict, optional
|
|
1536
|
+
:param _content_type: force content-type for the request.
|
|
1537
|
+
:type _content_type: str, Optional
|
|
1538
|
+
:param _headers: set to override the headers for a single
|
|
1539
|
+
request; this effectively ignores the headers
|
|
1540
|
+
in the spec for a single request.
|
|
1541
|
+
:type _headers: dict, optional
|
|
1542
|
+
:param _host_index: set to override the host_index for a single
|
|
1543
|
+
request; this effectively ignores the host_index
|
|
1544
|
+
in the spec for a single request.
|
|
1545
|
+
:type _host_index: int, optional
|
|
1546
|
+
:return: Returns the result object.
|
|
1547
|
+
""" # noqa: E501
|
|
1548
|
+
|
|
1549
|
+
_param = self._update_chat_task_settings_serialize(
|
|
1550
|
+
chat_task_settings_update_payload=chat_task_settings_update_payload,
|
|
1551
|
+
q_answer_api_key=q_answer_api_key,
|
|
1552
|
+
_request_auth=_request_auth,
|
|
1553
|
+
_content_type=_content_type,
|
|
1554
|
+
_headers=_headers,
|
|
1555
|
+
_host_index=_host_index
|
|
1556
|
+
)
|
|
1557
|
+
|
|
1558
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1559
|
+
'200': "ChatTaskSettings",
|
|
1560
|
+
'422': "HTTPValidationError",
|
|
1561
|
+
}
|
|
1562
|
+
response_data = self.api_client.call_api(
|
|
1563
|
+
*_param,
|
|
1564
|
+
_request_timeout=_request_timeout
|
|
1565
|
+
)
|
|
1566
|
+
response_data.read()
|
|
1567
|
+
return self.api_client.response_deserialize(
|
|
1568
|
+
response_data=response_data,
|
|
1569
|
+
response_types_map=_response_types_map,
|
|
1570
|
+
).data
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
@validate_call
|
|
1574
|
+
def update_chat_task_settings_with_http_info(
|
|
1575
|
+
self,
|
|
1576
|
+
chat_task_settings_update_payload: ChatTaskSettingsUpdatePayload,
|
|
1577
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1578
|
+
_request_timeout: Union[
|
|
1579
|
+
None,
|
|
1580
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1581
|
+
Tuple[
|
|
1582
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1583
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1584
|
+
]
|
|
1585
|
+
] = None,
|
|
1586
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1587
|
+
_content_type: Optional[StrictStr] = None,
|
|
1588
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1589
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1590
|
+
) -> ApiResponse[ChatTaskSettings]:
|
|
1591
|
+
"""Update Chat Task Settings
|
|
1592
|
+
|
|
1593
|
+
|
|
1594
|
+
:param chat_task_settings_update_payload: (required)
|
|
1595
|
+
:type chat_task_settings_update_payload: ChatTaskSettingsUpdatePayload
|
|
1596
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1597
|
+
:type q_answer_api_key: str
|
|
1598
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1599
|
+
number provided, it will be total request
|
|
1600
|
+
timeout. It can also be a pair (tuple) of
|
|
1601
|
+
(connection, read) timeouts.
|
|
1602
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1603
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1604
|
+
request; this effectively ignores the
|
|
1605
|
+
authentication in the spec for a single request.
|
|
1606
|
+
:type _request_auth: dict, optional
|
|
1607
|
+
:param _content_type: force content-type for the request.
|
|
1608
|
+
:type _content_type: str, Optional
|
|
1609
|
+
:param _headers: set to override the headers for a single
|
|
1610
|
+
request; this effectively ignores the headers
|
|
1611
|
+
in the spec for a single request.
|
|
1612
|
+
:type _headers: dict, optional
|
|
1613
|
+
:param _host_index: set to override the host_index for a single
|
|
1614
|
+
request; this effectively ignores the host_index
|
|
1615
|
+
in the spec for a single request.
|
|
1616
|
+
:type _host_index: int, optional
|
|
1617
|
+
:return: Returns the result object.
|
|
1618
|
+
""" # noqa: E501
|
|
1619
|
+
|
|
1620
|
+
_param = self._update_chat_task_settings_serialize(
|
|
1621
|
+
chat_task_settings_update_payload=chat_task_settings_update_payload,
|
|
1622
|
+
q_answer_api_key=q_answer_api_key,
|
|
1623
|
+
_request_auth=_request_auth,
|
|
1624
|
+
_content_type=_content_type,
|
|
1625
|
+
_headers=_headers,
|
|
1626
|
+
_host_index=_host_index
|
|
1627
|
+
)
|
|
1628
|
+
|
|
1629
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1630
|
+
'200': "ChatTaskSettings",
|
|
1631
|
+
'422': "HTTPValidationError",
|
|
1632
|
+
}
|
|
1633
|
+
response_data = self.api_client.call_api(
|
|
1634
|
+
*_param,
|
|
1635
|
+
_request_timeout=_request_timeout
|
|
1636
|
+
)
|
|
1637
|
+
response_data.read()
|
|
1638
|
+
return self.api_client.response_deserialize(
|
|
1639
|
+
response_data=response_data,
|
|
1640
|
+
response_types_map=_response_types_map,
|
|
1641
|
+
)
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
@validate_call
|
|
1645
|
+
def update_chat_task_settings_without_preload_content(
|
|
1646
|
+
self,
|
|
1647
|
+
chat_task_settings_update_payload: ChatTaskSettingsUpdatePayload,
|
|
1648
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1649
|
+
_request_timeout: Union[
|
|
1650
|
+
None,
|
|
1651
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1652
|
+
Tuple[
|
|
1653
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1654
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1655
|
+
]
|
|
1656
|
+
] = None,
|
|
1657
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1658
|
+
_content_type: Optional[StrictStr] = None,
|
|
1659
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1660
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1661
|
+
) -> RESTResponseType:
|
|
1662
|
+
"""Update Chat Task Settings
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
:param chat_task_settings_update_payload: (required)
|
|
1666
|
+
:type chat_task_settings_update_payload: ChatTaskSettingsUpdatePayload
|
|
1667
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1668
|
+
:type q_answer_api_key: str
|
|
1669
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1670
|
+
number provided, it will be total request
|
|
1671
|
+
timeout. It can also be a pair (tuple) of
|
|
1672
|
+
(connection, read) timeouts.
|
|
1673
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1674
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1675
|
+
request; this effectively ignores the
|
|
1676
|
+
authentication in the spec for a single request.
|
|
1677
|
+
:type _request_auth: dict, optional
|
|
1678
|
+
:param _content_type: force content-type for the request.
|
|
1679
|
+
:type _content_type: str, Optional
|
|
1680
|
+
:param _headers: set to override the headers for a single
|
|
1681
|
+
request; this effectively ignores the headers
|
|
1682
|
+
in the spec for a single request.
|
|
1683
|
+
:type _headers: dict, optional
|
|
1684
|
+
:param _host_index: set to override the host_index for a single
|
|
1685
|
+
request; this effectively ignores the host_index
|
|
1686
|
+
in the spec for a single request.
|
|
1687
|
+
:type _host_index: int, optional
|
|
1688
|
+
:return: Returns the result object.
|
|
1689
|
+
""" # noqa: E501
|
|
1690
|
+
|
|
1691
|
+
_param = self._update_chat_task_settings_serialize(
|
|
1692
|
+
chat_task_settings_update_payload=chat_task_settings_update_payload,
|
|
1693
|
+
q_answer_api_key=q_answer_api_key,
|
|
1694
|
+
_request_auth=_request_auth,
|
|
1695
|
+
_content_type=_content_type,
|
|
1696
|
+
_headers=_headers,
|
|
1697
|
+
_host_index=_host_index
|
|
1698
|
+
)
|
|
1699
|
+
|
|
1700
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1701
|
+
'200': "ChatTaskSettings",
|
|
1702
|
+
'422': "HTTPValidationError",
|
|
1703
|
+
}
|
|
1704
|
+
response_data = self.api_client.call_api(
|
|
1705
|
+
*_param,
|
|
1706
|
+
_request_timeout=_request_timeout
|
|
1707
|
+
)
|
|
1708
|
+
return response_data.response
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
def _update_chat_task_settings_serialize(
|
|
1712
|
+
self,
|
|
1713
|
+
chat_task_settings_update_payload,
|
|
1714
|
+
q_answer_api_key,
|
|
1715
|
+
_request_auth,
|
|
1716
|
+
_content_type,
|
|
1717
|
+
_headers,
|
|
1718
|
+
_host_index,
|
|
1719
|
+
) -> RequestSerialized:
|
|
1720
|
+
|
|
1721
|
+
_host = None
|
|
1722
|
+
|
|
1723
|
+
_collection_formats: Dict[str, str] = {
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
_path_params: Dict[str, str] = {}
|
|
1727
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1728
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1729
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1730
|
+
_files: Dict[
|
|
1731
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1732
|
+
] = {}
|
|
1733
|
+
_body_params: Optional[bytes] = None
|
|
1734
|
+
|
|
1735
|
+
# process the path parameters
|
|
1736
|
+
# process the query parameters
|
|
1737
|
+
# process the header parameters
|
|
1738
|
+
if q_answer_api_key is not None:
|
|
1739
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
1740
|
+
# process the form parameters
|
|
1741
|
+
# process the body parameter
|
|
1742
|
+
if chat_task_settings_update_payload is not None:
|
|
1743
|
+
_body_params = chat_task_settings_update_payload
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
# set the HTTP header `Accept`
|
|
1747
|
+
if 'Accept' not in _header_params:
|
|
1748
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1749
|
+
[
|
|
1750
|
+
'application/json'
|
|
1751
|
+
]
|
|
1752
|
+
)
|
|
1753
|
+
|
|
1754
|
+
# set the HTTP header `Content-Type`
|
|
1755
|
+
if _content_type:
|
|
1756
|
+
_header_params['Content-Type'] = _content_type
|
|
1757
|
+
else:
|
|
1758
|
+
_default_content_type = (
|
|
1759
|
+
self.api_client.select_header_content_type(
|
|
1760
|
+
[
|
|
1761
|
+
'application/json'
|
|
1762
|
+
]
|
|
1763
|
+
)
|
|
1764
|
+
)
|
|
1765
|
+
if _default_content_type is not None:
|
|
1766
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1767
|
+
|
|
1768
|
+
# authentication setting
|
|
1769
|
+
_auth_settings: List[str] = [
|
|
1770
|
+
'QAnswer-Api-Key',
|
|
1771
|
+
'Bearer token'
|
|
1772
|
+
]
|
|
1773
|
+
|
|
1774
|
+
return self.api_client.param_serialize(
|
|
1775
|
+
method='PUT',
|
|
1776
|
+
resource_path='/api/tasks/chat/settings',
|
|
1777
|
+
path_params=_path_params,
|
|
1778
|
+
query_params=_query_params,
|
|
1779
|
+
header_params=_header_params,
|
|
1780
|
+
body=_body_params,
|
|
1781
|
+
post_params=_form_params,
|
|
1782
|
+
files=_files,
|
|
1783
|
+
auth_settings=_auth_settings,
|
|
1784
|
+
collection_formats=_collection_formats,
|
|
1785
|
+
_host=_host,
|
|
1786
|
+
_request_auth=_request_auth
|
|
1787
|
+
)
|
|
1788
|
+
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
@validate_call
|
|
1793
|
+
def update_enable_enhanced_context_chat(
|
|
1794
|
+
self,
|
|
1795
|
+
enable_enhanced_context_payload: EnableEnhancedContextPayload,
|
|
1796
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1797
|
+
_request_timeout: Union[
|
|
1798
|
+
None,
|
|
1799
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1800
|
+
Tuple[
|
|
1801
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1802
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1803
|
+
]
|
|
1804
|
+
] = None,
|
|
1805
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1806
|
+
_content_type: Optional[StrictStr] = None,
|
|
1807
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1808
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1809
|
+
) -> EnableEnhancedContextResponse:
|
|
1810
|
+
"""Update Enable Enhanced Context Chat
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
:param enable_enhanced_context_payload: (required)
|
|
1814
|
+
:type enable_enhanced_context_payload: EnableEnhancedContextPayload
|
|
1815
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1816
|
+
:type q_answer_api_key: str
|
|
1817
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1818
|
+
number provided, it will be total request
|
|
1819
|
+
timeout. It can also be a pair (tuple) of
|
|
1820
|
+
(connection, read) timeouts.
|
|
1821
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1822
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1823
|
+
request; this effectively ignores the
|
|
1824
|
+
authentication in the spec for a single request.
|
|
1825
|
+
:type _request_auth: dict, optional
|
|
1826
|
+
:param _content_type: force content-type for the request.
|
|
1827
|
+
:type _content_type: str, Optional
|
|
1828
|
+
:param _headers: set to override the headers for a single
|
|
1829
|
+
request; this effectively ignores the headers
|
|
1830
|
+
in the spec for a single request.
|
|
1831
|
+
:type _headers: dict, optional
|
|
1832
|
+
:param _host_index: set to override the host_index for a single
|
|
1833
|
+
request; this effectively ignores the host_index
|
|
1834
|
+
in the spec for a single request.
|
|
1835
|
+
:type _host_index: int, optional
|
|
1836
|
+
:return: Returns the result object.
|
|
1837
|
+
""" # noqa: E501
|
|
1838
|
+
|
|
1839
|
+
_param = self._update_enable_enhanced_context_chat_serialize(
|
|
1840
|
+
enable_enhanced_context_payload=enable_enhanced_context_payload,
|
|
1841
|
+
q_answer_api_key=q_answer_api_key,
|
|
1842
|
+
_request_auth=_request_auth,
|
|
1843
|
+
_content_type=_content_type,
|
|
1844
|
+
_headers=_headers,
|
|
1845
|
+
_host_index=_host_index
|
|
1846
|
+
)
|
|
1847
|
+
|
|
1848
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1849
|
+
'200': "EnableEnhancedContextResponse",
|
|
1850
|
+
'422': "HTTPValidationError",
|
|
1851
|
+
}
|
|
1852
|
+
response_data = self.api_client.call_api(
|
|
1853
|
+
*_param,
|
|
1854
|
+
_request_timeout=_request_timeout
|
|
1855
|
+
)
|
|
1856
|
+
response_data.read()
|
|
1857
|
+
return self.api_client.response_deserialize(
|
|
1858
|
+
response_data=response_data,
|
|
1859
|
+
response_types_map=_response_types_map,
|
|
1860
|
+
).data
|
|
1861
|
+
|
|
1862
|
+
|
|
1863
|
+
@validate_call
|
|
1864
|
+
def update_enable_enhanced_context_chat_with_http_info(
|
|
1865
|
+
self,
|
|
1866
|
+
enable_enhanced_context_payload: EnableEnhancedContextPayload,
|
|
1867
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1868
|
+
_request_timeout: Union[
|
|
1869
|
+
None,
|
|
1870
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1871
|
+
Tuple[
|
|
1872
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1873
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1874
|
+
]
|
|
1875
|
+
] = None,
|
|
1876
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1877
|
+
_content_type: Optional[StrictStr] = None,
|
|
1878
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1879
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1880
|
+
) -> ApiResponse[EnableEnhancedContextResponse]:
|
|
1881
|
+
"""Update Enable Enhanced Context Chat
|
|
1882
|
+
|
|
1883
|
+
|
|
1884
|
+
:param enable_enhanced_context_payload: (required)
|
|
1885
|
+
:type enable_enhanced_context_payload: EnableEnhancedContextPayload
|
|
1886
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1887
|
+
:type q_answer_api_key: str
|
|
1888
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1889
|
+
number provided, it will be total request
|
|
1890
|
+
timeout. It can also be a pair (tuple) of
|
|
1891
|
+
(connection, read) timeouts.
|
|
1892
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1893
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1894
|
+
request; this effectively ignores the
|
|
1895
|
+
authentication in the spec for a single request.
|
|
1896
|
+
:type _request_auth: dict, optional
|
|
1897
|
+
:param _content_type: force content-type for the request.
|
|
1898
|
+
:type _content_type: str, Optional
|
|
1899
|
+
:param _headers: set to override the headers for a single
|
|
1900
|
+
request; this effectively ignores the headers
|
|
1901
|
+
in the spec for a single request.
|
|
1902
|
+
:type _headers: dict, optional
|
|
1903
|
+
:param _host_index: set to override the host_index for a single
|
|
1904
|
+
request; this effectively ignores the host_index
|
|
1905
|
+
in the spec for a single request.
|
|
1906
|
+
:type _host_index: int, optional
|
|
1907
|
+
:return: Returns the result object.
|
|
1908
|
+
""" # noqa: E501
|
|
1909
|
+
|
|
1910
|
+
_param = self._update_enable_enhanced_context_chat_serialize(
|
|
1911
|
+
enable_enhanced_context_payload=enable_enhanced_context_payload,
|
|
1912
|
+
q_answer_api_key=q_answer_api_key,
|
|
1913
|
+
_request_auth=_request_auth,
|
|
1914
|
+
_content_type=_content_type,
|
|
1915
|
+
_headers=_headers,
|
|
1916
|
+
_host_index=_host_index
|
|
1917
|
+
)
|
|
1918
|
+
|
|
1919
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1920
|
+
'200': "EnableEnhancedContextResponse",
|
|
1921
|
+
'422': "HTTPValidationError",
|
|
1922
|
+
}
|
|
1923
|
+
response_data = self.api_client.call_api(
|
|
1924
|
+
*_param,
|
|
1925
|
+
_request_timeout=_request_timeout
|
|
1926
|
+
)
|
|
1927
|
+
response_data.read()
|
|
1928
|
+
return self.api_client.response_deserialize(
|
|
1929
|
+
response_data=response_data,
|
|
1930
|
+
response_types_map=_response_types_map,
|
|
1931
|
+
)
|
|
1932
|
+
|
|
1933
|
+
|
|
1934
|
+
@validate_call
|
|
1935
|
+
def update_enable_enhanced_context_chat_without_preload_content(
|
|
1936
|
+
self,
|
|
1937
|
+
enable_enhanced_context_payload: EnableEnhancedContextPayload,
|
|
1938
|
+
q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
|
|
1939
|
+
_request_timeout: Union[
|
|
1940
|
+
None,
|
|
1941
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1942
|
+
Tuple[
|
|
1943
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1944
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1945
|
+
]
|
|
1946
|
+
] = None,
|
|
1947
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1948
|
+
_content_type: Optional[StrictStr] = None,
|
|
1949
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1950
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1951
|
+
) -> RESTResponseType:
|
|
1952
|
+
"""Update Enable Enhanced Context Chat
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
:param enable_enhanced_context_payload: (required)
|
|
1956
|
+
:type enable_enhanced_context_payload: EnableEnhancedContextPayload
|
|
1957
|
+
:param q_answer_api_key: Optional QAnswer API key
|
|
1958
|
+
:type q_answer_api_key: str
|
|
1959
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1960
|
+
number provided, it will be total request
|
|
1961
|
+
timeout. It can also be a pair (tuple) of
|
|
1962
|
+
(connection, read) timeouts.
|
|
1963
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1964
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1965
|
+
request; this effectively ignores the
|
|
1966
|
+
authentication in the spec for a single request.
|
|
1967
|
+
:type _request_auth: dict, optional
|
|
1968
|
+
:param _content_type: force content-type for the request.
|
|
1969
|
+
:type _content_type: str, Optional
|
|
1970
|
+
:param _headers: set to override the headers for a single
|
|
1971
|
+
request; this effectively ignores the headers
|
|
1972
|
+
in the spec for a single request.
|
|
1973
|
+
:type _headers: dict, optional
|
|
1974
|
+
:param _host_index: set to override the host_index for a single
|
|
1975
|
+
request; this effectively ignores the host_index
|
|
1976
|
+
in the spec for a single request.
|
|
1977
|
+
:type _host_index: int, optional
|
|
1978
|
+
:return: Returns the result object.
|
|
1979
|
+
""" # noqa: E501
|
|
1980
|
+
|
|
1981
|
+
_param = self._update_enable_enhanced_context_chat_serialize(
|
|
1982
|
+
enable_enhanced_context_payload=enable_enhanced_context_payload,
|
|
1983
|
+
q_answer_api_key=q_answer_api_key,
|
|
1984
|
+
_request_auth=_request_auth,
|
|
1985
|
+
_content_type=_content_type,
|
|
1986
|
+
_headers=_headers,
|
|
1987
|
+
_host_index=_host_index
|
|
1988
|
+
)
|
|
1989
|
+
|
|
1990
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1991
|
+
'200': "EnableEnhancedContextResponse",
|
|
1992
|
+
'422': "HTTPValidationError",
|
|
1993
|
+
}
|
|
1994
|
+
response_data = self.api_client.call_api(
|
|
1995
|
+
*_param,
|
|
1996
|
+
_request_timeout=_request_timeout
|
|
1997
|
+
)
|
|
1998
|
+
return response_data.response
|
|
1999
|
+
|
|
2000
|
+
|
|
2001
|
+
def _update_enable_enhanced_context_chat_serialize(
|
|
2002
|
+
self,
|
|
2003
|
+
enable_enhanced_context_payload,
|
|
2004
|
+
q_answer_api_key,
|
|
2005
|
+
_request_auth,
|
|
2006
|
+
_content_type,
|
|
2007
|
+
_headers,
|
|
2008
|
+
_host_index,
|
|
2009
|
+
) -> RequestSerialized:
|
|
2010
|
+
|
|
2011
|
+
_host = None
|
|
2012
|
+
|
|
2013
|
+
_collection_formats: Dict[str, str] = {
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
_path_params: Dict[str, str] = {}
|
|
2017
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2018
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2019
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2020
|
+
_files: Dict[
|
|
2021
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2022
|
+
] = {}
|
|
2023
|
+
_body_params: Optional[bytes] = None
|
|
2024
|
+
|
|
2025
|
+
# process the path parameters
|
|
2026
|
+
# process the query parameters
|
|
2027
|
+
# process the header parameters
|
|
2028
|
+
if q_answer_api_key is not None:
|
|
2029
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
|
2030
|
+
# process the form parameters
|
|
2031
|
+
# process the body parameter
|
|
2032
|
+
if enable_enhanced_context_payload is not None:
|
|
2033
|
+
_body_params = enable_enhanced_context_payload
|
|
2034
|
+
|
|
2035
|
+
|
|
2036
|
+
# set the HTTP header `Accept`
|
|
2037
|
+
if 'Accept' not in _header_params:
|
|
2038
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2039
|
+
[
|
|
2040
|
+
'application/json'
|
|
2041
|
+
]
|
|
2042
|
+
)
|
|
2043
|
+
|
|
2044
|
+
# set the HTTP header `Content-Type`
|
|
2045
|
+
if _content_type:
|
|
2046
|
+
_header_params['Content-Type'] = _content_type
|
|
2047
|
+
else:
|
|
2048
|
+
_default_content_type = (
|
|
2049
|
+
self.api_client.select_header_content_type(
|
|
2050
|
+
[
|
|
2051
|
+
'application/json'
|
|
2052
|
+
]
|
|
2053
|
+
)
|
|
2054
|
+
)
|
|
2055
|
+
if _default_content_type is not None:
|
|
2056
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2057
|
+
|
|
2058
|
+
# authentication setting
|
|
2059
|
+
_auth_settings: List[str] = [
|
|
2060
|
+
'QAnswer-Api-Key',
|
|
2061
|
+
'Bearer token'
|
|
2062
|
+
]
|
|
2063
|
+
|
|
2064
|
+
return self.api_client.param_serialize(
|
|
2065
|
+
method='PUT',
|
|
2066
|
+
resource_path='/api/tasks/chat/enable-enhanced-context',
|
|
2067
|
+
path_params=_path_params,
|
|
2068
|
+
query_params=_query_params,
|
|
2069
|
+
header_params=_header_params,
|
|
2070
|
+
body=_body_params,
|
|
2071
|
+
post_params=_form_params,
|
|
2072
|
+
files=_files,
|
|
2073
|
+
auth_settings=_auth_settings,
|
|
2074
|
+
collection_formats=_collection_formats,
|
|
2075
|
+
_host=_host,
|
|
2076
|
+
_request_auth=_request_auth
|
|
2077
|
+
)
|
|
2078
|
+
|
|
2079
|
+
|