qanswer_sdk 3.1193.0__py3-none-any.whl

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