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.
Files changed (618) hide show
  1. qanswer_sdk/__init__.py +1256 -0
  2. qanswer_sdk/api/__init__.py +63 -0
  3. qanswer_sdk/api/admin_api.py +7893 -0
  4. qanswer_sdk/api/ai_assistant_access_rights_api.py +5881 -0
  5. qanswer_sdk/api/ai_assistant_api.py +11047 -0
  6. qanswer_sdk/api/anthropic_compatible_api.py +311 -0
  7. qanswer_sdk/api/auto_complete_api.py +612 -0
  8. qanswer_sdk/api/bot_slack_api.py +1015 -0
  9. qanswer_sdk/api/branding_api.py +5733 -0
  10. qanswer_sdk/api/bulk_reindex_api.py +2029 -0
  11. qanswer_sdk/api/chatbot_api.py +1102 -0
  12. qanswer_sdk/api/connector_audio_api.py +3469 -0
  13. qanswer_sdk/api/connector_document_api.py +2685 -0
  14. qanswer_sdk/api/connector_e_consilium_api.py +333 -0
  15. qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1231 -0
  16. qanswer_sdk/api/connector_google_drive_api.py +2175 -0
  17. qanswer_sdk/api/connector_imapapi_api.py +1866 -0
  18. qanswer_sdk/api/connector_one_drive_api.py +1579 -0
  19. qanswer_sdk/api/connector_onenote_api.py +1596 -0
  20. qanswer_sdk/api/connector_pinecone_api.py +893 -0
  21. qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
  22. qanswer_sdk/api/connector_qn_a_api.py +1521 -0
  23. qanswer_sdk/api/connector_rdf_answer_api.py +1454 -0
  24. qanswer_sdk/api/connector_rdf_api.py +5090 -0
  25. qanswer_sdk/api/connector_sharepoint_api.py +3926 -0
  26. qanswer_sdk/api/connector_websearch_api.py +332 -0
  27. qanswer_sdk/api/connector_website_api.py +3108 -0
  28. qanswer_sdk/api/connector_x_wiki_api_api.py +1278 -0
  29. qanswer_sdk/api/connectors_api.py +6946 -0
  30. qanswer_sdk/api/connectors_data_api.py +5903 -0
  31. qanswer_sdk/api/conversation_logs_api.py +14228 -0
  32. qanswer_sdk/api/dataset_config_api.py +4016 -0
  33. qanswer_sdk/api/debug_api.py +278 -0
  34. qanswer_sdk/api/default_api.py +763 -0
  35. qanswer_sdk/api/frontend_config_api.py +270 -0
  36. qanswer_sdk/api/health_check_api_api.py +278 -0
  37. qanswer_sdk/api/mcp_api.py +10758 -0
  38. qanswer_sdk/api/metadata_api.py +1309 -0
  39. qanswer_sdk/api/notifications_api.py +1842 -0
  40. qanswer_sdk/api/o_auth2_api.py +648 -0
  41. qanswer_sdk/api/open_ai_compatible_api.py +1093 -0
  42. qanswer_sdk/api/payment_api.py +1854 -0
  43. qanswer_sdk/api/retention_policy_api.py +4404 -0
  44. qanswer_sdk/api/socket_api.py +4706 -0
  45. qanswer_sdk/api/speech_to_text_api.py +968 -0
  46. qanswer_sdk/api/task_ai_excel_api.py +3749 -0
  47. qanswer_sdk/api/task_chat_api.py +2079 -0
  48. qanswer_sdk/api/task_entity_linking_api.py +315 -0
  49. qanswer_sdk/api/task_rdf_linker_api.py +4407 -0
  50. qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3355 -0
  51. qanswer_sdk/api/task_rdf_text_linker_api.py +1513 -0
  52. qanswer_sdk/api/task_report_copilot_api.py +7355 -0
  53. qanswer_sdk/api/task_search_api.py +2142 -0
  54. qanswer_sdk/api/task_text2sparql_api.py +947 -0
  55. qanswer_sdk/api/task_text_classification_api.py +592 -0
  56. qanswer_sdk/api/tasks_api.py +26394 -0
  57. qanswer_sdk/api/tool_embedder_api.py +5532 -0
  58. qanswer_sdk/api/tool_llm_api.py +6364 -0
  59. qanswer_sdk/api/unit_organizations_api.py +8600 -0
  60. qanswer_sdk/api/unit_teams_api.py +4492 -0
  61. qanswer_sdk/api/unit_user_api.py +12759 -0
  62. qanswer_sdk/api_client.py +804 -0
  63. qanswer_sdk/api_response.py +21 -0
  64. qanswer_sdk/configuration.py +614 -0
  65. qanswer_sdk/exceptions.py +216 -0
  66. qanswer_sdk/models/__init__.py +562 -0
  67. qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
  68. qanswer_sdk/models/access_pdf_payload_model.py +102 -0
  69. qanswer_sdk/models/access_type.py +42 -0
  70. qanswer_sdk/models/access_type_shared.py +38 -0
  71. qanswer_sdk/models/add_qn_a_request.py +103 -0
  72. qanswer_sdk/models/add_synonyms.py +93 -0
  73. qanswer_sdk/models/add_synonyms_resp.py +89 -0
  74. qanswer_sdk/models/admin_overall_stats_response.py +105 -0
  75. qanswer_sdk/models/admin_user_overall_stats.py +99 -0
  76. qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
  77. qanswer_sdk/models/aggregate.py +93 -0
  78. qanswer_sdk/models/aggregation.py +110 -0
  79. qanswer_sdk/models/aggregation_type.py +41 -0
  80. qanswer_sdk/models/aggregations_group.py +102 -0
  81. qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
  82. qanswer_sdk/models/ai_assistant_dto.py +113 -0
  83. qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
  84. qanswer_sdk/models/ai_assistant_list.py +101 -0
  85. qanswer_sdk/models/ai_assistant_share_response.py +93 -0
  86. qanswer_sdk/models/ai_assistant_shared_access.py +95 -0
  87. qanswer_sdk/models/ai_excel_entity_result.py +97 -0
  88. qanswer_sdk/models/ai_excel_entity_search_payload.py +95 -0
  89. qanswer_sdk/models/ai_excel_entity_search_response.py +103 -0
  90. qanswer_sdk/models/ai_excel_global_settings.py +95 -0
  91. qanswer_sdk/models/ai_excel_global_settings_request.py +95 -0
  92. qanswer_sdk/models/ai_excel_task_settings.py +119 -0
  93. qanswer_sdk/models/ai_excel_task_update.py +119 -0
  94. qanswer_sdk/models/ai_excel_template_create.py +119 -0
  95. qanswer_sdk/models/ai_excel_template_read.py +121 -0
  96. qanswer_sdk/models/ai_excel_template_settings_request.py +91 -0
  97. qanswer_sdk/models/ai_excel_template_update.py +125 -0
  98. qanswer_sdk/models/ai_excel_templates_search_request.py +104 -0
  99. qanswer_sdk/models/ai_excel_templates_search_response.py +101 -0
  100. qanswer_sdk/models/allowed_extension.py +53 -0
  101. qanswer_sdk/models/allowed_file_extensions.py +88 -0
  102. qanswer_sdk/models/api_key_header_type.py +39 -0
  103. qanswer_sdk/models/api_key_mcp_authentication_config.py +98 -0
  104. qanswer_sdk/models/applied_filter_type.py +37 -0
  105. qanswer_sdk/models/applied_metadata_filter.py +97 -0
  106. qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
  107. qanswer_sdk/models/assistant_category_color_definition.py +89 -0
  108. qanswer_sdk/models/assistant_category_color_item.py +89 -0
  109. qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
  110. qanswer_sdk/models/assistant_category_count.py +91 -0
  111. qanswer_sdk/models/assistant_message_stop.py +93 -0
  112. qanswer_sdk/models/assistant_retention_response.py +97 -0
  113. qanswer_sdk/models/assistant_task.py +43 -0
  114. qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +123 -0
  115. qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
  116. qanswer_sdk/models/audio_format.py +37 -0
  117. qanswer_sdk/models/audio_segment.py +95 -0
  118. qanswer_sdk/models/audio_segment_update_payload.py +97 -0
  119. qanswer_sdk/models/audio_segment_update_response.py +91 -0
  120. qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
  121. qanswer_sdk/models/audio_speaker_update_response.py +91 -0
  122. qanswer_sdk/models/audio_transcription_list_response.py +101 -0
  123. qanswer_sdk/models/audio_transcription_mode.py +37 -0
  124. qanswer_sdk/models/audio_transcription_record.py +101 -0
  125. qanswer_sdk/models/audio_transcription_status.py +39 -0
  126. qanswer_sdk/models/audio_upload_response.py +91 -0
  127. qanswer_sdk/models/audio_word_segment.py +93 -0
  128. qanswer_sdk/models/audio_word_span_change.py +94 -0
  129. qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
  130. qanswer_sdk/models/audio_word_span_update_response.py +91 -0
  131. qanswer_sdk/models/audio_word_update_payload.py +100 -0
  132. qanswer_sdk/models/audio_word_update_response.py +91 -0
  133. qanswer_sdk/models/auth_link_response.py +91 -0
  134. qanswer_sdk/models/auto_bot_description_request.py +89 -0
  135. qanswer_sdk/models/auto_bot_description_response.py +87 -0
  136. qanswer_sdk/models/available_aggregation.py +92 -0
  137. qanswer_sdk/models/available_connectors_response.py +92 -0
  138. qanswer_sdk/models/available_logs_visibility_policy.py +91 -0
  139. qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
  140. qanswer_sdk/models/available_storage_preference.py +91 -0
  141. qanswer_sdk/models/base_connectors_response.py +89 -0
  142. qanswer_sdk/models/base_conversation_response.py +89 -0
  143. qanswer_sdk/models/base_feedback_response.py +89 -0
  144. qanswer_sdk/models/bot_answer_length.py +38 -0
  145. qanswer_sdk/models/branding_app_title.py +87 -0
  146. qanswer_sdk/models/branding_system_message.py +87 -0
  147. qanswer_sdk/models/bulk_reindex_counts_by_type.py +89 -0
  148. qanswer_sdk/models/bulk_reindex_item_status.py +41 -0
  149. qanswer_sdk/models/bulk_reindex_job_detail_dto.py +103 -0
  150. qanswer_sdk/models/bulk_reindex_job_dto.py +125 -0
  151. qanswer_sdk/models/bulk_reindex_job_item_dto.py +113 -0
  152. qanswer_sdk/models/bulk_reindex_job_item_sort_by.py +40 -0
  153. qanswer_sdk/models/bulk_reindex_job_status.py +41 -0
  154. qanswer_sdk/models/bulk_reindex_jobs_list_response.py +97 -0
  155. qanswer_sdk/models/bulk_reindex_preview_counts.py +99 -0
  156. qanswer_sdk/models/bulk_reindex_preview_request.py +91 -0
  157. qanswer_sdk/models/bulk_reindex_preview_response.py +102 -0
  158. qanswer_sdk/models/bulk_reindex_skip_reason.py +40 -0
  159. qanswer_sdk/models/bulk_reindex_sort_order.py +37 -0
  160. qanswer_sdk/models/bulk_reindex_submit_request.py +94 -0
  161. qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
  162. qanswer_sdk/models/capability_type.py +37 -0
  163. qanswer_sdk/models/cell.py +89 -0
  164. qanswer_sdk/models/change_password.py +89 -0
  165. qanswer_sdk/models/change_password_admin.py +89 -0
  166. qanswer_sdk/models/change_role.py +90 -0
  167. qanswer_sdk/models/chat_task_settings.py +141 -0
  168. qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
  169. qanswer_sdk/models/chat_task_update.py +139 -0
  170. qanswer_sdk/models/chatbot_chat_payload.py +150 -0
  171. qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
  172. qanswer_sdk/models/chatbot_llm_dto.py +120 -0
  173. qanswer_sdk/models/chatbot_response.py +143 -0
  174. qanswer_sdk/models/chatbot_setting_dto.py +99 -0
  175. qanswer_sdk/models/chatbot_setting_request.py +91 -0
  176. qanswer_sdk/models/class_info.py +89 -0
  177. qanswer_sdk/models/config.py +228 -0
  178. qanswer_sdk/models/config1.py +138 -0
  179. qanswer_sdk/models/connector_config_list_response.py +99 -0
  180. qanswer_sdk/models/connector_config_model.py +96 -0
  181. qanswer_sdk/models/connector_config_patch_payload.py +93 -0
  182. qanswer_sdk/models/connector_config_response.py +95 -0
  183. qanswer_sdk/models/connector_config_sync_response.py +93 -0
  184. qanswer_sdk/models/connector_config_type.py +37 -0
  185. qanswer_sdk/models/connector_model.py +114 -0
  186. qanswer_sdk/models/connector_type.py +51 -0
  187. qanswer_sdk/models/connector_type_dto.py +92 -0
  188. qanswer_sdk/models/connector_type_list_dto.py +95 -0
  189. qanswer_sdk/models/content_item.py +106 -0
  190. qanswer_sdk/models/content_item_type.py +39 -0
  191. qanswer_sdk/models/conversation_aggregations_request.py +107 -0
  192. qanswer_sdk/models/conversation_message.py +230 -0
  193. qanswer_sdk/models/conversation_message_error_key.py +52 -0
  194. qanswer_sdk/models/conversation_message_search_result.py +112 -0
  195. qanswer_sdk/models/conversation_model.py +144 -0
  196. qanswer_sdk/models/conversation_overall_stats.py +97 -0
  197. qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
  198. qanswer_sdk/models/conversation_retention_response.py +91 -0
  199. qanswer_sdk/models/conversation_statistics.py +95 -0
  200. qanswer_sdk/models/conversation_update.py +93 -0
  201. qanswer_sdk/models/conversation_users_stats.py +99 -0
  202. qanswer_sdk/models/conversation_users_stats_response.py +99 -0
  203. qanswer_sdk/models/coordinates.py +89 -0
  204. qanswer_sdk/models/cost_summary_dto.py +99 -0
  205. qanswer_sdk/models/create_connector_request.py +95 -0
  206. qanswer_sdk/models/create_connector_response.py +95 -0
  207. qanswer_sdk/models/create_imap_connector_request.py +105 -0
  208. qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
  209. qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
  210. qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
  211. qanswer_sdk/models/create_x_wiki_connector_request.py +103 -0
  212. qanswer_sdk/models/credits_info_dto.py +95 -0
  213. qanswer_sdk/models/credits_info_global_dto.py +97 -0
  214. qanswer_sdk/models/currency.py +38 -0
  215. qanswer_sdk/models/data.py +211 -0
  216. qanswer_sdk/models/data_filling_mode.py +39 -0
  217. qanswer_sdk/models/data_storage_preference.py +38 -0
  218. qanswer_sdk/models/dataset_config_request.py +138 -0
  219. qanswer_sdk/models/dataset_default_values_model.py +129 -0
  220. qanswer_sdk/models/dataset_detail.py +128 -0
  221. qanswer_sdk/models/dataset_detail_kg.py +88 -0
  222. qanswer_sdk/models/dataset_schema.py +193 -0
  223. qanswer_sdk/models/dataset_type.py +38 -0
  224. qanswer_sdk/models/dataset_update_object.py +185 -0
  225. qanswer_sdk/models/dataset_users_response.py +87 -0
  226. qanswer_sdk/models/default_prompt.py +100 -0
  227. qanswer_sdk/models/delete_connector_model.py +90 -0
  228. qanswer_sdk/models/delete_connector_request.py +99 -0
  229. qanswer_sdk/models/delete_connectors_response.py +89 -0
  230. qanswer_sdk/models/delete_files_status_response.py +91 -0
  231. qanswer_sdk/models/delete_index.py +91 -0
  232. qanswer_sdk/models/delete_index_resp.py +89 -0
  233. qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
  234. qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
  235. qanswer_sdk/models/delete_synonym.py +93 -0
  236. qanswer_sdk/models/delete_synonym_resp.py +89 -0
  237. qanswer_sdk/models/delete_synonyms.py +91 -0
  238. qanswer_sdk/models/diarization_queue_status.py +99 -0
  239. qanswer_sdk/models/document_content_response.py +91 -0
  240. qanswer_sdk/models/document_content_update_model.py +99 -0
  241. qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
  242. qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
  243. qanswer_sdk/models/document_parsing_task_settings.py +124 -0
  244. qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
  245. qanswer_sdk/models/document_parsing_task_update.py +121 -0
  246. qanswer_sdk/models/document_status_group.py +39 -0
  247. qanswer_sdk/models/document_status_response.py +89 -0
  248. qanswer_sdk/models/dummy_error.py +89 -0
  249. qanswer_sdk/models/duplicate_ai_excel_template_request.py +97 -0
  250. qanswer_sdk/models/duplicate_ai_excel_template_response.py +87 -0
  251. qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
  252. qanswer_sdk/models/duplicate_report_template_response.py +87 -0
  253. qanswer_sdk/models/e_consilium_connector_config.py +108 -0
  254. qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
  255. qanswer_sdk/models/econsilium_file_metadata.py +105 -0
  256. qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
  257. qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
  258. qanswer_sdk/models/effective_retention_dto.py +95 -0
  259. qanswer_sdk/models/email_folder.py +91 -0
  260. qanswer_sdk/models/email_request.py +87 -0
  261. qanswer_sdk/models/embedder_cost_filter.py +112 -0
  262. qanswer_sdk/models/embedder_cost_list.py +101 -0
  263. qanswer_sdk/models/embedder_create_dto.py +143 -0
  264. qanswer_sdk/models/embedder_detailed_dto.py +163 -0
  265. qanswer_sdk/models/embedder_dto.py +103 -0
  266. qanswer_sdk/models/embedder_list_dto.py +101 -0
  267. qanswer_sdk/models/embedder_ref.py +95 -0
  268. qanswer_sdk/models/embedder_update_dto.py +135 -0
  269. qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
  270. qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
  271. qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
  272. qanswer_sdk/models/embedding_endpoint_validation_response.py +90 -0
  273. qanswer_sdk/models/embedding_provider.py +44 -0
  274. qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
  275. qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
  276. qanswer_sdk/models/endpoint_status.py +38 -0
  277. qanswer_sdk/models/entity_description_dto.py +93 -0
  278. qanswer_sdk/models/entity_linking_payload.py +97 -0
  279. qanswer_sdk/models/entity_linking_response.py +97 -0
  280. qanswer_sdk/models/entity_model_in_linking.py +95 -0
  281. qanswer_sdk/models/es_meta_data.py +92 -0
  282. qanswer_sdk/models/es_meta_data_value.py +87 -0
  283. qanswer_sdk/models/evaluate_feedback_response.py +109 -0
  284. qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
  285. qanswer_sdk/models/extra_body.py +91 -0
  286. qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
  287. qanswer_sdk/models/extract_robot_links_payload.py +88 -0
  288. qanswer_sdk/models/extract_robot_links_response.py +88 -0
  289. qanswer_sdk/models/extraction_strategy.py +38 -0
  290. qanswer_sdk/models/fact.py +96 -0
  291. qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
  292. qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
  293. qanswer_sdk/models/feedback_model.py +132 -0
  294. qanswer_sdk/models/feedback_response.py +95 -0
  295. qanswer_sdk/models/feedback_update.py +105 -0
  296. qanswer_sdk/models/file_acl_principal.py +99 -0
  297. qanswer_sdk/models/file_acl_response.py +101 -0
  298. qanswer_sdk/models/file_es_meta_data.py +116 -0
  299. qanswer_sdk/models/file_failure_reason.py +49 -0
  300. qanswer_sdk/models/file_folder_model.py +117 -0
  301. qanswer_sdk/models/file_model.py +124 -0
  302. qanswer_sdk/models/file_status.py +43 -0
  303. qanswer_sdk/models/file_type.py +37 -0
  304. qanswer_sdk/models/file_upload_payload.py +107 -0
  305. qanswer_sdk/models/files_by_connector_model.py +89 -0
  306. qanswer_sdk/models/g_drive_connector_info.py +96 -0
  307. qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
  308. qanswer_sdk/models/g_drive_download_request.py +103 -0
  309. qanswer_sdk/models/g_drive_refresh_request.py +91 -0
  310. qanswer_sdk/models/generation_params.py +89 -0
  311. qanswer_sdk/models/get_connector_by_id_response.py +91 -0
  312. qanswer_sdk/models/get_conversation_response.py +95 -0
  313. qanswer_sdk/models/global_config_dto.py +155 -0
  314. qanswer_sdk/models/google_drive_connector_config.py +110 -0
  315. qanswer_sdk/models/guardrail_endpoint.py +112 -0
  316. qanswer_sdk/models/guardrail_mode.py +38 -0
  317. qanswer_sdk/models/highlight_audio_payload_model.py +100 -0
  318. qanswer_sdk/models/http_validation_error.py +95 -0
  319. qanswer_sdk/models/iframe_strategy.py +38 -0
  320. qanswer_sdk/models/image_url_detail.py +38 -0
  321. qanswer_sdk/models/imap_add_payload.py +105 -0
  322. qanswer_sdk/models/imap_additional_fields.py +101 -0
  323. qanswer_sdk/models/imap_file_metadata.py +108 -0
  324. qanswer_sdk/models/imap_search_response.py +113 -0
  325. qanswer_sdk/models/index_config.py +89 -0
  326. qanswer_sdk/models/install_response.py +89 -0
  327. qanswer_sdk/models/interface_origin.py +47 -0
  328. qanswer_sdk/models/ip2_geo_response.py +91 -0
  329. qanswer_sdk/models/is_enabled_response.py +87 -0
  330. qanswer_sdk/models/jwt_authentication_response.py +93 -0
  331. qanswer_sdk/models/label.py +89 -0
  332. qanswer_sdk/models/labeled_node.py +89 -0
  333. qanswer_sdk/models/language.py +38 -0
  334. qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
  335. qanswer_sdk/models/link.py +99 -0
  336. qanswer_sdk/models/link_extraction_response.py +97 -0
  337. qanswer_sdk/models/link_result_paginated.py +97 -0
  338. qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
  339. qanswer_sdk/models/linker.py +103 -0
  340. qanswer_sdk/models/linking_result.py +95 -0
  341. qanswer_sdk/models/links.py +99 -0
  342. qanswer_sdk/models/list_connectors_response.py +95 -0
  343. qanswer_sdk/models/list_conversation_response.py +105 -0
  344. qanswer_sdk/models/list_feedback_response.py +105 -0
  345. qanswer_sdk/models/list_files_connector_response.py +107 -0
  346. qanswer_sdk/models/list_socket_events.py +88 -0
  347. qanswer_sdk/models/list_synonyms_model.py +95 -0
  348. qanswer_sdk/models/llm_context_ranges.py +93 -0
  349. qanswer_sdk/models/llm_cost_filter.py +112 -0
  350. qanswer_sdk/models/llm_cost_list.py +101 -0
  351. qanswer_sdk/models/llm_create_dto.py +177 -0
  352. qanswer_sdk/models/llm_detailed_dto.py +198 -0
  353. qanswer_sdk/models/llm_dto.py +120 -0
  354. qanswer_sdk/models/llm_endpoint.py +179 -0
  355. qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
  356. qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
  357. qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
  358. qanswer_sdk/models/llm_endpoint_modality.py +37 -0
  359. qanswer_sdk/models/llm_endpoint_provider.py +44 -0
  360. qanswer_sdk/models/llm_endpoint_read.py +179 -0
  361. qanswer_sdk/models/llm_endpoint_validation_response.py +90 -0
  362. qanswer_sdk/models/llm_health_response.py +89 -0
  363. qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
  364. qanswer_sdk/models/llm_list_dto.py +101 -0
  365. qanswer_sdk/models/llm_update_dto.py +174 -0
  366. qanswer_sdk/models/location_details.py +97 -0
  367. qanswer_sdk/models/log_stats_request.py +100 -0
  368. qanswer_sdk/models/login_request.py +89 -0
  369. qanswer_sdk/models/logs_visibility_policy.py +38 -0
  370. qanswer_sdk/models/logs_visibility_policy_payload.py +92 -0
  371. qanswer_sdk/models/logs_visibility_policy_response.py +92 -0
  372. qanswer_sdk/models/mcp_auth_field_definition.py +98 -0
  373. qanswer_sdk/models/mcp_auth_field_type.py +37 -0
  374. qanswer_sdk/models/mcp_authentication_type.py +39 -0
  375. qanswer_sdk/models/mcp_connection.py +108 -0
  376. qanswer_sdk/models/mcp_connection_create.py +100 -0
  377. qanswer_sdk/models/mcp_server.py +146 -0
  378. qanswer_sdk/models/mcp_server_create.py +116 -0
  379. qanswer_sdk/models/mcp_server_type.py +37 -0
  380. qanswer_sdk/models/mcp_server_update.py +114 -0
  381. qanswer_sdk/models/mcp_tool_dto.py +131 -0
  382. qanswer_sdk/models/mcp_tool_info.py +95 -0
  383. qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
  384. qanswer_sdk/models/mcp_tool_sync_action.py +39 -0
  385. qanswer_sdk/models/mcp_tool_sync_diff.py +94 -0
  386. qanswer_sdk/models/mcp_tool_sync_preview.py +95 -0
  387. qanswer_sdk/models/mcp_tool_update.py +91 -0
  388. qanswer_sdk/models/mcp_transport.py +37 -0
  389. qanswer_sdk/models/mcp_visibility.py +38 -0
  390. qanswer_sdk/models/mcpo_auth2_authorize_body.py +105 -0
  391. qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
  392. qanswer_sdk/models/message_role.py +38 -0
  393. qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
  394. qanswer_sdk/models/microsoft_connector_config.py +110 -0
  395. qanswer_sdk/models/modify_connector_request.py +98 -0
  396. qanswer_sdk/models/modify_file_display_name_request.py +97 -0
  397. qanswer_sdk/models/notification_dto.py +114 -0
  398. qanswer_sdk/models/notification_filter.py +107 -0
  399. qanswer_sdk/models/notification_list_dto.py +101 -0
  400. qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
  401. qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
  402. qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +100 -0
  403. qanswer_sdk/models/notification_payload_conversation_shared_dto.py +96 -0
  404. qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
  405. qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
  406. qanswer_sdk/models/notification_read_dto.py +89 -0
  407. qanswer_sdk/models/notification_type.py +44 -0
  408. qanswer_sdk/models/o_auth_redirect_response.py +89 -0
  409. qanswer_sdk/models/o_auth_service_dto.py +89 -0
  410. qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
  411. qanswer_sdk/models/one_drive_download_request.py +103 -0
  412. qanswer_sdk/models/one_note_download_by_ids.py +91 -0
  413. qanswer_sdk/models/one_note_download_request.py +103 -0
  414. qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
  415. qanswer_sdk/models/org_llm_features_dto.py +89 -0
  416. qanswer_sdk/models/org_role.py +37 -0
  417. qanswer_sdk/models/org_user_profile_dto.py +210 -0
  418. qanswer_sdk/models/org_user_profile_list_dto.py +101 -0
  419. qanswer_sdk/models/organization_admin_dto.py +97 -0
  420. qanswer_sdk/models/organization_creation_dto.py +91 -0
  421. qanswer_sdk/models/organization_dto.py +93 -0
  422. qanswer_sdk/models/organization_list_dto.py +101 -0
  423. qanswer_sdk/models/organization_user_dto.py +101 -0
  424. qanswer_sdk/models/organization_user_list_dto.py +101 -0
  425. qanswer_sdk/models/paginated_report_templates.py +101 -0
  426. qanswer_sdk/models/password.py +89 -0
  427. qanswer_sdk/models/pinecone_index_model.py +91 -0
  428. qanswer_sdk/models/plan_dto.py +108 -0
  429. qanswer_sdk/models/predicted_class.py +89 -0
  430. qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
  431. qanswer_sdk/models/prepared_synonym_group.py +87 -0
  432. qanswer_sdk/models/pricing_plan.py +51 -0
  433. qanswer_sdk/models/pricing_type.py +38 -0
  434. qanswer_sdk/models/prompt_type.py +49 -0
  435. qanswer_sdk/models/provider.py +87 -0
  436. qanswer_sdk/models/publication_add_payload.py +105 -0
  437. qanswer_sdk/models/publication_file_metadata.py +105 -0
  438. qanswer_sdk/models/publication_office_additional_fields.py +111 -0
  439. qanswer_sdk/models/publication_office_connector_config.py +112 -0
  440. qanswer_sdk/models/publication_search_index_search_response.py +113 -0
  441. qanswer_sdk/models/qa_context.py +129 -0
  442. qanswer_sdk/models/qa_context_display_type.py +44 -0
  443. qanswer_sdk/models/qa_contexts.py +106 -0
  444. qanswer_sdk/models/qa_table.py +100 -0
  445. qanswer_sdk/models/qn_a_pair_model.py +103 -0
  446. qanswer_sdk/models/qn_a_pair_response.py +95 -0
  447. qanswer_sdk/models/rag_payload.py +185 -0
  448. qanswer_sdk/models/rag_response.py +147 -0
  449. qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
  450. qanswer_sdk/models/rdf_linked_entity.py +97 -0
  451. qanswer_sdk/models/reasoning_effort.py +39 -0
  452. qanswer_sdk/models/reference_model.py +99 -0
  453. qanswer_sdk/models/refresh_frequency.py +39 -0
  454. qanswer_sdk/models/refresh_token_request.py +87 -0
  455. qanswer_sdk/models/refresh_website_connector_links_payload.py +96 -0
  456. qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
  457. qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
  458. qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
  459. qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
  460. qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
  461. qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
  462. qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
  463. qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
  464. qanswer_sdk/models/report_copilot_slot_task_settings.py +121 -0
  465. qanswer_sdk/models/report_copilot_slot_task_settings_update.py +121 -0
  466. qanswer_sdk/models/report_copilot_task_settings.py +119 -0
  467. qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
  468. qanswer_sdk/models/report_copilot_task_update.py +119 -0
  469. qanswer_sdk/models/report_template.py +155 -0
  470. qanswer_sdk/models/report_template_create_payload.py +132 -0
  471. qanswer_sdk/models/report_template_image_upload_response.py +87 -0
  472. qanswer_sdk/models/report_template_simplified.py +116 -0
  473. qanswer_sdk/models/report_template_simplified_payload.py +91 -0
  474. qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
  475. qanswer_sdk/models/report_template_update_payload.py +136 -0
  476. qanswer_sdk/models/report_templates_search_payload.py +106 -0
  477. qanswer_sdk/models/reset_password.py +87 -0
  478. qanswer_sdk/models/response_audit_model.py +99 -0
  479. qanswer_sdk/models/response_audit_stats_response.py +101 -0
  480. qanswer_sdk/models/response_get_dummy_union_connector_config_model_api_connectors_config_dummy_models_union_get.py +228 -0
  481. qanswer_sdk/models/retention_policy_dto.py +106 -0
  482. qanswer_sdk/models/retention_policy_update.py +101 -0
  483. qanswer_sdk/models/retention_preview_response.py +92 -0
  484. qanswer_sdk/models/retention_run_progress_event.py +98 -0
  485. qanswer_sdk/models/retention_run_status_response.py +91 -0
  486. qanswer_sdk/models/retention_scope_type.py +38 -0
  487. qanswer_sdk/models/retention_sweep_result.py +89 -0
  488. qanswer_sdk/models/retention_unit.py +38 -0
  489. qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
  490. qanswer_sdk/models/retry_params.py +89 -0
  491. qanswer_sdk/models/return_type.py +38 -0
  492. qanswer_sdk/models/role.py +90 -0
  493. qanswer_sdk/models/role_name.py +37 -0
  494. qanswer_sdk/models/scrolling_strategy.py +37 -0
  495. qanswer_sdk/models/search_conversation_messages_response.py +105 -0
  496. qanswer_sdk/models/search_document_response.py +107 -0
  497. qanswer_sdk/models/search_index_payload.py +114 -0
  498. qanswer_sdk/models/search_metadata_filter.py +94 -0
  499. qanswer_sdk/models/search_payload.py +150 -0
  500. qanswer_sdk/models/search_response.py +120 -0
  501. qanswer_sdk/models/search_synonyms_resp.py +91 -0
  502. qanswer_sdk/models/search_task_settings.py +135 -0
  503. qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
  504. qanswer_sdk/models/search_task_update.py +133 -0
  505. qanswer_sdk/models/sender_type.py +38 -0
  506. qanswer_sdk/models/serve_pdf200_response.py +87 -0
  507. qanswer_sdk/models/share_point_connector_settings.py +99 -0
  508. qanswer_sdk/models/share_point_download_by_ids.py +99 -0
  509. qanswer_sdk/models/share_point_download_request.py +103 -0
  510. qanswer_sdk/models/shared_by.py +38 -0
  511. qanswer_sdk/models/shared_entity_type.py +38 -0
  512. qanswer_sdk/models/shared_organization_access_dto.py +116 -0
  513. qanswer_sdk/models/shared_team_access_dto.py +116 -0
  514. qanswer_sdk/models/shared_user.py +90 -0
  515. qanswer_sdk/models/sign_out_request.py +87 -0
  516. qanswer_sdk/models/sign_up_request.py +99 -0
  517. qanswer_sdk/models/slot.py +153 -0
  518. qanswer_sdk/models/slot_history_entry.py +119 -0
  519. qanswer_sdk/models/slot_in_prompt.py +91 -0
  520. qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
  521. qanswer_sdk/models/slot_update.py +133 -0
  522. qanswer_sdk/models/socker_join_user.py +91 -0
  523. qanswer_sdk/models/socket_audio_transcription_status.py +102 -0
  524. qanswer_sdk/models/socket_conversation_message.py +245 -0
  525. qanswer_sdk/models/socket_dataset_reindexing_status.py +97 -0
  526. qanswer_sdk/models/socket_events_q_answer.py +55 -0
  527. qanswer_sdk/models/socket_feedback_evaluation_progress.py +108 -0
  528. qanswer_sdk/models/socket_file_metadata.py +194 -0
  529. qanswer_sdk/models/socket_file_status_batch.py +103 -0
  530. qanswer_sdk/models/socket_file_status_item.py +99 -0
  531. qanswer_sdk/models/socket_join_conversation.py +97 -0
  532. qanswer_sdk/models/socket_join_dataset.py +93 -0
  533. qanswer_sdk/models/socket_message_status.py +40 -0
  534. qanswer_sdk/models/socket_notification.py +109 -0
  535. qanswer_sdk/models/socket_report_continuation_response.py +100 -0
  536. qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +116 -0
  537. qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +116 -0
  538. qanswer_sdk/models/socket_report_copilot_refinement_response.py +102 -0
  539. qanswer_sdk/models/socket_speech2_text_response.py +122 -0
  540. qanswer_sdk/models/socket_stop_conversation.py +97 -0
  541. qanswer_sdk/models/source.py +125 -0
  542. qanswer_sdk/models/source_metadata.py +109 -0
  543. qanswer_sdk/models/speech2_text_response.py +110 -0
  544. qanswer_sdk/models/stat_per_date.py +89 -0
  545. qanswer_sdk/models/status_response.py +89 -0
  546. qanswer_sdk/models/storage_active_status.py +37 -0
  547. qanswer_sdk/models/subscription_response.py +92 -0
  548. qanswer_sdk/models/subscription_status.py +39 -0
  549. qanswer_sdk/models/suggested_replies.py +87 -0
  550. qanswer_sdk/models/suggestion_list_response.py +87 -0
  551. qanswer_sdk/models/summa_server.py +101 -0
  552. qanswer_sdk/models/task_category.py +61 -0
  553. qanswer_sdk/models/task_name.py +43 -0
  554. qanswer_sdk/models/team_admin_dto.py +95 -0
  555. qanswer_sdk/models/team_creation_dto.py +89 -0
  556. qanswer_sdk/models/team_dto.py +93 -0
  557. qanswer_sdk/models/team_list_dto.py +101 -0
  558. qanswer_sdk/models/team_list_dto_teams_inner.py +149 -0
  559. qanswer_sdk/models/team_role.py +37 -0
  560. qanswer_sdk/models/team_with_count_dto.py +95 -0
  561. qanswer_sdk/models/teams_bot_auth_type.py +38 -0
  562. qanswer_sdk/models/teams_bot_registration_dto.py +107 -0
  563. qanswer_sdk/models/teams_bot_registration_upsert_dto.py +105 -0
  564. qanswer_sdk/models/template_clip_structure.py +114 -0
  565. qanswer_sdk/models/template_toggle_request.py +93 -0
  566. qanswer_sdk/models/terms_bucket.py +107 -0
  567. qanswer_sdk/models/test_imap_connection_payload.py +95 -0
  568. qanswer_sdk/models/text2_sparql_payload.py +187 -0
  569. qanswer_sdk/models/text2_sparql_task_settings.py +119 -0
  570. qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
  571. qanswer_sdk/models/text2_sparql_task_update.py +119 -0
  572. qanswer_sdk/models/text_classification_payload.py +99 -0
  573. qanswer_sdk/models/text_classification_response.py +87 -0
  574. qanswer_sdk/models/text_classification_v2_payload.py +99 -0
  575. qanswer_sdk/models/text_classification_v2_response.py +95 -0
  576. qanswer_sdk/models/thinking_block.py +91 -0
  577. qanswer_sdk/models/tool_selection.py +89 -0
  578. qanswer_sdk/models/total_stat.py +96 -0
  579. qanswer_sdk/models/ui_mappings.py +141 -0
  580. qanswer_sdk/models/update_file_es_meta_data.py +116 -0
  581. qanswer_sdk/models/update_metadata_model.py +97 -0
  582. qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
  583. qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
  584. qanswer_sdk/models/update_synonyms.py +95 -0
  585. qanswer_sdk/models/update_synonyms_resp.py +89 -0
  586. qanswer_sdk/models/upload_metadata.py +115 -0
  587. qanswer_sdk/models/user_credits_config_dto.py +99 -0
  588. qanswer_sdk/models/user_credits_dto.py +106 -0
  589. qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
  590. qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +100 -0
  591. qanswer_sdk/models/user_dto.py +91 -0
  592. qanswer_sdk/models/user_identity_availability.py +87 -0
  593. qanswer_sdk/models/user_info_dto.py +95 -0
  594. qanswer_sdk/models/user_list_dto.py +101 -0
  595. qanswer_sdk/models/user_log_dto.py +102 -0
  596. qanswer_sdk/models/user_logs_list_dto.py +97 -0
  597. qanswer_sdk/models/user_mcp_tool_selection_dto.py +107 -0
  598. qanswer_sdk/models/user_oauth_token_dto.py +96 -0
  599. qanswer_sdk/models/user_profile_dto.py +199 -0
  600. qanswer_sdk/models/user_profile_list_dto.py +101 -0
  601. qanswer_sdk/models/user_team_dto.py +94 -0
  602. qanswer_sdk/models/validation_error.py +108 -0
  603. qanswer_sdk/models/validation_error_loc_inner.py +138 -0
  604. qanswer_sdk/models/warn_visibility.py +40 -0
  605. qanswer_sdk/models/websearch_connector_config.py +102 -0
  606. qanswer_sdk/models/websearch_scraping_site.py +91 -0
  607. qanswer_sdk/models/website_add_payload.py +102 -0
  608. qanswer_sdk/models/website_connector_config.py +102 -0
  609. qanswer_sdk/models/website_connector_settings.py +123 -0
  610. qanswer_sdk/models/widget_configs.py +109 -0
  611. qanswer_sdk/models/x_wiki_add_request.py +97 -0
  612. qanswer_sdk/models/x_wiki_download_by_ids.py +89 -0
  613. qanswer_sdk/py.typed +0 -0
  614. qanswer_sdk/rest.py +258 -0
  615. qanswer_sdk-0.1.0.dev0.dist-info/METADATA +252 -0
  616. qanswer_sdk-0.1.0.dev0.dist-info/RECORD +618 -0
  617. qanswer_sdk-0.1.0.dev0.dist-info/WHEEL +5 -0
  618. qanswer_sdk-0.1.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2142 @@
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 List, Optional
21
+ from typing_extensions import Annotated
22
+ from qanswer_sdk.models.aggregations_group import AggregationsGroup
23
+ from qanswer_sdk.models.available_aggregation import AvailableAggregation
24
+ from qanswer_sdk.models.enable_enhanced_context_payload import EnableEnhancedContextPayload
25
+ from qanswer_sdk.models.enable_enhanced_context_response import EnableEnhancedContextResponse
26
+ from qanswer_sdk.models.rag_payload import RAGPayload
27
+ from qanswer_sdk.models.rag_response import RAGResponse
28
+ from qanswer_sdk.models.search_payload import SearchPayload
29
+ from qanswer_sdk.models.search_response import SearchResponse
30
+ from qanswer_sdk.models.search_task_settings import SearchTaskSettings
31
+ from qanswer_sdk.models.search_task_settings_update_payload import SearchTaskSettingsUpdatePayload
32
+
33
+ from qanswer_sdk.api_client import ApiClient, RequestSerialized
34
+ from qanswer_sdk.api_response import ApiResponse
35
+ from qanswer_sdk.rest import RESTResponseType
36
+
37
+
38
+ class TaskSearchApi:
39
+ """NOTE: This class is auto generated by OpenAPI Generator
40
+ Ref: https://openapi-generator.tech
41
+
42
+ Do not edit the class manually.
43
+ """
44
+
45
+ def __init__(self, api_client=None) -> None:
46
+ if api_client is None:
47
+ api_client = ApiClient.get_default()
48
+ self.api_client = api_client
49
+
50
+
51
+ @validate_call
52
+ def get_aggregation_values(
53
+ self,
54
+ username: Annotated[StrictStr, Field(description="Username")],
55
+ dataset: Annotated[StrictStr, Field(description="Dataset")],
56
+ var_field: Annotated[StrictStr, Field(description="Aggregation field name")],
57
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
58
+ _request_timeout: Union[
59
+ None,
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Tuple[
62
+ Annotated[StrictFloat, Field(gt=0)],
63
+ Annotated[StrictFloat, Field(gt=0)]
64
+ ]
65
+ ] = None,
66
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
67
+ _content_type: Optional[StrictStr] = None,
68
+ _headers: Optional[Dict[StrictStr, Any]] = None,
69
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
70
+ ) -> List[AggregationsGroup]:
71
+ """Get Aggregation Values
72
+
73
+ Return the unfiltered buckets of one aggregation field, so admins can pick default filter values while configuring a search/chat task.
74
+
75
+ :param username: Username (required)
76
+ :type username: str
77
+ :param dataset: Dataset (required)
78
+ :type dataset: str
79
+ :param var_field: Aggregation field name (required)
80
+ :type var_field: str
81
+ :param q_answer_api_key: Optional QAnswer API key
82
+ :type q_answer_api_key: str
83
+ :param _request_timeout: timeout setting for this request. If one
84
+ number provided, it will be total request
85
+ timeout. It can also be a pair (tuple) of
86
+ (connection, read) timeouts.
87
+ :type _request_timeout: int, tuple(int, int), optional
88
+ :param _request_auth: set to override the auth_settings for an a single
89
+ request; this effectively ignores the
90
+ authentication in the spec for a single request.
91
+ :type _request_auth: dict, optional
92
+ :param _content_type: force content-type for the request.
93
+ :type _content_type: str, Optional
94
+ :param _headers: set to override the headers for a single
95
+ request; this effectively ignores the headers
96
+ in the spec for a single request.
97
+ :type _headers: dict, optional
98
+ :param _host_index: set to override the host_index for a single
99
+ request; this effectively ignores the host_index
100
+ in the spec for a single request.
101
+ :type _host_index: int, optional
102
+ :return: Returns the result object.
103
+ """ # noqa: E501
104
+
105
+ _param = self._get_aggregation_values_serialize(
106
+ username=username,
107
+ dataset=dataset,
108
+ var_field=var_field,
109
+ q_answer_api_key=q_answer_api_key,
110
+ _request_auth=_request_auth,
111
+ _content_type=_content_type,
112
+ _headers=_headers,
113
+ _host_index=_host_index
114
+ )
115
+
116
+ _response_types_map: Dict[str, Optional[str]] = {
117
+ '200': "List[AggregationsGroup]",
118
+ '422': "HTTPValidationError",
119
+ }
120
+ response_data = self.api_client.call_api(
121
+ *_param,
122
+ _request_timeout=_request_timeout
123
+ )
124
+ response_data.read()
125
+ return self.api_client.response_deserialize(
126
+ response_data=response_data,
127
+ response_types_map=_response_types_map,
128
+ ).data
129
+
130
+
131
+ @validate_call
132
+ def get_aggregation_values_with_http_info(
133
+ self,
134
+ username: Annotated[StrictStr, Field(description="Username")],
135
+ dataset: Annotated[StrictStr, Field(description="Dataset")],
136
+ var_field: Annotated[StrictStr, Field(description="Aggregation field name")],
137
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
138
+ _request_timeout: Union[
139
+ None,
140
+ Annotated[StrictFloat, Field(gt=0)],
141
+ Tuple[
142
+ Annotated[StrictFloat, Field(gt=0)],
143
+ Annotated[StrictFloat, Field(gt=0)]
144
+ ]
145
+ ] = None,
146
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
147
+ _content_type: Optional[StrictStr] = None,
148
+ _headers: Optional[Dict[StrictStr, Any]] = None,
149
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
150
+ ) -> ApiResponse[List[AggregationsGroup]]:
151
+ """Get Aggregation Values
152
+
153
+ Return the unfiltered buckets of one aggregation field, so admins can pick default filter values while configuring a search/chat task.
154
+
155
+ :param username: Username (required)
156
+ :type username: str
157
+ :param dataset: Dataset (required)
158
+ :type dataset: str
159
+ :param var_field: Aggregation field name (required)
160
+ :type var_field: str
161
+ :param q_answer_api_key: Optional QAnswer API key
162
+ :type q_answer_api_key: str
163
+ :param _request_timeout: timeout setting for this request. If one
164
+ number provided, it will be total request
165
+ timeout. It can also be a pair (tuple) of
166
+ (connection, read) timeouts.
167
+ :type _request_timeout: int, tuple(int, int), optional
168
+ :param _request_auth: set to override the auth_settings for an a single
169
+ request; this effectively ignores the
170
+ authentication in the spec for a single request.
171
+ :type _request_auth: dict, optional
172
+ :param _content_type: force content-type for the request.
173
+ :type _content_type: str, Optional
174
+ :param _headers: set to override the headers for a single
175
+ request; this effectively ignores the headers
176
+ in the spec for a single request.
177
+ :type _headers: dict, optional
178
+ :param _host_index: set to override the host_index for a single
179
+ request; this effectively ignores the host_index
180
+ in the spec for a single request.
181
+ :type _host_index: int, optional
182
+ :return: Returns the result object.
183
+ """ # noqa: E501
184
+
185
+ _param = self._get_aggregation_values_serialize(
186
+ username=username,
187
+ dataset=dataset,
188
+ var_field=var_field,
189
+ q_answer_api_key=q_answer_api_key,
190
+ _request_auth=_request_auth,
191
+ _content_type=_content_type,
192
+ _headers=_headers,
193
+ _host_index=_host_index
194
+ )
195
+
196
+ _response_types_map: Dict[str, Optional[str]] = {
197
+ '200': "List[AggregationsGroup]",
198
+ '422': "HTTPValidationError",
199
+ }
200
+ response_data = self.api_client.call_api(
201
+ *_param,
202
+ _request_timeout=_request_timeout
203
+ )
204
+ response_data.read()
205
+ return self.api_client.response_deserialize(
206
+ response_data=response_data,
207
+ response_types_map=_response_types_map,
208
+ )
209
+
210
+
211
+ @validate_call
212
+ def get_aggregation_values_without_preload_content(
213
+ self,
214
+ username: Annotated[StrictStr, Field(description="Username")],
215
+ dataset: Annotated[StrictStr, Field(description="Dataset")],
216
+ var_field: Annotated[StrictStr, Field(description="Aggregation field name")],
217
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
218
+ _request_timeout: Union[
219
+ None,
220
+ Annotated[StrictFloat, Field(gt=0)],
221
+ Tuple[
222
+ Annotated[StrictFloat, Field(gt=0)],
223
+ Annotated[StrictFloat, Field(gt=0)]
224
+ ]
225
+ ] = None,
226
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
227
+ _content_type: Optional[StrictStr] = None,
228
+ _headers: Optional[Dict[StrictStr, Any]] = None,
229
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
230
+ ) -> RESTResponseType:
231
+ """Get Aggregation Values
232
+
233
+ Return the unfiltered buckets of one aggregation field, so admins can pick default filter values while configuring a search/chat task.
234
+
235
+ :param username: Username (required)
236
+ :type username: str
237
+ :param dataset: Dataset (required)
238
+ :type dataset: str
239
+ :param var_field: Aggregation field name (required)
240
+ :type var_field: str
241
+ :param q_answer_api_key: Optional QAnswer API key
242
+ :type q_answer_api_key: str
243
+ :param _request_timeout: timeout setting for this request. If one
244
+ number provided, it will be total request
245
+ timeout. It can also be a pair (tuple) of
246
+ (connection, read) timeouts.
247
+ :type _request_timeout: int, tuple(int, int), optional
248
+ :param _request_auth: set to override the auth_settings for an a single
249
+ request; this effectively ignores the
250
+ authentication in the spec for a single request.
251
+ :type _request_auth: dict, optional
252
+ :param _content_type: force content-type for the request.
253
+ :type _content_type: str, Optional
254
+ :param _headers: set to override the headers for a single
255
+ request; this effectively ignores the headers
256
+ in the spec for a single request.
257
+ :type _headers: dict, optional
258
+ :param _host_index: set to override the host_index for a single
259
+ request; this effectively ignores the host_index
260
+ in the spec for a single request.
261
+ :type _host_index: int, optional
262
+ :return: Returns the result object.
263
+ """ # noqa: E501
264
+
265
+ _param = self._get_aggregation_values_serialize(
266
+ username=username,
267
+ dataset=dataset,
268
+ var_field=var_field,
269
+ q_answer_api_key=q_answer_api_key,
270
+ _request_auth=_request_auth,
271
+ _content_type=_content_type,
272
+ _headers=_headers,
273
+ _host_index=_host_index
274
+ )
275
+
276
+ _response_types_map: Dict[str, Optional[str]] = {
277
+ '200': "List[AggregationsGroup]",
278
+ '422': "HTTPValidationError",
279
+ }
280
+ response_data = self.api_client.call_api(
281
+ *_param,
282
+ _request_timeout=_request_timeout
283
+ )
284
+ return response_data.response
285
+
286
+
287
+ def _get_aggregation_values_serialize(
288
+ self,
289
+ username,
290
+ dataset,
291
+ var_field,
292
+ q_answer_api_key,
293
+ _request_auth,
294
+ _content_type,
295
+ _headers,
296
+ _host_index,
297
+ ) -> RequestSerialized:
298
+
299
+ _host = None
300
+
301
+ _collection_formats: Dict[str, str] = {
302
+ }
303
+
304
+ _path_params: Dict[str, str] = {}
305
+ _query_params: List[Tuple[str, str]] = []
306
+ _header_params: Dict[str, Optional[str]] = _headers or {}
307
+ _form_params: List[Tuple[str, str]] = []
308
+ _files: Dict[
309
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
310
+ ] = {}
311
+ _body_params: Optional[bytes] = None
312
+
313
+ # process the path parameters
314
+ # process the query parameters
315
+ if username is not None:
316
+
317
+ _query_params.append(('username', username))
318
+
319
+ if dataset is not None:
320
+
321
+ _query_params.append(('dataset', dataset))
322
+
323
+ if var_field is not None:
324
+
325
+ _query_params.append(('field', var_field))
326
+
327
+ # process the header parameters
328
+ if q_answer_api_key is not None:
329
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
330
+ # process the form parameters
331
+ # process the body parameter
332
+
333
+
334
+ # set the HTTP header `Accept`
335
+ if 'Accept' not in _header_params:
336
+ _header_params['Accept'] = self.api_client.select_header_accept(
337
+ [
338
+ 'application/json'
339
+ ]
340
+ )
341
+
342
+
343
+ # authentication setting
344
+ _auth_settings: List[str] = [
345
+ 'QAnswer-Api-Key',
346
+ 'Bearer token'
347
+ ]
348
+
349
+ return self.api_client.param_serialize(
350
+ method='GET',
351
+ resource_path='/api/tasks/search/aggregation-values',
352
+ path_params=_path_params,
353
+ query_params=_query_params,
354
+ header_params=_header_params,
355
+ body=_body_params,
356
+ post_params=_form_params,
357
+ files=_files,
358
+ auth_settings=_auth_settings,
359
+ collection_formats=_collection_formats,
360
+ _host=_host,
361
+ _request_auth=_request_auth
362
+ )
363
+
364
+
365
+
366
+
367
+ @validate_call
368
+ def get_available_aggregations(
369
+ self,
370
+ username: Annotated[StrictStr, Field(description="Username")],
371
+ dataset: Annotated[StrictStr, Field(description="Dataset")],
372
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
373
+ _request_timeout: Union[
374
+ None,
375
+ Annotated[StrictFloat, Field(gt=0)],
376
+ Tuple[
377
+ Annotated[StrictFloat, Field(gt=0)],
378
+ Annotated[StrictFloat, Field(gt=0)]
379
+ ]
380
+ ] = None,
381
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
382
+ _content_type: Optional[StrictStr] = None,
383
+ _headers: Optional[Dict[StrictStr, Any]] = None,
384
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
385
+ ) -> List[AvailableAggregation]:
386
+ """Get Available Aggregations
387
+
388
+
389
+ :param username: Username (required)
390
+ :type username: str
391
+ :param dataset: Dataset (required)
392
+ :type dataset: str
393
+ :param q_answer_api_key: Optional QAnswer API key
394
+ :type q_answer_api_key: str
395
+ :param _request_timeout: timeout setting for this request. If one
396
+ number provided, it will be total request
397
+ timeout. It can also be a pair (tuple) of
398
+ (connection, read) timeouts.
399
+ :type _request_timeout: int, tuple(int, int), optional
400
+ :param _request_auth: set to override the auth_settings for an a single
401
+ request; this effectively ignores the
402
+ authentication in the spec for a single request.
403
+ :type _request_auth: dict, optional
404
+ :param _content_type: force content-type for the request.
405
+ :type _content_type: str, Optional
406
+ :param _headers: set to override the headers for a single
407
+ request; this effectively ignores the headers
408
+ in the spec for a single request.
409
+ :type _headers: dict, optional
410
+ :param _host_index: set to override the host_index for a single
411
+ request; this effectively ignores the host_index
412
+ in the spec for a single request.
413
+ :type _host_index: int, optional
414
+ :return: Returns the result object.
415
+ """ # noqa: E501
416
+
417
+ _param = self._get_available_aggregations_serialize(
418
+ username=username,
419
+ dataset=dataset,
420
+ q_answer_api_key=q_answer_api_key,
421
+ _request_auth=_request_auth,
422
+ _content_type=_content_type,
423
+ _headers=_headers,
424
+ _host_index=_host_index
425
+ )
426
+
427
+ _response_types_map: Dict[str, Optional[str]] = {
428
+ '200': "List[AvailableAggregation]",
429
+ '422': "HTTPValidationError",
430
+ }
431
+ response_data = self.api_client.call_api(
432
+ *_param,
433
+ _request_timeout=_request_timeout
434
+ )
435
+ response_data.read()
436
+ return self.api_client.response_deserialize(
437
+ response_data=response_data,
438
+ response_types_map=_response_types_map,
439
+ ).data
440
+
441
+
442
+ @validate_call
443
+ def get_available_aggregations_with_http_info(
444
+ self,
445
+ username: Annotated[StrictStr, Field(description="Username")],
446
+ dataset: Annotated[StrictStr, Field(description="Dataset")],
447
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
448
+ _request_timeout: Union[
449
+ None,
450
+ Annotated[StrictFloat, Field(gt=0)],
451
+ Tuple[
452
+ Annotated[StrictFloat, Field(gt=0)],
453
+ Annotated[StrictFloat, Field(gt=0)]
454
+ ]
455
+ ] = None,
456
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
457
+ _content_type: Optional[StrictStr] = None,
458
+ _headers: Optional[Dict[StrictStr, Any]] = None,
459
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
460
+ ) -> ApiResponse[List[AvailableAggregation]]:
461
+ """Get Available Aggregations
462
+
463
+
464
+ :param username: Username (required)
465
+ :type username: str
466
+ :param dataset: Dataset (required)
467
+ :type dataset: str
468
+ :param q_answer_api_key: Optional QAnswer API key
469
+ :type q_answer_api_key: str
470
+ :param _request_timeout: timeout setting for this request. If one
471
+ number provided, it will be total request
472
+ timeout. It can also be a pair (tuple) of
473
+ (connection, read) timeouts.
474
+ :type _request_timeout: int, tuple(int, int), optional
475
+ :param _request_auth: set to override the auth_settings for an a single
476
+ request; this effectively ignores the
477
+ authentication in the spec for a single request.
478
+ :type _request_auth: dict, optional
479
+ :param _content_type: force content-type for the request.
480
+ :type _content_type: str, Optional
481
+ :param _headers: set to override the headers for a single
482
+ request; this effectively ignores the headers
483
+ in the spec for a single request.
484
+ :type _headers: dict, optional
485
+ :param _host_index: set to override the host_index for a single
486
+ request; this effectively ignores the host_index
487
+ in the spec for a single request.
488
+ :type _host_index: int, optional
489
+ :return: Returns the result object.
490
+ """ # noqa: E501
491
+
492
+ _param = self._get_available_aggregations_serialize(
493
+ username=username,
494
+ dataset=dataset,
495
+ q_answer_api_key=q_answer_api_key,
496
+ _request_auth=_request_auth,
497
+ _content_type=_content_type,
498
+ _headers=_headers,
499
+ _host_index=_host_index
500
+ )
501
+
502
+ _response_types_map: Dict[str, Optional[str]] = {
503
+ '200': "List[AvailableAggregation]",
504
+ '422': "HTTPValidationError",
505
+ }
506
+ response_data = self.api_client.call_api(
507
+ *_param,
508
+ _request_timeout=_request_timeout
509
+ )
510
+ response_data.read()
511
+ return self.api_client.response_deserialize(
512
+ response_data=response_data,
513
+ response_types_map=_response_types_map,
514
+ )
515
+
516
+
517
+ @validate_call
518
+ def get_available_aggregations_without_preload_content(
519
+ self,
520
+ username: Annotated[StrictStr, Field(description="Username")],
521
+ dataset: Annotated[StrictStr, Field(description="Dataset")],
522
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
523
+ _request_timeout: Union[
524
+ None,
525
+ Annotated[StrictFloat, Field(gt=0)],
526
+ Tuple[
527
+ Annotated[StrictFloat, Field(gt=0)],
528
+ Annotated[StrictFloat, Field(gt=0)]
529
+ ]
530
+ ] = None,
531
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
532
+ _content_type: Optional[StrictStr] = None,
533
+ _headers: Optional[Dict[StrictStr, Any]] = None,
534
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
535
+ ) -> RESTResponseType:
536
+ """Get Available Aggregations
537
+
538
+
539
+ :param username: Username (required)
540
+ :type username: str
541
+ :param dataset: Dataset (required)
542
+ :type dataset: str
543
+ :param q_answer_api_key: Optional QAnswer API key
544
+ :type q_answer_api_key: str
545
+ :param _request_timeout: timeout setting for this request. If one
546
+ number provided, it will be total request
547
+ timeout. It can also be a pair (tuple) of
548
+ (connection, read) timeouts.
549
+ :type _request_timeout: int, tuple(int, int), optional
550
+ :param _request_auth: set to override the auth_settings for an a single
551
+ request; this effectively ignores the
552
+ authentication in the spec for a single request.
553
+ :type _request_auth: dict, optional
554
+ :param _content_type: force content-type for the request.
555
+ :type _content_type: str, Optional
556
+ :param _headers: set to override the headers for a single
557
+ request; this effectively ignores the headers
558
+ in the spec for a single request.
559
+ :type _headers: dict, optional
560
+ :param _host_index: set to override the host_index for a single
561
+ request; this effectively ignores the host_index
562
+ in the spec for a single request.
563
+ :type _host_index: int, optional
564
+ :return: Returns the result object.
565
+ """ # noqa: E501
566
+
567
+ _param = self._get_available_aggregations_serialize(
568
+ username=username,
569
+ dataset=dataset,
570
+ q_answer_api_key=q_answer_api_key,
571
+ _request_auth=_request_auth,
572
+ _content_type=_content_type,
573
+ _headers=_headers,
574
+ _host_index=_host_index
575
+ )
576
+
577
+ _response_types_map: Dict[str, Optional[str]] = {
578
+ '200': "List[AvailableAggregation]",
579
+ '422': "HTTPValidationError",
580
+ }
581
+ response_data = self.api_client.call_api(
582
+ *_param,
583
+ _request_timeout=_request_timeout
584
+ )
585
+ return response_data.response
586
+
587
+
588
+ def _get_available_aggregations_serialize(
589
+ self,
590
+ username,
591
+ dataset,
592
+ q_answer_api_key,
593
+ _request_auth,
594
+ _content_type,
595
+ _headers,
596
+ _host_index,
597
+ ) -> RequestSerialized:
598
+
599
+ _host = None
600
+
601
+ _collection_formats: Dict[str, str] = {
602
+ }
603
+
604
+ _path_params: Dict[str, str] = {}
605
+ _query_params: List[Tuple[str, str]] = []
606
+ _header_params: Dict[str, Optional[str]] = _headers or {}
607
+ _form_params: List[Tuple[str, str]] = []
608
+ _files: Dict[
609
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
610
+ ] = {}
611
+ _body_params: Optional[bytes] = None
612
+
613
+ # process the path parameters
614
+ # process the query parameters
615
+ if username is not None:
616
+
617
+ _query_params.append(('username', username))
618
+
619
+ if dataset is not None:
620
+
621
+ _query_params.append(('dataset', dataset))
622
+
623
+ # process the header parameters
624
+ if q_answer_api_key is not None:
625
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
626
+ # process the form parameters
627
+ # process the body parameter
628
+
629
+
630
+ # set the HTTP header `Accept`
631
+ if 'Accept' not in _header_params:
632
+ _header_params['Accept'] = self.api_client.select_header_accept(
633
+ [
634
+ 'application/json'
635
+ ]
636
+ )
637
+
638
+
639
+ # authentication setting
640
+ _auth_settings: List[str] = [
641
+ 'QAnswer-Api-Key',
642
+ 'Bearer token'
643
+ ]
644
+
645
+ return self.api_client.param_serialize(
646
+ method='GET',
647
+ resource_path='/api/tasks/search/available-aggregations',
648
+ path_params=_path_params,
649
+ query_params=_query_params,
650
+ header_params=_header_params,
651
+ body=_body_params,
652
+ post_params=_form_params,
653
+ files=_files,
654
+ auth_settings=_auth_settings,
655
+ collection_formats=_collection_formats,
656
+ _host=_host,
657
+ _request_auth=_request_auth
658
+ )
659
+
660
+
661
+
662
+
663
+ @validate_call
664
+ def read_search_task_settings(
665
+ self,
666
+ username: StrictStr,
667
+ dataset: StrictStr,
668
+ organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
669
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
670
+ _request_timeout: Union[
671
+ None,
672
+ Annotated[StrictFloat, Field(gt=0)],
673
+ Tuple[
674
+ Annotated[StrictFloat, Field(gt=0)],
675
+ Annotated[StrictFloat, Field(gt=0)]
676
+ ]
677
+ ] = None,
678
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
679
+ _content_type: Optional[StrictStr] = None,
680
+ _headers: Optional[Dict[StrictStr, Any]] = None,
681
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
682
+ ) -> SearchTaskSettings:
683
+ """Read Search Task Settings
684
+
685
+
686
+ :param username: (required)
687
+ :type username: str
688
+ :param dataset: (required)
689
+ :type dataset: str
690
+ :param organization_id: organization identifier
691
+ :type organization_id: int
692
+ :param q_answer_api_key: Optional QAnswer API key
693
+ :type q_answer_api_key: str
694
+ :param _request_timeout: timeout setting for this request. If one
695
+ number provided, it will be total request
696
+ timeout. It can also be a pair (tuple) of
697
+ (connection, read) timeouts.
698
+ :type _request_timeout: int, tuple(int, int), optional
699
+ :param _request_auth: set to override the auth_settings for an a single
700
+ request; this effectively ignores the
701
+ authentication in the spec for a single request.
702
+ :type _request_auth: dict, optional
703
+ :param _content_type: force content-type for the request.
704
+ :type _content_type: str, Optional
705
+ :param _headers: set to override the headers for a single
706
+ request; this effectively ignores the headers
707
+ in the spec for a single request.
708
+ :type _headers: dict, optional
709
+ :param _host_index: set to override the host_index for a single
710
+ request; this effectively ignores the host_index
711
+ in the spec for a single request.
712
+ :type _host_index: int, optional
713
+ :return: Returns the result object.
714
+ """ # noqa: E501
715
+
716
+ _param = self._read_search_task_settings_serialize(
717
+ username=username,
718
+ dataset=dataset,
719
+ organization_id=organization_id,
720
+ q_answer_api_key=q_answer_api_key,
721
+ _request_auth=_request_auth,
722
+ _content_type=_content_type,
723
+ _headers=_headers,
724
+ _host_index=_host_index
725
+ )
726
+
727
+ _response_types_map: Dict[str, Optional[str]] = {
728
+ '200': "SearchTaskSettings",
729
+ '422': "HTTPValidationError",
730
+ }
731
+ response_data = self.api_client.call_api(
732
+ *_param,
733
+ _request_timeout=_request_timeout
734
+ )
735
+ response_data.read()
736
+ return self.api_client.response_deserialize(
737
+ response_data=response_data,
738
+ response_types_map=_response_types_map,
739
+ ).data
740
+
741
+
742
+ @validate_call
743
+ def read_search_task_settings_with_http_info(
744
+ self,
745
+ username: StrictStr,
746
+ dataset: StrictStr,
747
+ organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
748
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
749
+ _request_timeout: Union[
750
+ None,
751
+ Annotated[StrictFloat, Field(gt=0)],
752
+ Tuple[
753
+ Annotated[StrictFloat, Field(gt=0)],
754
+ Annotated[StrictFloat, Field(gt=0)]
755
+ ]
756
+ ] = None,
757
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
758
+ _content_type: Optional[StrictStr] = None,
759
+ _headers: Optional[Dict[StrictStr, Any]] = None,
760
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
761
+ ) -> ApiResponse[SearchTaskSettings]:
762
+ """Read Search Task Settings
763
+
764
+
765
+ :param username: (required)
766
+ :type username: str
767
+ :param dataset: (required)
768
+ :type dataset: str
769
+ :param organization_id: organization identifier
770
+ :type organization_id: int
771
+ :param q_answer_api_key: Optional QAnswer API key
772
+ :type q_answer_api_key: str
773
+ :param _request_timeout: timeout setting for this request. If one
774
+ number provided, it will be total request
775
+ timeout. It can also be a pair (tuple) of
776
+ (connection, read) timeouts.
777
+ :type _request_timeout: int, tuple(int, int), optional
778
+ :param _request_auth: set to override the auth_settings for an a single
779
+ request; this effectively ignores the
780
+ authentication in the spec for a single request.
781
+ :type _request_auth: dict, optional
782
+ :param _content_type: force content-type for the request.
783
+ :type _content_type: str, Optional
784
+ :param _headers: set to override the headers for a single
785
+ request; this effectively ignores the headers
786
+ in the spec for a single request.
787
+ :type _headers: dict, optional
788
+ :param _host_index: set to override the host_index for a single
789
+ request; this effectively ignores the host_index
790
+ in the spec for a single request.
791
+ :type _host_index: int, optional
792
+ :return: Returns the result object.
793
+ """ # noqa: E501
794
+
795
+ _param = self._read_search_task_settings_serialize(
796
+ username=username,
797
+ dataset=dataset,
798
+ organization_id=organization_id,
799
+ q_answer_api_key=q_answer_api_key,
800
+ _request_auth=_request_auth,
801
+ _content_type=_content_type,
802
+ _headers=_headers,
803
+ _host_index=_host_index
804
+ )
805
+
806
+ _response_types_map: Dict[str, Optional[str]] = {
807
+ '200': "SearchTaskSettings",
808
+ '422': "HTTPValidationError",
809
+ }
810
+ response_data = self.api_client.call_api(
811
+ *_param,
812
+ _request_timeout=_request_timeout
813
+ )
814
+ response_data.read()
815
+ return self.api_client.response_deserialize(
816
+ response_data=response_data,
817
+ response_types_map=_response_types_map,
818
+ )
819
+
820
+
821
+ @validate_call
822
+ def read_search_task_settings_without_preload_content(
823
+ self,
824
+ username: StrictStr,
825
+ dataset: StrictStr,
826
+ organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
827
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
828
+ _request_timeout: Union[
829
+ None,
830
+ Annotated[StrictFloat, Field(gt=0)],
831
+ Tuple[
832
+ Annotated[StrictFloat, Field(gt=0)],
833
+ Annotated[StrictFloat, Field(gt=0)]
834
+ ]
835
+ ] = None,
836
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
837
+ _content_type: Optional[StrictStr] = None,
838
+ _headers: Optional[Dict[StrictStr, Any]] = None,
839
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
840
+ ) -> RESTResponseType:
841
+ """Read Search Task Settings
842
+
843
+
844
+ :param username: (required)
845
+ :type username: str
846
+ :param dataset: (required)
847
+ :type dataset: str
848
+ :param organization_id: organization identifier
849
+ :type organization_id: int
850
+ :param q_answer_api_key: Optional QAnswer API key
851
+ :type q_answer_api_key: str
852
+ :param _request_timeout: timeout setting for this request. If one
853
+ number provided, it will be total request
854
+ timeout. It can also be a pair (tuple) of
855
+ (connection, read) timeouts.
856
+ :type _request_timeout: int, tuple(int, int), optional
857
+ :param _request_auth: set to override the auth_settings for an a single
858
+ request; this effectively ignores the
859
+ authentication in the spec for a single request.
860
+ :type _request_auth: dict, optional
861
+ :param _content_type: force content-type for the request.
862
+ :type _content_type: str, Optional
863
+ :param _headers: set to override the headers for a single
864
+ request; this effectively ignores the headers
865
+ in the spec for a single request.
866
+ :type _headers: dict, optional
867
+ :param _host_index: set to override the host_index for a single
868
+ request; this effectively ignores the host_index
869
+ in the spec for a single request.
870
+ :type _host_index: int, optional
871
+ :return: Returns the result object.
872
+ """ # noqa: E501
873
+
874
+ _param = self._read_search_task_settings_serialize(
875
+ username=username,
876
+ dataset=dataset,
877
+ organization_id=organization_id,
878
+ q_answer_api_key=q_answer_api_key,
879
+ _request_auth=_request_auth,
880
+ _content_type=_content_type,
881
+ _headers=_headers,
882
+ _host_index=_host_index
883
+ )
884
+
885
+ _response_types_map: Dict[str, Optional[str]] = {
886
+ '200': "SearchTaskSettings",
887
+ '422': "HTTPValidationError",
888
+ }
889
+ response_data = self.api_client.call_api(
890
+ *_param,
891
+ _request_timeout=_request_timeout
892
+ )
893
+ return response_data.response
894
+
895
+
896
+ def _read_search_task_settings_serialize(
897
+ self,
898
+ username,
899
+ dataset,
900
+ organization_id,
901
+ q_answer_api_key,
902
+ _request_auth,
903
+ _content_type,
904
+ _headers,
905
+ _host_index,
906
+ ) -> RequestSerialized:
907
+
908
+ _host = None
909
+
910
+ _collection_formats: Dict[str, str] = {
911
+ }
912
+
913
+ _path_params: Dict[str, str] = {}
914
+ _query_params: List[Tuple[str, str]] = []
915
+ _header_params: Dict[str, Optional[str]] = _headers or {}
916
+ _form_params: List[Tuple[str, str]] = []
917
+ _files: Dict[
918
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
919
+ ] = {}
920
+ _body_params: Optional[bytes] = None
921
+
922
+ # process the path parameters
923
+ # process the query parameters
924
+ if username is not None:
925
+
926
+ _query_params.append(('username', username))
927
+
928
+ if dataset is not None:
929
+
930
+ _query_params.append(('dataset', dataset))
931
+
932
+ if organization_id is not None:
933
+
934
+ _query_params.append(('organization_id', organization_id))
935
+
936
+ # process the header parameters
937
+ if q_answer_api_key is not None:
938
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
939
+ # process the form parameters
940
+ # process the body parameter
941
+
942
+
943
+ # set the HTTP header `Accept`
944
+ if 'Accept' not in _header_params:
945
+ _header_params['Accept'] = self.api_client.select_header_accept(
946
+ [
947
+ 'application/json'
948
+ ]
949
+ )
950
+
951
+
952
+ # authentication setting
953
+ _auth_settings: List[str] = [
954
+ 'QAnswer-Api-Key',
955
+ 'Bearer token'
956
+ ]
957
+
958
+ return self.api_client.param_serialize(
959
+ method='GET',
960
+ resource_path='/api/tasks/search/settings',
961
+ path_params=_path_params,
962
+ query_params=_query_params,
963
+ header_params=_header_params,
964
+ body=_body_params,
965
+ post_params=_form_params,
966
+ files=_files,
967
+ auth_settings=_auth_settings,
968
+ collection_formats=_collection_formats,
969
+ _host=_host,
970
+ _request_auth=_request_auth
971
+ )
972
+
973
+
974
+
975
+
976
+ @validate_call
977
+ def search(
978
+ self,
979
+ search_payload: SearchPayload,
980
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
981
+ _request_timeout: Union[
982
+ None,
983
+ Annotated[StrictFloat, Field(gt=0)],
984
+ Tuple[
985
+ Annotated[StrictFloat, Field(gt=0)],
986
+ Annotated[StrictFloat, Field(gt=0)]
987
+ ]
988
+ ] = None,
989
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
990
+ _content_type: Optional[StrictStr] = None,
991
+ _headers: Optional[Dict[StrictStr, Any]] = None,
992
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
993
+ ) -> SearchResponse:
994
+ """Search
995
+
996
+ Search on the dataset.
997
+
998
+ :param search_payload: (required)
999
+ :type search_payload: SearchPayload
1000
+ :param q_answer_api_key: Optional QAnswer API key
1001
+ :type q_answer_api_key: str
1002
+ :param _request_timeout: timeout setting for this request. If one
1003
+ number provided, it will be total request
1004
+ timeout. It can also be a pair (tuple) of
1005
+ (connection, read) timeouts.
1006
+ :type _request_timeout: int, tuple(int, int), optional
1007
+ :param _request_auth: set to override the auth_settings for an a single
1008
+ request; this effectively ignores the
1009
+ authentication in the spec for a single request.
1010
+ :type _request_auth: dict, optional
1011
+ :param _content_type: force content-type for the request.
1012
+ :type _content_type: str, Optional
1013
+ :param _headers: set to override the headers for a single
1014
+ request; this effectively ignores the headers
1015
+ in the spec for a single request.
1016
+ :type _headers: dict, optional
1017
+ :param _host_index: set to override the host_index for a single
1018
+ request; this effectively ignores the host_index
1019
+ in the spec for a single request.
1020
+ :type _host_index: int, optional
1021
+ :return: Returns the result object.
1022
+ """ # noqa: E501
1023
+
1024
+ _param = self._search_serialize(
1025
+ search_payload=search_payload,
1026
+ q_answer_api_key=q_answer_api_key,
1027
+ _request_auth=_request_auth,
1028
+ _content_type=_content_type,
1029
+ _headers=_headers,
1030
+ _host_index=_host_index
1031
+ )
1032
+
1033
+ _response_types_map: Dict[str, Optional[str]] = {
1034
+ '200': "SearchResponse",
1035
+ '422': "HTTPValidationError",
1036
+ }
1037
+ response_data = self.api_client.call_api(
1038
+ *_param,
1039
+ _request_timeout=_request_timeout
1040
+ )
1041
+ response_data.read()
1042
+ return self.api_client.response_deserialize(
1043
+ response_data=response_data,
1044
+ response_types_map=_response_types_map,
1045
+ ).data
1046
+
1047
+
1048
+ @validate_call
1049
+ def search_with_http_info(
1050
+ self,
1051
+ search_payload: SearchPayload,
1052
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1053
+ _request_timeout: Union[
1054
+ None,
1055
+ Annotated[StrictFloat, Field(gt=0)],
1056
+ Tuple[
1057
+ Annotated[StrictFloat, Field(gt=0)],
1058
+ Annotated[StrictFloat, Field(gt=0)]
1059
+ ]
1060
+ ] = None,
1061
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1062
+ _content_type: Optional[StrictStr] = None,
1063
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1064
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1065
+ ) -> ApiResponse[SearchResponse]:
1066
+ """Search
1067
+
1068
+ Search on the dataset.
1069
+
1070
+ :param search_payload: (required)
1071
+ :type search_payload: SearchPayload
1072
+ :param q_answer_api_key: Optional QAnswer API key
1073
+ :type q_answer_api_key: str
1074
+ :param _request_timeout: timeout setting for this request. If one
1075
+ number provided, it will be total request
1076
+ timeout. It can also be a pair (tuple) of
1077
+ (connection, read) timeouts.
1078
+ :type _request_timeout: int, tuple(int, int), optional
1079
+ :param _request_auth: set to override the auth_settings for an a single
1080
+ request; this effectively ignores the
1081
+ authentication in the spec for a single request.
1082
+ :type _request_auth: dict, optional
1083
+ :param _content_type: force content-type for the request.
1084
+ :type _content_type: str, Optional
1085
+ :param _headers: set to override the headers for a single
1086
+ request; this effectively ignores the headers
1087
+ in the spec for a single request.
1088
+ :type _headers: dict, optional
1089
+ :param _host_index: set to override the host_index for a single
1090
+ request; this effectively ignores the host_index
1091
+ in the spec for a single request.
1092
+ :type _host_index: int, optional
1093
+ :return: Returns the result object.
1094
+ """ # noqa: E501
1095
+
1096
+ _param = self._search_serialize(
1097
+ search_payload=search_payload,
1098
+ q_answer_api_key=q_answer_api_key,
1099
+ _request_auth=_request_auth,
1100
+ _content_type=_content_type,
1101
+ _headers=_headers,
1102
+ _host_index=_host_index
1103
+ )
1104
+
1105
+ _response_types_map: Dict[str, Optional[str]] = {
1106
+ '200': "SearchResponse",
1107
+ '422': "HTTPValidationError",
1108
+ }
1109
+ response_data = self.api_client.call_api(
1110
+ *_param,
1111
+ _request_timeout=_request_timeout
1112
+ )
1113
+ response_data.read()
1114
+ return self.api_client.response_deserialize(
1115
+ response_data=response_data,
1116
+ response_types_map=_response_types_map,
1117
+ )
1118
+
1119
+
1120
+ @validate_call
1121
+ def search_without_preload_content(
1122
+ self,
1123
+ search_payload: SearchPayload,
1124
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1125
+ _request_timeout: Union[
1126
+ None,
1127
+ Annotated[StrictFloat, Field(gt=0)],
1128
+ Tuple[
1129
+ Annotated[StrictFloat, Field(gt=0)],
1130
+ Annotated[StrictFloat, Field(gt=0)]
1131
+ ]
1132
+ ] = None,
1133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1134
+ _content_type: Optional[StrictStr] = None,
1135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1137
+ ) -> RESTResponseType:
1138
+ """Search
1139
+
1140
+ Search on the dataset.
1141
+
1142
+ :param search_payload: (required)
1143
+ :type search_payload: SearchPayload
1144
+ :param q_answer_api_key: Optional QAnswer API key
1145
+ :type q_answer_api_key: str
1146
+ :param _request_timeout: timeout setting for this request. If one
1147
+ number provided, it will be total request
1148
+ timeout. It can also be a pair (tuple) of
1149
+ (connection, read) timeouts.
1150
+ :type _request_timeout: int, tuple(int, int), optional
1151
+ :param _request_auth: set to override the auth_settings for an a single
1152
+ request; this effectively ignores the
1153
+ authentication in the spec for a single request.
1154
+ :type _request_auth: dict, optional
1155
+ :param _content_type: force content-type for the request.
1156
+ :type _content_type: str, Optional
1157
+ :param _headers: set to override the headers for a single
1158
+ request; this effectively ignores the headers
1159
+ in the spec for a single request.
1160
+ :type _headers: dict, optional
1161
+ :param _host_index: set to override the host_index for a single
1162
+ request; this effectively ignores the host_index
1163
+ in the spec for a single request.
1164
+ :type _host_index: int, optional
1165
+ :return: Returns the result object.
1166
+ """ # noqa: E501
1167
+
1168
+ _param = self._search_serialize(
1169
+ search_payload=search_payload,
1170
+ q_answer_api_key=q_answer_api_key,
1171
+ _request_auth=_request_auth,
1172
+ _content_type=_content_type,
1173
+ _headers=_headers,
1174
+ _host_index=_host_index
1175
+ )
1176
+
1177
+ _response_types_map: Dict[str, Optional[str]] = {
1178
+ '200': "SearchResponse",
1179
+ '422': "HTTPValidationError",
1180
+ }
1181
+ response_data = self.api_client.call_api(
1182
+ *_param,
1183
+ _request_timeout=_request_timeout
1184
+ )
1185
+ return response_data.response
1186
+
1187
+
1188
+ def _search_serialize(
1189
+ self,
1190
+ search_payload,
1191
+ q_answer_api_key,
1192
+ _request_auth,
1193
+ _content_type,
1194
+ _headers,
1195
+ _host_index,
1196
+ ) -> RequestSerialized:
1197
+
1198
+ _host = None
1199
+
1200
+ _collection_formats: Dict[str, str] = {
1201
+ }
1202
+
1203
+ _path_params: Dict[str, str] = {}
1204
+ _query_params: List[Tuple[str, str]] = []
1205
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1206
+ _form_params: List[Tuple[str, str]] = []
1207
+ _files: Dict[
1208
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1209
+ ] = {}
1210
+ _body_params: Optional[bytes] = None
1211
+
1212
+ # process the path parameters
1213
+ # process the query parameters
1214
+ # process the header parameters
1215
+ if q_answer_api_key is not None:
1216
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1217
+ # process the form parameters
1218
+ # process the body parameter
1219
+ if search_payload is not None:
1220
+ _body_params = search_payload
1221
+
1222
+
1223
+ # set the HTTP header `Accept`
1224
+ if 'Accept' not in _header_params:
1225
+ _header_params['Accept'] = self.api_client.select_header_accept(
1226
+ [
1227
+ 'application/json'
1228
+ ]
1229
+ )
1230
+
1231
+ # set the HTTP header `Content-Type`
1232
+ if _content_type:
1233
+ _header_params['Content-Type'] = _content_type
1234
+ else:
1235
+ _default_content_type = (
1236
+ self.api_client.select_header_content_type(
1237
+ [
1238
+ 'application/json'
1239
+ ]
1240
+ )
1241
+ )
1242
+ if _default_content_type is not None:
1243
+ _header_params['Content-Type'] = _default_content_type
1244
+
1245
+ # authentication setting
1246
+ _auth_settings: List[str] = [
1247
+ 'QAnswer-Api-Key',
1248
+ 'Bearer token'
1249
+ ]
1250
+
1251
+ return self.api_client.param_serialize(
1252
+ method='POST',
1253
+ resource_path='/api/tasks/search/retrieve',
1254
+ path_params=_path_params,
1255
+ query_params=_query_params,
1256
+ header_params=_header_params,
1257
+ body=_body_params,
1258
+ post_params=_form_params,
1259
+ files=_files,
1260
+ auth_settings=_auth_settings,
1261
+ collection_formats=_collection_formats,
1262
+ _host=_host,
1263
+ _request_auth=_request_auth
1264
+ )
1265
+
1266
+
1267
+
1268
+
1269
+ @validate_call
1270
+ def search_with_qa(
1271
+ self,
1272
+ rag_payload: RAGPayload,
1273
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1274
+ _request_timeout: Union[
1275
+ None,
1276
+ Annotated[StrictFloat, Field(gt=0)],
1277
+ Tuple[
1278
+ Annotated[StrictFloat, Field(gt=0)],
1279
+ Annotated[StrictFloat, Field(gt=0)]
1280
+ ]
1281
+ ] = None,
1282
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1283
+ _content_type: Optional[StrictStr] = None,
1284
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1285
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1286
+ ) -> RAGResponse:
1287
+ """Search With Qa
1288
+
1289
+ Search on the dataset and then based on the search result, answer the question.
1290
+
1291
+ :param rag_payload: (required)
1292
+ :type rag_payload: RAGPayload
1293
+ :param q_answer_api_key: Optional QAnswer API key
1294
+ :type q_answer_api_key: str
1295
+ :param _request_timeout: timeout setting for this request. If one
1296
+ number provided, it will be total request
1297
+ timeout. It can also be a pair (tuple) of
1298
+ (connection, read) timeouts.
1299
+ :type _request_timeout: int, tuple(int, int), optional
1300
+ :param _request_auth: set to override the auth_settings for an a single
1301
+ request; this effectively ignores the
1302
+ authentication in the spec for a single request.
1303
+ :type _request_auth: dict, optional
1304
+ :param _content_type: force content-type for the request.
1305
+ :type _content_type: str, Optional
1306
+ :param _headers: set to override the headers for a single
1307
+ request; this effectively ignores the headers
1308
+ in the spec for a single request.
1309
+ :type _headers: dict, optional
1310
+ :param _host_index: set to override the host_index for a single
1311
+ request; this effectively ignores the host_index
1312
+ in the spec for a single request.
1313
+ :type _host_index: int, optional
1314
+ :return: Returns the result object.
1315
+ """ # noqa: E501
1316
+
1317
+ _param = self._search_with_qa_serialize(
1318
+ rag_payload=rag_payload,
1319
+ q_answer_api_key=q_answer_api_key,
1320
+ _request_auth=_request_auth,
1321
+ _content_type=_content_type,
1322
+ _headers=_headers,
1323
+ _host_index=_host_index
1324
+ )
1325
+
1326
+ _response_types_map: Dict[str, Optional[str]] = {
1327
+ '200': "RAGResponse",
1328
+ '307': None,
1329
+ '422': "HTTPValidationError",
1330
+ }
1331
+ response_data = self.api_client.call_api(
1332
+ *_param,
1333
+ _request_timeout=_request_timeout
1334
+ )
1335
+ response_data.read()
1336
+ return self.api_client.response_deserialize(
1337
+ response_data=response_data,
1338
+ response_types_map=_response_types_map,
1339
+ ).data
1340
+
1341
+
1342
+ @validate_call
1343
+ def search_with_qa_with_http_info(
1344
+ self,
1345
+ rag_payload: RAGPayload,
1346
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1347
+ _request_timeout: Union[
1348
+ None,
1349
+ Annotated[StrictFloat, Field(gt=0)],
1350
+ Tuple[
1351
+ Annotated[StrictFloat, Field(gt=0)],
1352
+ Annotated[StrictFloat, Field(gt=0)]
1353
+ ]
1354
+ ] = None,
1355
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1356
+ _content_type: Optional[StrictStr] = None,
1357
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1358
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1359
+ ) -> ApiResponse[RAGResponse]:
1360
+ """Search With Qa
1361
+
1362
+ Search on the dataset and then based on the search result, answer the question.
1363
+
1364
+ :param rag_payload: (required)
1365
+ :type rag_payload: RAGPayload
1366
+ :param q_answer_api_key: Optional QAnswer API key
1367
+ :type q_answer_api_key: str
1368
+ :param _request_timeout: timeout setting for this request. If one
1369
+ number provided, it will be total request
1370
+ timeout. It can also be a pair (tuple) of
1371
+ (connection, read) timeouts.
1372
+ :type _request_timeout: int, tuple(int, int), optional
1373
+ :param _request_auth: set to override the auth_settings for an a single
1374
+ request; this effectively ignores the
1375
+ authentication in the spec for a single request.
1376
+ :type _request_auth: dict, optional
1377
+ :param _content_type: force content-type for the request.
1378
+ :type _content_type: str, Optional
1379
+ :param _headers: set to override the headers for a single
1380
+ request; this effectively ignores the headers
1381
+ in the spec for a single request.
1382
+ :type _headers: dict, optional
1383
+ :param _host_index: set to override the host_index for a single
1384
+ request; this effectively ignores the host_index
1385
+ in the spec for a single request.
1386
+ :type _host_index: int, optional
1387
+ :return: Returns the result object.
1388
+ """ # noqa: E501
1389
+
1390
+ _param = self._search_with_qa_serialize(
1391
+ rag_payload=rag_payload,
1392
+ q_answer_api_key=q_answer_api_key,
1393
+ _request_auth=_request_auth,
1394
+ _content_type=_content_type,
1395
+ _headers=_headers,
1396
+ _host_index=_host_index
1397
+ )
1398
+
1399
+ _response_types_map: Dict[str, Optional[str]] = {
1400
+ '200': "RAGResponse",
1401
+ '307': None,
1402
+ '422': "HTTPValidationError",
1403
+ }
1404
+ response_data = self.api_client.call_api(
1405
+ *_param,
1406
+ _request_timeout=_request_timeout
1407
+ )
1408
+ response_data.read()
1409
+ return self.api_client.response_deserialize(
1410
+ response_data=response_data,
1411
+ response_types_map=_response_types_map,
1412
+ )
1413
+
1414
+
1415
+ @validate_call
1416
+ def search_with_qa_without_preload_content(
1417
+ self,
1418
+ rag_payload: RAGPayload,
1419
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1420
+ _request_timeout: Union[
1421
+ None,
1422
+ Annotated[StrictFloat, Field(gt=0)],
1423
+ Tuple[
1424
+ Annotated[StrictFloat, Field(gt=0)],
1425
+ Annotated[StrictFloat, Field(gt=0)]
1426
+ ]
1427
+ ] = None,
1428
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1429
+ _content_type: Optional[StrictStr] = None,
1430
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1431
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1432
+ ) -> RESTResponseType:
1433
+ """Search With Qa
1434
+
1435
+ Search on the dataset and then based on the search result, answer the question.
1436
+
1437
+ :param rag_payload: (required)
1438
+ :type rag_payload: RAGPayload
1439
+ :param q_answer_api_key: Optional QAnswer API key
1440
+ :type q_answer_api_key: str
1441
+ :param _request_timeout: timeout setting for this request. If one
1442
+ number provided, it will be total request
1443
+ timeout. It can also be a pair (tuple) of
1444
+ (connection, read) timeouts.
1445
+ :type _request_timeout: int, tuple(int, int), optional
1446
+ :param _request_auth: set to override the auth_settings for an a single
1447
+ request; this effectively ignores the
1448
+ authentication in the spec for a single request.
1449
+ :type _request_auth: dict, optional
1450
+ :param _content_type: force content-type for the request.
1451
+ :type _content_type: str, Optional
1452
+ :param _headers: set to override the headers for a single
1453
+ request; this effectively ignores the headers
1454
+ in the spec for a single request.
1455
+ :type _headers: dict, optional
1456
+ :param _host_index: set to override the host_index for a single
1457
+ request; this effectively ignores the host_index
1458
+ in the spec for a single request.
1459
+ :type _host_index: int, optional
1460
+ :return: Returns the result object.
1461
+ """ # noqa: E501
1462
+
1463
+ _param = self._search_with_qa_serialize(
1464
+ rag_payload=rag_payload,
1465
+ q_answer_api_key=q_answer_api_key,
1466
+ _request_auth=_request_auth,
1467
+ _content_type=_content_type,
1468
+ _headers=_headers,
1469
+ _host_index=_host_index
1470
+ )
1471
+
1472
+ _response_types_map: Dict[str, Optional[str]] = {
1473
+ '200': "RAGResponse",
1474
+ '307': None,
1475
+ '422': "HTTPValidationError",
1476
+ }
1477
+ response_data = self.api_client.call_api(
1478
+ *_param,
1479
+ _request_timeout=_request_timeout
1480
+ )
1481
+ return response_data.response
1482
+
1483
+
1484
+ def _search_with_qa_serialize(
1485
+ self,
1486
+ rag_payload,
1487
+ q_answer_api_key,
1488
+ _request_auth,
1489
+ _content_type,
1490
+ _headers,
1491
+ _host_index,
1492
+ ) -> RequestSerialized:
1493
+
1494
+ _host = None
1495
+
1496
+ _collection_formats: Dict[str, str] = {
1497
+ }
1498
+
1499
+ _path_params: Dict[str, str] = {}
1500
+ _query_params: List[Tuple[str, str]] = []
1501
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1502
+ _form_params: List[Tuple[str, str]] = []
1503
+ _files: Dict[
1504
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1505
+ ] = {}
1506
+ _body_params: Optional[bytes] = None
1507
+
1508
+ # process the path parameters
1509
+ # process the query parameters
1510
+ # process the header parameters
1511
+ if q_answer_api_key is not None:
1512
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1513
+ # process the form parameters
1514
+ # process the body parameter
1515
+ if rag_payload is not None:
1516
+ _body_params = rag_payload
1517
+
1518
+
1519
+ # set the HTTP header `Accept`
1520
+ if 'Accept' not in _header_params:
1521
+ _header_params['Accept'] = self.api_client.select_header_accept(
1522
+ [
1523
+ 'application/json'
1524
+ ]
1525
+ )
1526
+
1527
+ # set the HTTP header `Content-Type`
1528
+ if _content_type:
1529
+ _header_params['Content-Type'] = _content_type
1530
+ else:
1531
+ _default_content_type = (
1532
+ self.api_client.select_header_content_type(
1533
+ [
1534
+ 'application/json'
1535
+ ]
1536
+ )
1537
+ )
1538
+ if _default_content_type is not None:
1539
+ _header_params['Content-Type'] = _default_content_type
1540
+
1541
+ # authentication setting
1542
+ _auth_settings: List[str] = [
1543
+ 'QAnswer-Api-Key',
1544
+ 'Bearer token'
1545
+ ]
1546
+
1547
+ return self.api_client.param_serialize(
1548
+ method='POST',
1549
+ resource_path='/api/tasks/search/generate',
1550
+ path_params=_path_params,
1551
+ query_params=_query_params,
1552
+ header_params=_header_params,
1553
+ body=_body_params,
1554
+ post_params=_form_params,
1555
+ files=_files,
1556
+ auth_settings=_auth_settings,
1557
+ collection_formats=_collection_formats,
1558
+ _host=_host,
1559
+ _request_auth=_request_auth
1560
+ )
1561
+
1562
+
1563
+
1564
+
1565
+ @validate_call
1566
+ def update_enable_enhanced_context_search(
1567
+ self,
1568
+ enable_enhanced_context_payload: EnableEnhancedContextPayload,
1569
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1570
+ _request_timeout: Union[
1571
+ None,
1572
+ Annotated[StrictFloat, Field(gt=0)],
1573
+ Tuple[
1574
+ Annotated[StrictFloat, Field(gt=0)],
1575
+ Annotated[StrictFloat, Field(gt=0)]
1576
+ ]
1577
+ ] = None,
1578
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1579
+ _content_type: Optional[StrictStr] = None,
1580
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1581
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1582
+ ) -> EnableEnhancedContextResponse:
1583
+ """Update Enable Enhanced Context Search
1584
+
1585
+
1586
+ :param enable_enhanced_context_payload: (required)
1587
+ :type enable_enhanced_context_payload: EnableEnhancedContextPayload
1588
+ :param q_answer_api_key: Optional QAnswer API key
1589
+ :type q_answer_api_key: str
1590
+ :param _request_timeout: timeout setting for this request. If one
1591
+ number provided, it will be total request
1592
+ timeout. It can also be a pair (tuple) of
1593
+ (connection, read) timeouts.
1594
+ :type _request_timeout: int, tuple(int, int), optional
1595
+ :param _request_auth: set to override the auth_settings for an a single
1596
+ request; this effectively ignores the
1597
+ authentication in the spec for a single request.
1598
+ :type _request_auth: dict, optional
1599
+ :param _content_type: force content-type for the request.
1600
+ :type _content_type: str, Optional
1601
+ :param _headers: set to override the headers for a single
1602
+ request; this effectively ignores the headers
1603
+ in the spec for a single request.
1604
+ :type _headers: dict, optional
1605
+ :param _host_index: set to override the host_index for a single
1606
+ request; this effectively ignores the host_index
1607
+ in the spec for a single request.
1608
+ :type _host_index: int, optional
1609
+ :return: Returns the result object.
1610
+ """ # noqa: E501
1611
+
1612
+ _param = self._update_enable_enhanced_context_search_serialize(
1613
+ enable_enhanced_context_payload=enable_enhanced_context_payload,
1614
+ q_answer_api_key=q_answer_api_key,
1615
+ _request_auth=_request_auth,
1616
+ _content_type=_content_type,
1617
+ _headers=_headers,
1618
+ _host_index=_host_index
1619
+ )
1620
+
1621
+ _response_types_map: Dict[str, Optional[str]] = {
1622
+ '200': "EnableEnhancedContextResponse",
1623
+ '422': "HTTPValidationError",
1624
+ }
1625
+ response_data = self.api_client.call_api(
1626
+ *_param,
1627
+ _request_timeout=_request_timeout
1628
+ )
1629
+ response_data.read()
1630
+ return self.api_client.response_deserialize(
1631
+ response_data=response_data,
1632
+ response_types_map=_response_types_map,
1633
+ ).data
1634
+
1635
+
1636
+ @validate_call
1637
+ def update_enable_enhanced_context_search_with_http_info(
1638
+ self,
1639
+ enable_enhanced_context_payload: EnableEnhancedContextPayload,
1640
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1641
+ _request_timeout: Union[
1642
+ None,
1643
+ Annotated[StrictFloat, Field(gt=0)],
1644
+ Tuple[
1645
+ Annotated[StrictFloat, Field(gt=0)],
1646
+ Annotated[StrictFloat, Field(gt=0)]
1647
+ ]
1648
+ ] = None,
1649
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1650
+ _content_type: Optional[StrictStr] = None,
1651
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1652
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1653
+ ) -> ApiResponse[EnableEnhancedContextResponse]:
1654
+ """Update Enable Enhanced Context Search
1655
+
1656
+
1657
+ :param enable_enhanced_context_payload: (required)
1658
+ :type enable_enhanced_context_payload: EnableEnhancedContextPayload
1659
+ :param q_answer_api_key: Optional QAnswer API key
1660
+ :type q_answer_api_key: str
1661
+ :param _request_timeout: timeout setting for this request. If one
1662
+ number provided, it will be total request
1663
+ timeout. It can also be a pair (tuple) of
1664
+ (connection, read) timeouts.
1665
+ :type _request_timeout: int, tuple(int, int), optional
1666
+ :param _request_auth: set to override the auth_settings for an a single
1667
+ request; this effectively ignores the
1668
+ authentication in the spec for a single request.
1669
+ :type _request_auth: dict, optional
1670
+ :param _content_type: force content-type for the request.
1671
+ :type _content_type: str, Optional
1672
+ :param _headers: set to override the headers for a single
1673
+ request; this effectively ignores the headers
1674
+ in the spec for a single request.
1675
+ :type _headers: dict, optional
1676
+ :param _host_index: set to override the host_index for a single
1677
+ request; this effectively ignores the host_index
1678
+ in the spec for a single request.
1679
+ :type _host_index: int, optional
1680
+ :return: Returns the result object.
1681
+ """ # noqa: E501
1682
+
1683
+ _param = self._update_enable_enhanced_context_search_serialize(
1684
+ enable_enhanced_context_payload=enable_enhanced_context_payload,
1685
+ q_answer_api_key=q_answer_api_key,
1686
+ _request_auth=_request_auth,
1687
+ _content_type=_content_type,
1688
+ _headers=_headers,
1689
+ _host_index=_host_index
1690
+ )
1691
+
1692
+ _response_types_map: Dict[str, Optional[str]] = {
1693
+ '200': "EnableEnhancedContextResponse",
1694
+ '422': "HTTPValidationError",
1695
+ }
1696
+ response_data = self.api_client.call_api(
1697
+ *_param,
1698
+ _request_timeout=_request_timeout
1699
+ )
1700
+ response_data.read()
1701
+ return self.api_client.response_deserialize(
1702
+ response_data=response_data,
1703
+ response_types_map=_response_types_map,
1704
+ )
1705
+
1706
+
1707
+ @validate_call
1708
+ def update_enable_enhanced_context_search_without_preload_content(
1709
+ self,
1710
+ enable_enhanced_context_payload: EnableEnhancedContextPayload,
1711
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1712
+ _request_timeout: Union[
1713
+ None,
1714
+ Annotated[StrictFloat, Field(gt=0)],
1715
+ Tuple[
1716
+ Annotated[StrictFloat, Field(gt=0)],
1717
+ Annotated[StrictFloat, Field(gt=0)]
1718
+ ]
1719
+ ] = None,
1720
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1721
+ _content_type: Optional[StrictStr] = None,
1722
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1723
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1724
+ ) -> RESTResponseType:
1725
+ """Update Enable Enhanced Context Search
1726
+
1727
+
1728
+ :param enable_enhanced_context_payload: (required)
1729
+ :type enable_enhanced_context_payload: EnableEnhancedContextPayload
1730
+ :param q_answer_api_key: Optional QAnswer API key
1731
+ :type q_answer_api_key: str
1732
+ :param _request_timeout: timeout setting for this request. If one
1733
+ number provided, it will be total request
1734
+ timeout. It can also be a pair (tuple) of
1735
+ (connection, read) timeouts.
1736
+ :type _request_timeout: int, tuple(int, int), optional
1737
+ :param _request_auth: set to override the auth_settings for an a single
1738
+ request; this effectively ignores the
1739
+ authentication in the spec for a single request.
1740
+ :type _request_auth: dict, optional
1741
+ :param _content_type: force content-type for the request.
1742
+ :type _content_type: str, Optional
1743
+ :param _headers: set to override the headers for a single
1744
+ request; this effectively ignores the headers
1745
+ in the spec for a single request.
1746
+ :type _headers: dict, optional
1747
+ :param _host_index: set to override the host_index for a single
1748
+ request; this effectively ignores the host_index
1749
+ in the spec for a single request.
1750
+ :type _host_index: int, optional
1751
+ :return: Returns the result object.
1752
+ """ # noqa: E501
1753
+
1754
+ _param = self._update_enable_enhanced_context_search_serialize(
1755
+ enable_enhanced_context_payload=enable_enhanced_context_payload,
1756
+ q_answer_api_key=q_answer_api_key,
1757
+ _request_auth=_request_auth,
1758
+ _content_type=_content_type,
1759
+ _headers=_headers,
1760
+ _host_index=_host_index
1761
+ )
1762
+
1763
+ _response_types_map: Dict[str, Optional[str]] = {
1764
+ '200': "EnableEnhancedContextResponse",
1765
+ '422': "HTTPValidationError",
1766
+ }
1767
+ response_data = self.api_client.call_api(
1768
+ *_param,
1769
+ _request_timeout=_request_timeout
1770
+ )
1771
+ return response_data.response
1772
+
1773
+
1774
+ def _update_enable_enhanced_context_search_serialize(
1775
+ self,
1776
+ enable_enhanced_context_payload,
1777
+ q_answer_api_key,
1778
+ _request_auth,
1779
+ _content_type,
1780
+ _headers,
1781
+ _host_index,
1782
+ ) -> RequestSerialized:
1783
+
1784
+ _host = None
1785
+
1786
+ _collection_formats: Dict[str, str] = {
1787
+ }
1788
+
1789
+ _path_params: Dict[str, str] = {}
1790
+ _query_params: List[Tuple[str, str]] = []
1791
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1792
+ _form_params: List[Tuple[str, str]] = []
1793
+ _files: Dict[
1794
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1795
+ ] = {}
1796
+ _body_params: Optional[bytes] = None
1797
+
1798
+ # process the path parameters
1799
+ # process the query parameters
1800
+ # process the header parameters
1801
+ if q_answer_api_key is not None:
1802
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1803
+ # process the form parameters
1804
+ # process the body parameter
1805
+ if enable_enhanced_context_payload is not None:
1806
+ _body_params = enable_enhanced_context_payload
1807
+
1808
+
1809
+ # set the HTTP header `Accept`
1810
+ if 'Accept' not in _header_params:
1811
+ _header_params['Accept'] = self.api_client.select_header_accept(
1812
+ [
1813
+ 'application/json'
1814
+ ]
1815
+ )
1816
+
1817
+ # set the HTTP header `Content-Type`
1818
+ if _content_type:
1819
+ _header_params['Content-Type'] = _content_type
1820
+ else:
1821
+ _default_content_type = (
1822
+ self.api_client.select_header_content_type(
1823
+ [
1824
+ 'application/json'
1825
+ ]
1826
+ )
1827
+ )
1828
+ if _default_content_type is not None:
1829
+ _header_params['Content-Type'] = _default_content_type
1830
+
1831
+ # authentication setting
1832
+ _auth_settings: List[str] = [
1833
+ 'QAnswer-Api-Key',
1834
+ 'Bearer token'
1835
+ ]
1836
+
1837
+ return self.api_client.param_serialize(
1838
+ method='PUT',
1839
+ resource_path='/api/tasks/search/enable-enhanced-context',
1840
+ path_params=_path_params,
1841
+ query_params=_query_params,
1842
+ header_params=_header_params,
1843
+ body=_body_params,
1844
+ post_params=_form_params,
1845
+ files=_files,
1846
+ auth_settings=_auth_settings,
1847
+ collection_formats=_collection_formats,
1848
+ _host=_host,
1849
+ _request_auth=_request_auth
1850
+ )
1851
+
1852
+
1853
+
1854
+
1855
+ @validate_call
1856
+ def update_search_task_settings_search(
1857
+ self,
1858
+ search_task_settings_update_payload: SearchTaskSettingsUpdatePayload,
1859
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1860
+ _request_timeout: Union[
1861
+ None,
1862
+ Annotated[StrictFloat, Field(gt=0)],
1863
+ Tuple[
1864
+ Annotated[StrictFloat, Field(gt=0)],
1865
+ Annotated[StrictFloat, Field(gt=0)]
1866
+ ]
1867
+ ] = None,
1868
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1869
+ _content_type: Optional[StrictStr] = None,
1870
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1871
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1872
+ ) -> SearchTaskSettings:
1873
+ """Update Search Task Settings Search
1874
+
1875
+
1876
+ :param search_task_settings_update_payload: (required)
1877
+ :type search_task_settings_update_payload: SearchTaskSettingsUpdatePayload
1878
+ :param q_answer_api_key: Optional QAnswer API key
1879
+ :type q_answer_api_key: str
1880
+ :param _request_timeout: timeout setting for this request. If one
1881
+ number provided, it will be total request
1882
+ timeout. It can also be a pair (tuple) of
1883
+ (connection, read) timeouts.
1884
+ :type _request_timeout: int, tuple(int, int), optional
1885
+ :param _request_auth: set to override the auth_settings for an a single
1886
+ request; this effectively ignores the
1887
+ authentication in the spec for a single request.
1888
+ :type _request_auth: dict, optional
1889
+ :param _content_type: force content-type for the request.
1890
+ :type _content_type: str, Optional
1891
+ :param _headers: set to override the headers for a single
1892
+ request; this effectively ignores the headers
1893
+ in the spec for a single request.
1894
+ :type _headers: dict, optional
1895
+ :param _host_index: set to override the host_index for a single
1896
+ request; this effectively ignores the host_index
1897
+ in the spec for a single request.
1898
+ :type _host_index: int, optional
1899
+ :return: Returns the result object.
1900
+ """ # noqa: E501
1901
+
1902
+ _param = self._update_search_task_settings_search_serialize(
1903
+ search_task_settings_update_payload=search_task_settings_update_payload,
1904
+ q_answer_api_key=q_answer_api_key,
1905
+ _request_auth=_request_auth,
1906
+ _content_type=_content_type,
1907
+ _headers=_headers,
1908
+ _host_index=_host_index
1909
+ )
1910
+
1911
+ _response_types_map: Dict[str, Optional[str]] = {
1912
+ '200': "SearchTaskSettings",
1913
+ '422': "HTTPValidationError",
1914
+ }
1915
+ response_data = self.api_client.call_api(
1916
+ *_param,
1917
+ _request_timeout=_request_timeout
1918
+ )
1919
+ response_data.read()
1920
+ return self.api_client.response_deserialize(
1921
+ response_data=response_data,
1922
+ response_types_map=_response_types_map,
1923
+ ).data
1924
+
1925
+
1926
+ @validate_call
1927
+ def update_search_task_settings_search_with_http_info(
1928
+ self,
1929
+ search_task_settings_update_payload: SearchTaskSettingsUpdatePayload,
1930
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1931
+ _request_timeout: Union[
1932
+ None,
1933
+ Annotated[StrictFloat, Field(gt=0)],
1934
+ Tuple[
1935
+ Annotated[StrictFloat, Field(gt=0)],
1936
+ Annotated[StrictFloat, Field(gt=0)]
1937
+ ]
1938
+ ] = None,
1939
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1940
+ _content_type: Optional[StrictStr] = None,
1941
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1942
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1943
+ ) -> ApiResponse[SearchTaskSettings]:
1944
+ """Update Search Task Settings Search
1945
+
1946
+
1947
+ :param search_task_settings_update_payload: (required)
1948
+ :type search_task_settings_update_payload: SearchTaskSettingsUpdatePayload
1949
+ :param q_answer_api_key: Optional QAnswer API key
1950
+ :type q_answer_api_key: str
1951
+ :param _request_timeout: timeout setting for this request. If one
1952
+ number provided, it will be total request
1953
+ timeout. It can also be a pair (tuple) of
1954
+ (connection, read) timeouts.
1955
+ :type _request_timeout: int, tuple(int, int), optional
1956
+ :param _request_auth: set to override the auth_settings for an a single
1957
+ request; this effectively ignores the
1958
+ authentication in the spec for a single request.
1959
+ :type _request_auth: dict, optional
1960
+ :param _content_type: force content-type for the request.
1961
+ :type _content_type: str, Optional
1962
+ :param _headers: set to override the headers for a single
1963
+ request; this effectively ignores the headers
1964
+ in the spec for a single request.
1965
+ :type _headers: dict, optional
1966
+ :param _host_index: set to override the host_index for a single
1967
+ request; this effectively ignores the host_index
1968
+ in the spec for a single request.
1969
+ :type _host_index: int, optional
1970
+ :return: Returns the result object.
1971
+ """ # noqa: E501
1972
+
1973
+ _param = self._update_search_task_settings_search_serialize(
1974
+ search_task_settings_update_payload=search_task_settings_update_payload,
1975
+ q_answer_api_key=q_answer_api_key,
1976
+ _request_auth=_request_auth,
1977
+ _content_type=_content_type,
1978
+ _headers=_headers,
1979
+ _host_index=_host_index
1980
+ )
1981
+
1982
+ _response_types_map: Dict[str, Optional[str]] = {
1983
+ '200': "SearchTaskSettings",
1984
+ '422': "HTTPValidationError",
1985
+ }
1986
+ response_data = self.api_client.call_api(
1987
+ *_param,
1988
+ _request_timeout=_request_timeout
1989
+ )
1990
+ response_data.read()
1991
+ return self.api_client.response_deserialize(
1992
+ response_data=response_data,
1993
+ response_types_map=_response_types_map,
1994
+ )
1995
+
1996
+
1997
+ @validate_call
1998
+ def update_search_task_settings_search_without_preload_content(
1999
+ self,
2000
+ search_task_settings_update_payload: SearchTaskSettingsUpdatePayload,
2001
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2002
+ _request_timeout: Union[
2003
+ None,
2004
+ Annotated[StrictFloat, Field(gt=0)],
2005
+ Tuple[
2006
+ Annotated[StrictFloat, Field(gt=0)],
2007
+ Annotated[StrictFloat, Field(gt=0)]
2008
+ ]
2009
+ ] = None,
2010
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2011
+ _content_type: Optional[StrictStr] = None,
2012
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2013
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2014
+ ) -> RESTResponseType:
2015
+ """Update Search Task Settings Search
2016
+
2017
+
2018
+ :param search_task_settings_update_payload: (required)
2019
+ :type search_task_settings_update_payload: SearchTaskSettingsUpdatePayload
2020
+ :param q_answer_api_key: Optional QAnswer API key
2021
+ :type q_answer_api_key: str
2022
+ :param _request_timeout: timeout setting for this request. If one
2023
+ number provided, it will be total request
2024
+ timeout. It can also be a pair (tuple) of
2025
+ (connection, read) timeouts.
2026
+ :type _request_timeout: int, tuple(int, int), optional
2027
+ :param _request_auth: set to override the auth_settings for an a single
2028
+ request; this effectively ignores the
2029
+ authentication in the spec for a single request.
2030
+ :type _request_auth: dict, optional
2031
+ :param _content_type: force content-type for the request.
2032
+ :type _content_type: str, Optional
2033
+ :param _headers: set to override the headers for a single
2034
+ request; this effectively ignores the headers
2035
+ in the spec for a single request.
2036
+ :type _headers: dict, optional
2037
+ :param _host_index: set to override the host_index for a single
2038
+ request; this effectively ignores the host_index
2039
+ in the spec for a single request.
2040
+ :type _host_index: int, optional
2041
+ :return: Returns the result object.
2042
+ """ # noqa: E501
2043
+
2044
+ _param = self._update_search_task_settings_search_serialize(
2045
+ search_task_settings_update_payload=search_task_settings_update_payload,
2046
+ q_answer_api_key=q_answer_api_key,
2047
+ _request_auth=_request_auth,
2048
+ _content_type=_content_type,
2049
+ _headers=_headers,
2050
+ _host_index=_host_index
2051
+ )
2052
+
2053
+ _response_types_map: Dict[str, Optional[str]] = {
2054
+ '200': "SearchTaskSettings",
2055
+ '422': "HTTPValidationError",
2056
+ }
2057
+ response_data = self.api_client.call_api(
2058
+ *_param,
2059
+ _request_timeout=_request_timeout
2060
+ )
2061
+ return response_data.response
2062
+
2063
+
2064
+ def _update_search_task_settings_search_serialize(
2065
+ self,
2066
+ search_task_settings_update_payload,
2067
+ q_answer_api_key,
2068
+ _request_auth,
2069
+ _content_type,
2070
+ _headers,
2071
+ _host_index,
2072
+ ) -> RequestSerialized:
2073
+
2074
+ _host = None
2075
+
2076
+ _collection_formats: Dict[str, str] = {
2077
+ }
2078
+
2079
+ _path_params: Dict[str, str] = {}
2080
+ _query_params: List[Tuple[str, str]] = []
2081
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2082
+ _form_params: List[Tuple[str, str]] = []
2083
+ _files: Dict[
2084
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2085
+ ] = {}
2086
+ _body_params: Optional[bytes] = None
2087
+
2088
+ # process the path parameters
2089
+ # process the query parameters
2090
+ # process the header parameters
2091
+ if q_answer_api_key is not None:
2092
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2093
+ # process the form parameters
2094
+ # process the body parameter
2095
+ if search_task_settings_update_payload is not None:
2096
+ _body_params = search_task_settings_update_payload
2097
+
2098
+
2099
+ # set the HTTP header `Accept`
2100
+ if 'Accept' not in _header_params:
2101
+ _header_params['Accept'] = self.api_client.select_header_accept(
2102
+ [
2103
+ 'application/json'
2104
+ ]
2105
+ )
2106
+
2107
+ # set the HTTP header `Content-Type`
2108
+ if _content_type:
2109
+ _header_params['Content-Type'] = _content_type
2110
+ else:
2111
+ _default_content_type = (
2112
+ self.api_client.select_header_content_type(
2113
+ [
2114
+ 'application/json'
2115
+ ]
2116
+ )
2117
+ )
2118
+ if _default_content_type is not None:
2119
+ _header_params['Content-Type'] = _default_content_type
2120
+
2121
+ # authentication setting
2122
+ _auth_settings: List[str] = [
2123
+ 'QAnswer-Api-Key',
2124
+ 'Bearer token'
2125
+ ]
2126
+
2127
+ return self.api_client.param_serialize(
2128
+ method='PUT',
2129
+ resource_path='/api/tasks/search/settings',
2130
+ path_params=_path_params,
2131
+ query_params=_query_params,
2132
+ header_params=_header_params,
2133
+ body=_body_params,
2134
+ post_params=_form_params,
2135
+ files=_files,
2136
+ auth_settings=_auth_settings,
2137
+ collection_formats=_collection_formats,
2138
+ _host=_host,
2139
+ _request_auth=_request_auth
2140
+ )
2141
+
2142
+