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,2980 @@
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 StrictInt, StrictStr
20
+ from typing import Any, Dict, List, Optional
21
+ from qanswer_sdk.models.report_copilot_create_payload import ReportCopilotCreatePayload
22
+ from qanswer_sdk.models.report_copilot_export_template_as_docx_payload_simplified import ReportCopilotExportTemplateAsDocxPayloadSimplified
23
+ from qanswer_sdk.models.report_copilot_generation_from_slots_payload import ReportCopilotGenerationFromSlotsPayload
24
+ from qanswer_sdk.models.report_copilot_generation_from_slots_response import ReportCopilotGenerationFromSlotsResponse
25
+ from qanswer_sdk.models.report_copilot_refinement_payload import ReportCopilotRefinementPayload
26
+ from qanswer_sdk.models.report_copilot_refinement_response import ReportCopilotRefinementResponse
27
+ from qanswer_sdk.models.report_copilot_task_settings import ReportCopilotTaskSettings
28
+ from qanswer_sdk.models.report_copilot_task_settings_update_payload import ReportCopilotTaskSettingsUpdatePayload
29
+ from qanswer_sdk.models.report_copilot_template import ReportCopilotTemplate
30
+ from qanswer_sdk.models.report_copilot_template_simplified import ReportCopilotTemplateSimplified
31
+ from qanswer_sdk.models.report_copilot_update_payload import ReportCopilotUpdatePayload
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 TaskReportCopilotApi:
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 create_report_template(
53
+ self,
54
+ report_copilot_create_payload: ReportCopilotCreatePayload,
55
+ q_answer_api_key: Optional[StrictStr] = None,
56
+ _request_timeout: Union[
57
+ None,
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Tuple[
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Annotated[StrictFloat, Field(gt=0)]
62
+ ]
63
+ ] = None,
64
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
65
+ _content_type: Optional[StrictStr] = None,
66
+ _headers: Optional[Dict[StrictStr, Any]] = None,
67
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
68
+ ) -> ReportCopilotTemplate:
69
+ """Create a report template
70
+
71
+
72
+ :param report_copilot_create_payload: (required)
73
+ :type report_copilot_create_payload: ReportCopilotCreatePayload
74
+ :param q_answer_api_key:
75
+ :type q_answer_api_key: str
76
+ :param _request_timeout: timeout setting for this request. If one
77
+ number provided, it will be total request
78
+ timeout. It can also be a pair (tuple) of
79
+ (connection, read) timeouts.
80
+ :type _request_timeout: int, tuple(int, int), optional
81
+ :param _request_auth: set to override the auth_settings for an a single
82
+ request; this effectively ignores the
83
+ authentication in the spec for a single request.
84
+ :type _request_auth: dict, optional
85
+ :param _content_type: force content-type for the request.
86
+ :type _content_type: str, Optional
87
+ :param _headers: set to override the headers for a single
88
+ request; this effectively ignores the headers
89
+ in the spec for a single request.
90
+ :type _headers: dict, optional
91
+ :param _host_index: set to override the host_index for a single
92
+ request; this effectively ignores the host_index
93
+ in the spec for a single request.
94
+ :type _host_index: int, optional
95
+ :return: Returns the result object.
96
+ """ # noqa: E501
97
+
98
+ _param = self._create_report_template_serialize(
99
+ report_copilot_create_payload=report_copilot_create_payload,
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': "ReportCopilotTemplate",
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 create_report_template_with_http_info(
123
+ self,
124
+ report_copilot_create_payload: ReportCopilotCreatePayload,
125
+ q_answer_api_key: Optional[StrictStr] = None,
126
+ _request_timeout: Union[
127
+ None,
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Tuple[
130
+ Annotated[StrictFloat, Field(gt=0)],
131
+ Annotated[StrictFloat, Field(gt=0)]
132
+ ]
133
+ ] = None,
134
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
135
+ _content_type: Optional[StrictStr] = None,
136
+ _headers: Optional[Dict[StrictStr, Any]] = None,
137
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
138
+ ) -> ApiResponse[ReportCopilotTemplate]:
139
+ """Create a report template
140
+
141
+
142
+ :param report_copilot_create_payload: (required)
143
+ :type report_copilot_create_payload: ReportCopilotCreatePayload
144
+ :param q_answer_api_key:
145
+ :type q_answer_api_key: str
146
+ :param _request_timeout: timeout setting for this request. If one
147
+ number provided, it will be total request
148
+ timeout. It can also be a pair (tuple) of
149
+ (connection, read) timeouts.
150
+ :type _request_timeout: int, tuple(int, int), optional
151
+ :param _request_auth: set to override the auth_settings for an a single
152
+ request; this effectively ignores the
153
+ authentication in the spec for a single request.
154
+ :type _request_auth: dict, optional
155
+ :param _content_type: force content-type for the request.
156
+ :type _content_type: str, Optional
157
+ :param _headers: set to override the headers for a single
158
+ request; this effectively ignores the headers
159
+ in the spec for a single request.
160
+ :type _headers: dict, optional
161
+ :param _host_index: set to override the host_index for a single
162
+ request; this effectively ignores the host_index
163
+ in the spec for a single request.
164
+ :type _host_index: int, optional
165
+ :return: Returns the result object.
166
+ """ # noqa: E501
167
+
168
+ _param = self._create_report_template_serialize(
169
+ report_copilot_create_payload=report_copilot_create_payload,
170
+ q_answer_api_key=q_answer_api_key,
171
+ _request_auth=_request_auth,
172
+ _content_type=_content_type,
173
+ _headers=_headers,
174
+ _host_index=_host_index
175
+ )
176
+
177
+ _response_types_map: Dict[str, Optional[str]] = {
178
+ '200': "ReportCopilotTemplate",
179
+ }
180
+ response_data = self.api_client.call_api(
181
+ *_param,
182
+ _request_timeout=_request_timeout
183
+ )
184
+ response_data.read()
185
+ return self.api_client.response_deserialize(
186
+ response_data=response_data,
187
+ response_types_map=_response_types_map,
188
+ )
189
+
190
+
191
+ @validate_call
192
+ def create_report_template_without_preload_content(
193
+ self,
194
+ report_copilot_create_payload: ReportCopilotCreatePayload,
195
+ q_answer_api_key: Optional[StrictStr] = None,
196
+ _request_timeout: Union[
197
+ None,
198
+ Annotated[StrictFloat, Field(gt=0)],
199
+ Tuple[
200
+ Annotated[StrictFloat, Field(gt=0)],
201
+ Annotated[StrictFloat, Field(gt=0)]
202
+ ]
203
+ ] = None,
204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
205
+ _content_type: Optional[StrictStr] = None,
206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
208
+ ) -> RESTResponseType:
209
+ """Create a report template
210
+
211
+
212
+ :param report_copilot_create_payload: (required)
213
+ :type report_copilot_create_payload: ReportCopilotCreatePayload
214
+ :param q_answer_api_key:
215
+ :type q_answer_api_key: str
216
+ :param _request_timeout: timeout setting for this request. If one
217
+ number provided, it will be total request
218
+ timeout. It can also be a pair (tuple) of
219
+ (connection, read) timeouts.
220
+ :type _request_timeout: int, tuple(int, int), optional
221
+ :param _request_auth: set to override the auth_settings for an a single
222
+ request; this effectively ignores the
223
+ authentication in the spec for a single request.
224
+ :type _request_auth: dict, optional
225
+ :param _content_type: force content-type for the request.
226
+ :type _content_type: str, Optional
227
+ :param _headers: set to override the headers for a single
228
+ request; this effectively ignores the headers
229
+ in the spec for a single request.
230
+ :type _headers: dict, optional
231
+ :param _host_index: set to override the host_index for a single
232
+ request; this effectively ignores the host_index
233
+ in the spec for a single request.
234
+ :type _host_index: int, optional
235
+ :return: Returns the result object.
236
+ """ # noqa: E501
237
+
238
+ _param = self._create_report_template_serialize(
239
+ report_copilot_create_payload=report_copilot_create_payload,
240
+ q_answer_api_key=q_answer_api_key,
241
+ _request_auth=_request_auth,
242
+ _content_type=_content_type,
243
+ _headers=_headers,
244
+ _host_index=_host_index
245
+ )
246
+
247
+ _response_types_map: Dict[str, Optional[str]] = {
248
+ '200': "ReportCopilotTemplate",
249
+ }
250
+ response_data = self.api_client.call_api(
251
+ *_param,
252
+ _request_timeout=_request_timeout
253
+ )
254
+ return response_data.response
255
+
256
+
257
+ def _create_report_template_serialize(
258
+ self,
259
+ report_copilot_create_payload,
260
+ q_answer_api_key,
261
+ _request_auth,
262
+ _content_type,
263
+ _headers,
264
+ _host_index,
265
+ ) -> RequestSerialized:
266
+
267
+ _host = None
268
+
269
+ _collection_formats: Dict[str, str] = {
270
+ }
271
+
272
+ _path_params: Dict[str, str] = {}
273
+ _query_params: List[Tuple[str, str]] = []
274
+ _header_params: Dict[str, Optional[str]] = _headers or {}
275
+ _form_params: List[Tuple[str, str]] = []
276
+ _files: Dict[
277
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
278
+ ] = {}
279
+ _body_params: Optional[bytes] = None
280
+
281
+ # process the path parameters
282
+ # process the query parameters
283
+ # process the header parameters
284
+ if q_answer_api_key is not None:
285
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
286
+ # process the form parameters
287
+ # process the body parameter
288
+ if report_copilot_create_payload is not None:
289
+ _body_params = report_copilot_create_payload
290
+
291
+
292
+ # set the HTTP header `Accept`
293
+ if 'Accept' not in _header_params:
294
+ _header_params['Accept'] = self.api_client.select_header_accept(
295
+ [
296
+ '*/*'
297
+ ]
298
+ )
299
+
300
+ # set the HTTP header `Content-Type`
301
+ if _content_type:
302
+ _header_params['Content-Type'] = _content_type
303
+ else:
304
+ _default_content_type = (
305
+ self.api_client.select_header_content_type(
306
+ [
307
+ 'application/json'
308
+ ]
309
+ )
310
+ )
311
+ if _default_content_type is not None:
312
+ _header_params['Content-Type'] = _default_content_type
313
+
314
+ # authentication setting
315
+ _auth_settings: List[str] = [
316
+ 'QAnswer-Api-Key',
317
+ 'Bearer'
318
+ ]
319
+
320
+ return self.api_client.param_serialize(
321
+ method='POST',
322
+ resource_path='/api/tasks/report-copilot/templates',
323
+ path_params=_path_params,
324
+ query_params=_query_params,
325
+ header_params=_header_params,
326
+ body=_body_params,
327
+ post_params=_form_params,
328
+ files=_files,
329
+ auth_settings=_auth_settings,
330
+ collection_formats=_collection_formats,
331
+ _host=_host,
332
+ _request_auth=_request_auth
333
+ )
334
+
335
+
336
+
337
+
338
+ @validate_call
339
+ def delete_report_template(
340
+ self,
341
+ username: StrictStr,
342
+ dataset: StrictStr,
343
+ template_id: StrictInt,
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
+ """Delete a report template
359
+
360
+
361
+ :param username: (required)
362
+ :type username: str
363
+ :param dataset: (required)
364
+ :type dataset: str
365
+ :param template_id: (required)
366
+ :type template_id: int
367
+ :param q_answer_api_key:
368
+ :type q_answer_api_key: str
369
+ :param _request_timeout: timeout setting for this request. If one
370
+ number provided, it will be total request
371
+ timeout. It can also be a pair (tuple) of
372
+ (connection, read) timeouts.
373
+ :type _request_timeout: int, tuple(int, int), optional
374
+ :param _request_auth: set to override the auth_settings for an a single
375
+ request; this effectively ignores the
376
+ authentication in the spec for a single request.
377
+ :type _request_auth: dict, optional
378
+ :param _content_type: force content-type for the request.
379
+ :type _content_type: str, Optional
380
+ :param _headers: set to override the headers for a single
381
+ request; this effectively ignores the headers
382
+ in the spec for a single request.
383
+ :type _headers: dict, optional
384
+ :param _host_index: set to override the host_index for a single
385
+ request; this effectively ignores the host_index
386
+ in the spec for a single request.
387
+ :type _host_index: int, optional
388
+ :return: Returns the result object.
389
+ """ # noqa: E501
390
+
391
+ _param = self._delete_report_template_serialize(
392
+ username=username,
393
+ dataset=dataset,
394
+ template_id=template_id,
395
+ q_answer_api_key=q_answer_api_key,
396
+ _request_auth=_request_auth,
397
+ _content_type=_content_type,
398
+ _headers=_headers,
399
+ _host_index=_host_index
400
+ )
401
+
402
+ _response_types_map: Dict[str, Optional[str]] = {
403
+ '200': None,
404
+ }
405
+ response_data = self.api_client.call_api(
406
+ *_param,
407
+ _request_timeout=_request_timeout
408
+ )
409
+ response_data.read()
410
+ return self.api_client.response_deserialize(
411
+ response_data=response_data,
412
+ response_types_map=_response_types_map,
413
+ ).data
414
+
415
+
416
+ @validate_call
417
+ def delete_report_template_with_http_info(
418
+ self,
419
+ username: StrictStr,
420
+ dataset: StrictStr,
421
+ template_id: StrictInt,
422
+ q_answer_api_key: Optional[StrictStr] = None,
423
+ _request_timeout: Union[
424
+ None,
425
+ Annotated[StrictFloat, Field(gt=0)],
426
+ Tuple[
427
+ Annotated[StrictFloat, Field(gt=0)],
428
+ Annotated[StrictFloat, Field(gt=0)]
429
+ ]
430
+ ] = None,
431
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
432
+ _content_type: Optional[StrictStr] = None,
433
+ _headers: Optional[Dict[StrictStr, Any]] = None,
434
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
435
+ ) -> ApiResponse[None]:
436
+ """Delete a report template
437
+
438
+
439
+ :param username: (required)
440
+ :type username: str
441
+ :param dataset: (required)
442
+ :type dataset: str
443
+ :param template_id: (required)
444
+ :type template_id: int
445
+ :param q_answer_api_key:
446
+ :type q_answer_api_key: str
447
+ :param _request_timeout: timeout setting for this request. If one
448
+ number provided, it will be total request
449
+ timeout. It can also be a pair (tuple) of
450
+ (connection, read) timeouts.
451
+ :type _request_timeout: int, tuple(int, int), optional
452
+ :param _request_auth: set to override the auth_settings for an a single
453
+ request; this effectively ignores the
454
+ authentication in the spec for a single request.
455
+ :type _request_auth: dict, optional
456
+ :param _content_type: force content-type for the request.
457
+ :type _content_type: str, Optional
458
+ :param _headers: set to override the headers for a single
459
+ request; this effectively ignores the headers
460
+ in the spec for a single request.
461
+ :type _headers: dict, optional
462
+ :param _host_index: set to override the host_index for a single
463
+ request; this effectively ignores the host_index
464
+ in the spec for a single request.
465
+ :type _host_index: int, optional
466
+ :return: Returns the result object.
467
+ """ # noqa: E501
468
+
469
+ _param = self._delete_report_template_serialize(
470
+ username=username,
471
+ dataset=dataset,
472
+ template_id=template_id,
473
+ q_answer_api_key=q_answer_api_key,
474
+ _request_auth=_request_auth,
475
+ _content_type=_content_type,
476
+ _headers=_headers,
477
+ _host_index=_host_index
478
+ )
479
+
480
+ _response_types_map: Dict[str, Optional[str]] = {
481
+ '200': None,
482
+ }
483
+ response_data = self.api_client.call_api(
484
+ *_param,
485
+ _request_timeout=_request_timeout
486
+ )
487
+ response_data.read()
488
+ return self.api_client.response_deserialize(
489
+ response_data=response_data,
490
+ response_types_map=_response_types_map,
491
+ )
492
+
493
+
494
+ @validate_call
495
+ def delete_report_template_without_preload_content(
496
+ self,
497
+ username: StrictStr,
498
+ dataset: StrictStr,
499
+ template_id: StrictInt,
500
+ q_answer_api_key: Optional[StrictStr] = None,
501
+ _request_timeout: Union[
502
+ None,
503
+ Annotated[StrictFloat, Field(gt=0)],
504
+ Tuple[
505
+ Annotated[StrictFloat, Field(gt=0)],
506
+ Annotated[StrictFloat, Field(gt=0)]
507
+ ]
508
+ ] = None,
509
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
510
+ _content_type: Optional[StrictStr] = None,
511
+ _headers: Optional[Dict[StrictStr, Any]] = None,
512
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
513
+ ) -> RESTResponseType:
514
+ """Delete a report template
515
+
516
+
517
+ :param username: (required)
518
+ :type username: str
519
+ :param dataset: (required)
520
+ :type dataset: str
521
+ :param template_id: (required)
522
+ :type template_id: int
523
+ :param q_answer_api_key:
524
+ :type q_answer_api_key: str
525
+ :param _request_timeout: timeout setting for this request. If one
526
+ number provided, it will be total request
527
+ timeout. It can also be a pair (tuple) of
528
+ (connection, read) timeouts.
529
+ :type _request_timeout: int, tuple(int, int), optional
530
+ :param _request_auth: set to override the auth_settings for an a single
531
+ request; this effectively ignores the
532
+ authentication in the spec for a single request.
533
+ :type _request_auth: dict, optional
534
+ :param _content_type: force content-type for the request.
535
+ :type _content_type: str, Optional
536
+ :param _headers: set to override the headers for a single
537
+ request; this effectively ignores the headers
538
+ in the spec for a single request.
539
+ :type _headers: dict, optional
540
+ :param _host_index: set to override the host_index for a single
541
+ request; this effectively ignores the host_index
542
+ in the spec for a single request.
543
+ :type _host_index: int, optional
544
+ :return: Returns the result object.
545
+ """ # noqa: E501
546
+
547
+ _param = self._delete_report_template_serialize(
548
+ username=username,
549
+ dataset=dataset,
550
+ template_id=template_id,
551
+ q_answer_api_key=q_answer_api_key,
552
+ _request_auth=_request_auth,
553
+ _content_type=_content_type,
554
+ _headers=_headers,
555
+ _host_index=_host_index
556
+ )
557
+
558
+ _response_types_map: Dict[str, Optional[str]] = {
559
+ '200': None,
560
+ }
561
+ response_data = self.api_client.call_api(
562
+ *_param,
563
+ _request_timeout=_request_timeout
564
+ )
565
+ return response_data.response
566
+
567
+
568
+ def _delete_report_template_serialize(
569
+ self,
570
+ username,
571
+ dataset,
572
+ template_id,
573
+ q_answer_api_key,
574
+ _request_auth,
575
+ _content_type,
576
+ _headers,
577
+ _host_index,
578
+ ) -> RequestSerialized:
579
+
580
+ _host = None
581
+
582
+ _collection_formats: Dict[str, str] = {
583
+ }
584
+
585
+ _path_params: Dict[str, str] = {}
586
+ _query_params: List[Tuple[str, str]] = []
587
+ _header_params: Dict[str, Optional[str]] = _headers or {}
588
+ _form_params: List[Tuple[str, str]] = []
589
+ _files: Dict[
590
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
591
+ ] = {}
592
+ _body_params: Optional[bytes] = None
593
+
594
+ # process the path parameters
595
+ if template_id is not None:
596
+ _path_params['templateId'] = template_id
597
+ # process the query parameters
598
+ if username is not None:
599
+
600
+ _query_params.append(('username', username))
601
+
602
+ if dataset is not None:
603
+
604
+ _query_params.append(('dataset', dataset))
605
+
606
+ # process the header parameters
607
+ if q_answer_api_key is not None:
608
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
609
+ # process the form parameters
610
+ # process the body parameter
611
+
612
+
613
+
614
+
615
+ # authentication setting
616
+ _auth_settings: List[str] = [
617
+ 'QAnswer-Api-Key',
618
+ 'Bearer'
619
+ ]
620
+
621
+ return self.api_client.param_serialize(
622
+ method='DELETE',
623
+ resource_path='/api/tasks/report-copilot/templates/{templateId}',
624
+ path_params=_path_params,
625
+ query_params=_query_params,
626
+ header_params=_header_params,
627
+ body=_body_params,
628
+ post_params=_form_params,
629
+ files=_files,
630
+ auth_settings=_auth_settings,
631
+ collection_formats=_collection_formats,
632
+ _host=_host,
633
+ _request_auth=_request_auth
634
+ )
635
+
636
+
637
+
638
+
639
+ @validate_call
640
+ def export_template_as_docx(
641
+ self,
642
+ report_copilot_export_template_as_docx_payload_simplified: ReportCopilotExportTemplateAsDocxPayloadSimplified,
643
+ q_answer_api_key: Optional[StrictStr] = None,
644
+ _request_timeout: Union[
645
+ None,
646
+ Annotated[StrictFloat, Field(gt=0)],
647
+ Tuple[
648
+ Annotated[StrictFloat, Field(gt=0)],
649
+ Annotated[StrictFloat, Field(gt=0)]
650
+ ]
651
+ ] = None,
652
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
653
+ _content_type: Optional[StrictStr] = None,
654
+ _headers: Optional[Dict[StrictStr, Any]] = None,
655
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
656
+ ) -> object:
657
+ """Export template html as docx file
658
+
659
+
660
+ :param report_copilot_export_template_as_docx_payload_simplified: (required)
661
+ :type report_copilot_export_template_as_docx_payload_simplified: ReportCopilotExportTemplateAsDocxPayloadSimplified
662
+ :param q_answer_api_key:
663
+ :type q_answer_api_key: str
664
+ :param _request_timeout: timeout setting for this request. If one
665
+ number provided, it will be total request
666
+ timeout. It can also be a pair (tuple) of
667
+ (connection, read) timeouts.
668
+ :type _request_timeout: int, tuple(int, int), optional
669
+ :param _request_auth: set to override the auth_settings for an a single
670
+ request; this effectively ignores the
671
+ authentication in the spec for a single request.
672
+ :type _request_auth: dict, optional
673
+ :param _content_type: force content-type for the request.
674
+ :type _content_type: str, Optional
675
+ :param _headers: set to override the headers for a single
676
+ request; this effectively ignores the headers
677
+ in the spec for a single request.
678
+ :type _headers: dict, optional
679
+ :param _host_index: set to override the host_index for a single
680
+ request; this effectively ignores the host_index
681
+ in the spec for a single request.
682
+ :type _host_index: int, optional
683
+ :return: Returns the result object.
684
+ """ # noqa: E501
685
+
686
+ _param = self._export_template_as_docx_serialize(
687
+ report_copilot_export_template_as_docx_payload_simplified=report_copilot_export_template_as_docx_payload_simplified,
688
+ q_answer_api_key=q_answer_api_key,
689
+ _request_auth=_request_auth,
690
+ _content_type=_content_type,
691
+ _headers=_headers,
692
+ _host_index=_host_index
693
+ )
694
+
695
+ _response_types_map: Dict[str, Optional[str]] = {
696
+ '200': "object",
697
+ }
698
+ response_data = self.api_client.call_api(
699
+ *_param,
700
+ _request_timeout=_request_timeout
701
+ )
702
+ response_data.read()
703
+ return self.api_client.response_deserialize(
704
+ response_data=response_data,
705
+ response_types_map=_response_types_map,
706
+ ).data
707
+
708
+
709
+ @validate_call
710
+ def export_template_as_docx_with_http_info(
711
+ self,
712
+ report_copilot_export_template_as_docx_payload_simplified: ReportCopilotExportTemplateAsDocxPayloadSimplified,
713
+ q_answer_api_key: Optional[StrictStr] = None,
714
+ _request_timeout: Union[
715
+ None,
716
+ Annotated[StrictFloat, Field(gt=0)],
717
+ Tuple[
718
+ Annotated[StrictFloat, Field(gt=0)],
719
+ Annotated[StrictFloat, Field(gt=0)]
720
+ ]
721
+ ] = None,
722
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
723
+ _content_type: Optional[StrictStr] = None,
724
+ _headers: Optional[Dict[StrictStr, Any]] = None,
725
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
726
+ ) -> ApiResponse[object]:
727
+ """Export template html as docx file
728
+
729
+
730
+ :param report_copilot_export_template_as_docx_payload_simplified: (required)
731
+ :type report_copilot_export_template_as_docx_payload_simplified: ReportCopilotExportTemplateAsDocxPayloadSimplified
732
+ :param q_answer_api_key:
733
+ :type q_answer_api_key: str
734
+ :param _request_timeout: timeout setting for this request. If one
735
+ number provided, it will be total request
736
+ timeout. It can also be a pair (tuple) of
737
+ (connection, read) timeouts.
738
+ :type _request_timeout: int, tuple(int, int), optional
739
+ :param _request_auth: set to override the auth_settings for an a single
740
+ request; this effectively ignores the
741
+ authentication in the spec for a single request.
742
+ :type _request_auth: dict, optional
743
+ :param _content_type: force content-type for the request.
744
+ :type _content_type: str, Optional
745
+ :param _headers: set to override the headers for a single
746
+ request; this effectively ignores the headers
747
+ in the spec for a single request.
748
+ :type _headers: dict, optional
749
+ :param _host_index: set to override the host_index for a single
750
+ request; this effectively ignores the host_index
751
+ in the spec for a single request.
752
+ :type _host_index: int, optional
753
+ :return: Returns the result object.
754
+ """ # noqa: E501
755
+
756
+ _param = self._export_template_as_docx_serialize(
757
+ report_copilot_export_template_as_docx_payload_simplified=report_copilot_export_template_as_docx_payload_simplified,
758
+ q_answer_api_key=q_answer_api_key,
759
+ _request_auth=_request_auth,
760
+ _content_type=_content_type,
761
+ _headers=_headers,
762
+ _host_index=_host_index
763
+ )
764
+
765
+ _response_types_map: Dict[str, Optional[str]] = {
766
+ '200': "object",
767
+ }
768
+ response_data = self.api_client.call_api(
769
+ *_param,
770
+ _request_timeout=_request_timeout
771
+ )
772
+ response_data.read()
773
+ return self.api_client.response_deserialize(
774
+ response_data=response_data,
775
+ response_types_map=_response_types_map,
776
+ )
777
+
778
+
779
+ @validate_call
780
+ def export_template_as_docx_without_preload_content(
781
+ self,
782
+ report_copilot_export_template_as_docx_payload_simplified: ReportCopilotExportTemplateAsDocxPayloadSimplified,
783
+ q_answer_api_key: Optional[StrictStr] = None,
784
+ _request_timeout: Union[
785
+ None,
786
+ Annotated[StrictFloat, Field(gt=0)],
787
+ Tuple[
788
+ Annotated[StrictFloat, Field(gt=0)],
789
+ Annotated[StrictFloat, Field(gt=0)]
790
+ ]
791
+ ] = None,
792
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
793
+ _content_type: Optional[StrictStr] = None,
794
+ _headers: Optional[Dict[StrictStr, Any]] = None,
795
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
796
+ ) -> RESTResponseType:
797
+ """Export template html as docx file
798
+
799
+
800
+ :param report_copilot_export_template_as_docx_payload_simplified: (required)
801
+ :type report_copilot_export_template_as_docx_payload_simplified: ReportCopilotExportTemplateAsDocxPayloadSimplified
802
+ :param q_answer_api_key:
803
+ :type q_answer_api_key: str
804
+ :param _request_timeout: timeout setting for this request. If one
805
+ number provided, it will be total request
806
+ timeout. It can also be a pair (tuple) of
807
+ (connection, read) timeouts.
808
+ :type _request_timeout: int, tuple(int, int), optional
809
+ :param _request_auth: set to override the auth_settings for an a single
810
+ request; this effectively ignores the
811
+ authentication in the spec for a single request.
812
+ :type _request_auth: dict, optional
813
+ :param _content_type: force content-type for the request.
814
+ :type _content_type: str, Optional
815
+ :param _headers: set to override the headers for a single
816
+ request; this effectively ignores the headers
817
+ in the spec for a single request.
818
+ :type _headers: dict, optional
819
+ :param _host_index: set to override the host_index for a single
820
+ request; this effectively ignores the host_index
821
+ in the spec for a single request.
822
+ :type _host_index: int, optional
823
+ :return: Returns the result object.
824
+ """ # noqa: E501
825
+
826
+ _param = self._export_template_as_docx_serialize(
827
+ report_copilot_export_template_as_docx_payload_simplified=report_copilot_export_template_as_docx_payload_simplified,
828
+ q_answer_api_key=q_answer_api_key,
829
+ _request_auth=_request_auth,
830
+ _content_type=_content_type,
831
+ _headers=_headers,
832
+ _host_index=_host_index
833
+ )
834
+
835
+ _response_types_map: Dict[str, Optional[str]] = {
836
+ '200': "object",
837
+ }
838
+ response_data = self.api_client.call_api(
839
+ *_param,
840
+ _request_timeout=_request_timeout
841
+ )
842
+ return response_data.response
843
+
844
+
845
+ def _export_template_as_docx_serialize(
846
+ self,
847
+ report_copilot_export_template_as_docx_payload_simplified,
848
+ q_answer_api_key,
849
+ _request_auth,
850
+ _content_type,
851
+ _headers,
852
+ _host_index,
853
+ ) -> RequestSerialized:
854
+
855
+ _host = None
856
+
857
+ _collection_formats: Dict[str, str] = {
858
+ }
859
+
860
+ _path_params: Dict[str, str] = {}
861
+ _query_params: List[Tuple[str, str]] = []
862
+ _header_params: Dict[str, Optional[str]] = _headers or {}
863
+ _form_params: List[Tuple[str, str]] = []
864
+ _files: Dict[
865
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
866
+ ] = {}
867
+ _body_params: Optional[bytes] = None
868
+
869
+ # process the path parameters
870
+ # process the query parameters
871
+ # process the header parameters
872
+ if q_answer_api_key is not None:
873
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
874
+ # process the form parameters
875
+ # process the body parameter
876
+ if report_copilot_export_template_as_docx_payload_simplified is not None:
877
+ _body_params = report_copilot_export_template_as_docx_payload_simplified
878
+
879
+
880
+ # set the HTTP header `Accept`
881
+ if 'Accept' not in _header_params:
882
+ _header_params['Accept'] = self.api_client.select_header_accept(
883
+ [
884
+ '*/*'
885
+ ]
886
+ )
887
+
888
+ # set the HTTP header `Content-Type`
889
+ if _content_type:
890
+ _header_params['Content-Type'] = _content_type
891
+ else:
892
+ _default_content_type = (
893
+ self.api_client.select_header_content_type(
894
+ [
895
+ 'application/json'
896
+ ]
897
+ )
898
+ )
899
+ if _default_content_type is not None:
900
+ _header_params['Content-Type'] = _default_content_type
901
+
902
+ # authentication setting
903
+ _auth_settings: List[str] = [
904
+ 'QAnswer-Api-Key',
905
+ 'Bearer'
906
+ ]
907
+
908
+ return self.api_client.param_serialize(
909
+ method='POST',
910
+ resource_path='/api/tasks/report-copilot/templates/export-as-docx',
911
+ path_params=_path_params,
912
+ query_params=_query_params,
913
+ header_params=_header_params,
914
+ body=_body_params,
915
+ post_params=_form_params,
916
+ files=_files,
917
+ auth_settings=_auth_settings,
918
+ collection_formats=_collection_formats,
919
+ _host=_host,
920
+ _request_auth=_request_auth
921
+ )
922
+
923
+
924
+
925
+
926
+ @validate_call
927
+ def free_text_report_copilot_task_read_settings(
928
+ self,
929
+ username: StrictStr,
930
+ dataset: StrictStr,
931
+ q_answer_api_key: Optional[StrictStr] = None,
932
+ _request_timeout: Union[
933
+ None,
934
+ Annotated[StrictFloat, Field(gt=0)],
935
+ Tuple[
936
+ Annotated[StrictFloat, Field(gt=0)],
937
+ Annotated[StrictFloat, Field(gt=0)]
938
+ ]
939
+ ] = None,
940
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
941
+ _content_type: Optional[StrictStr] = None,
942
+ _headers: Optional[Dict[StrictStr, Any]] = None,
943
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
944
+ ) -> ReportCopilotTaskSettings:
945
+ """This updates the settings of the report-copilot task
946
+
947
+
948
+ :param username: (required)
949
+ :type username: str
950
+ :param dataset: (required)
951
+ :type dataset: str
952
+ :param q_answer_api_key:
953
+ :type q_answer_api_key: str
954
+ :param _request_timeout: timeout setting for this request. If one
955
+ number provided, it will be total request
956
+ timeout. It can also be a pair (tuple) of
957
+ (connection, read) timeouts.
958
+ :type _request_timeout: int, tuple(int, int), optional
959
+ :param _request_auth: set to override the auth_settings for an a single
960
+ request; this effectively ignores the
961
+ authentication in the spec for a single request.
962
+ :type _request_auth: dict, optional
963
+ :param _content_type: force content-type for the request.
964
+ :type _content_type: str, Optional
965
+ :param _headers: set to override the headers for a single
966
+ request; this effectively ignores the headers
967
+ in the spec for a single request.
968
+ :type _headers: dict, optional
969
+ :param _host_index: set to override the host_index for a single
970
+ request; this effectively ignores the host_index
971
+ in the spec for a single request.
972
+ :type _host_index: int, optional
973
+ :return: Returns the result object.
974
+ """ # noqa: E501
975
+
976
+ _param = self._free_text_report_copilot_task_read_settings_serialize(
977
+ username=username,
978
+ dataset=dataset,
979
+ q_answer_api_key=q_answer_api_key,
980
+ _request_auth=_request_auth,
981
+ _content_type=_content_type,
982
+ _headers=_headers,
983
+ _host_index=_host_index
984
+ )
985
+
986
+ _response_types_map: Dict[str, Optional[str]] = {
987
+ '200': "ReportCopilotTaskSettings",
988
+ }
989
+ response_data = self.api_client.call_api(
990
+ *_param,
991
+ _request_timeout=_request_timeout
992
+ )
993
+ response_data.read()
994
+ return self.api_client.response_deserialize(
995
+ response_data=response_data,
996
+ response_types_map=_response_types_map,
997
+ ).data
998
+
999
+
1000
+ @validate_call
1001
+ def free_text_report_copilot_task_read_settings_with_http_info(
1002
+ self,
1003
+ username: StrictStr,
1004
+ dataset: StrictStr,
1005
+ q_answer_api_key: Optional[StrictStr] = None,
1006
+ _request_timeout: Union[
1007
+ None,
1008
+ Annotated[StrictFloat, Field(gt=0)],
1009
+ Tuple[
1010
+ Annotated[StrictFloat, Field(gt=0)],
1011
+ Annotated[StrictFloat, Field(gt=0)]
1012
+ ]
1013
+ ] = None,
1014
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1015
+ _content_type: Optional[StrictStr] = None,
1016
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1017
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1018
+ ) -> ApiResponse[ReportCopilotTaskSettings]:
1019
+ """This updates the settings of the report-copilot task
1020
+
1021
+
1022
+ :param username: (required)
1023
+ :type username: str
1024
+ :param dataset: (required)
1025
+ :type dataset: str
1026
+ :param q_answer_api_key:
1027
+ :type q_answer_api_key: str
1028
+ :param _request_timeout: timeout setting for this request. If one
1029
+ number provided, it will be total request
1030
+ timeout. It can also be a pair (tuple) of
1031
+ (connection, read) timeouts.
1032
+ :type _request_timeout: int, tuple(int, int), optional
1033
+ :param _request_auth: set to override the auth_settings for an a single
1034
+ request; this effectively ignores the
1035
+ authentication in the spec for a single request.
1036
+ :type _request_auth: dict, optional
1037
+ :param _content_type: force content-type for the request.
1038
+ :type _content_type: str, Optional
1039
+ :param _headers: set to override the headers for a single
1040
+ request; this effectively ignores the headers
1041
+ in the spec for a single request.
1042
+ :type _headers: dict, optional
1043
+ :param _host_index: set to override the host_index for a single
1044
+ request; this effectively ignores the host_index
1045
+ in the spec for a single request.
1046
+ :type _host_index: int, optional
1047
+ :return: Returns the result object.
1048
+ """ # noqa: E501
1049
+
1050
+ _param = self._free_text_report_copilot_task_read_settings_serialize(
1051
+ username=username,
1052
+ dataset=dataset,
1053
+ q_answer_api_key=q_answer_api_key,
1054
+ _request_auth=_request_auth,
1055
+ _content_type=_content_type,
1056
+ _headers=_headers,
1057
+ _host_index=_host_index
1058
+ )
1059
+
1060
+ _response_types_map: Dict[str, Optional[str]] = {
1061
+ '200': "ReportCopilotTaskSettings",
1062
+ }
1063
+ response_data = self.api_client.call_api(
1064
+ *_param,
1065
+ _request_timeout=_request_timeout
1066
+ )
1067
+ response_data.read()
1068
+ return self.api_client.response_deserialize(
1069
+ response_data=response_data,
1070
+ response_types_map=_response_types_map,
1071
+ )
1072
+
1073
+
1074
+ @validate_call
1075
+ def free_text_report_copilot_task_read_settings_without_preload_content(
1076
+ self,
1077
+ username: StrictStr,
1078
+ dataset: StrictStr,
1079
+ q_answer_api_key: Optional[StrictStr] = None,
1080
+ _request_timeout: Union[
1081
+ None,
1082
+ Annotated[StrictFloat, Field(gt=0)],
1083
+ Tuple[
1084
+ Annotated[StrictFloat, Field(gt=0)],
1085
+ Annotated[StrictFloat, Field(gt=0)]
1086
+ ]
1087
+ ] = None,
1088
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1089
+ _content_type: Optional[StrictStr] = None,
1090
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1091
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1092
+ ) -> RESTResponseType:
1093
+ """This updates the settings of the report-copilot task
1094
+
1095
+
1096
+ :param username: (required)
1097
+ :type username: str
1098
+ :param dataset: (required)
1099
+ :type dataset: str
1100
+ :param q_answer_api_key:
1101
+ :type q_answer_api_key: str
1102
+ :param _request_timeout: timeout setting for this request. If one
1103
+ number provided, it will be total request
1104
+ timeout. It can also be a pair (tuple) of
1105
+ (connection, read) timeouts.
1106
+ :type _request_timeout: int, tuple(int, int), optional
1107
+ :param _request_auth: set to override the auth_settings for an a single
1108
+ request; this effectively ignores the
1109
+ authentication in the spec for a single request.
1110
+ :type _request_auth: dict, optional
1111
+ :param _content_type: force content-type for the request.
1112
+ :type _content_type: str, Optional
1113
+ :param _headers: set to override the headers for a single
1114
+ request; this effectively ignores the headers
1115
+ in the spec for a single request.
1116
+ :type _headers: dict, optional
1117
+ :param _host_index: set to override the host_index for a single
1118
+ request; this effectively ignores the host_index
1119
+ in the spec for a single request.
1120
+ :type _host_index: int, optional
1121
+ :return: Returns the result object.
1122
+ """ # noqa: E501
1123
+
1124
+ _param = self._free_text_report_copilot_task_read_settings_serialize(
1125
+ username=username,
1126
+ dataset=dataset,
1127
+ q_answer_api_key=q_answer_api_key,
1128
+ _request_auth=_request_auth,
1129
+ _content_type=_content_type,
1130
+ _headers=_headers,
1131
+ _host_index=_host_index
1132
+ )
1133
+
1134
+ _response_types_map: Dict[str, Optional[str]] = {
1135
+ '200': "ReportCopilotTaskSettings",
1136
+ }
1137
+ response_data = self.api_client.call_api(
1138
+ *_param,
1139
+ _request_timeout=_request_timeout
1140
+ )
1141
+ return response_data.response
1142
+
1143
+
1144
+ def _free_text_report_copilot_task_read_settings_serialize(
1145
+ self,
1146
+ username,
1147
+ dataset,
1148
+ q_answer_api_key,
1149
+ _request_auth,
1150
+ _content_type,
1151
+ _headers,
1152
+ _host_index,
1153
+ ) -> RequestSerialized:
1154
+
1155
+ _host = None
1156
+
1157
+ _collection_formats: Dict[str, str] = {
1158
+ }
1159
+
1160
+ _path_params: Dict[str, str] = {}
1161
+ _query_params: List[Tuple[str, str]] = []
1162
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1163
+ _form_params: List[Tuple[str, str]] = []
1164
+ _files: Dict[
1165
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1166
+ ] = {}
1167
+ _body_params: Optional[bytes] = None
1168
+
1169
+ # process the path parameters
1170
+ # process the query parameters
1171
+ if username is not None:
1172
+
1173
+ _query_params.append(('username', username))
1174
+
1175
+ if dataset is not None:
1176
+
1177
+ _query_params.append(('dataset', dataset))
1178
+
1179
+ # process the header parameters
1180
+ if q_answer_api_key is not None:
1181
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1182
+ # process the form parameters
1183
+ # process the body parameter
1184
+
1185
+
1186
+ # set the HTTP header `Accept`
1187
+ if 'Accept' not in _header_params:
1188
+ _header_params['Accept'] = self.api_client.select_header_accept(
1189
+ [
1190
+ '*/*'
1191
+ ]
1192
+ )
1193
+
1194
+
1195
+ # authentication setting
1196
+ _auth_settings: List[str] = [
1197
+ 'QAnswer-Api-Key',
1198
+ 'Bearer'
1199
+ ]
1200
+
1201
+ return self.api_client.param_serialize(
1202
+ method='GET',
1203
+ resource_path='/api/tasks/report-copilot/settings',
1204
+ path_params=_path_params,
1205
+ query_params=_query_params,
1206
+ header_params=_header_params,
1207
+ body=_body_params,
1208
+ post_params=_form_params,
1209
+ files=_files,
1210
+ auth_settings=_auth_settings,
1211
+ collection_formats=_collection_formats,
1212
+ _host=_host,
1213
+ _request_auth=_request_auth
1214
+ )
1215
+
1216
+
1217
+
1218
+
1219
+ @validate_call
1220
+ def free_text_report_copilot_task_update_settings(
1221
+ self,
1222
+ report_copilot_task_settings_update_payload: ReportCopilotTaskSettingsUpdatePayload,
1223
+ q_answer_api_key: Optional[StrictStr] = None,
1224
+ _request_timeout: Union[
1225
+ None,
1226
+ Annotated[StrictFloat, Field(gt=0)],
1227
+ Tuple[
1228
+ Annotated[StrictFloat, Field(gt=0)],
1229
+ Annotated[StrictFloat, Field(gt=0)]
1230
+ ]
1231
+ ] = None,
1232
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1233
+ _content_type: Optional[StrictStr] = None,
1234
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1235
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1236
+ ) -> ReportCopilotTaskSettings:
1237
+ """This updates the settings of the report-copilot task
1238
+
1239
+
1240
+ :param report_copilot_task_settings_update_payload: (required)
1241
+ :type report_copilot_task_settings_update_payload: ReportCopilotTaskSettingsUpdatePayload
1242
+ :param q_answer_api_key:
1243
+ :type q_answer_api_key: str
1244
+ :param _request_timeout: timeout setting for this request. If one
1245
+ number provided, it will be total request
1246
+ timeout. It can also be a pair (tuple) of
1247
+ (connection, read) timeouts.
1248
+ :type _request_timeout: int, tuple(int, int), optional
1249
+ :param _request_auth: set to override the auth_settings for an a single
1250
+ request; this effectively ignores the
1251
+ authentication in the spec for a single request.
1252
+ :type _request_auth: dict, optional
1253
+ :param _content_type: force content-type for the request.
1254
+ :type _content_type: str, Optional
1255
+ :param _headers: set to override the headers for a single
1256
+ request; this effectively ignores the headers
1257
+ in the spec for a single request.
1258
+ :type _headers: dict, optional
1259
+ :param _host_index: set to override the host_index for a single
1260
+ request; this effectively ignores the host_index
1261
+ in the spec for a single request.
1262
+ :type _host_index: int, optional
1263
+ :return: Returns the result object.
1264
+ """ # noqa: E501
1265
+
1266
+ _param = self._free_text_report_copilot_task_update_settings_serialize(
1267
+ report_copilot_task_settings_update_payload=report_copilot_task_settings_update_payload,
1268
+ q_answer_api_key=q_answer_api_key,
1269
+ _request_auth=_request_auth,
1270
+ _content_type=_content_type,
1271
+ _headers=_headers,
1272
+ _host_index=_host_index
1273
+ )
1274
+
1275
+ _response_types_map: Dict[str, Optional[str]] = {
1276
+ '200': "ReportCopilotTaskSettings",
1277
+ }
1278
+ response_data = self.api_client.call_api(
1279
+ *_param,
1280
+ _request_timeout=_request_timeout
1281
+ )
1282
+ response_data.read()
1283
+ return self.api_client.response_deserialize(
1284
+ response_data=response_data,
1285
+ response_types_map=_response_types_map,
1286
+ ).data
1287
+
1288
+
1289
+ @validate_call
1290
+ def free_text_report_copilot_task_update_settings_with_http_info(
1291
+ self,
1292
+ report_copilot_task_settings_update_payload: ReportCopilotTaskSettingsUpdatePayload,
1293
+ q_answer_api_key: Optional[StrictStr] = None,
1294
+ _request_timeout: Union[
1295
+ None,
1296
+ Annotated[StrictFloat, Field(gt=0)],
1297
+ Tuple[
1298
+ Annotated[StrictFloat, Field(gt=0)],
1299
+ Annotated[StrictFloat, Field(gt=0)]
1300
+ ]
1301
+ ] = None,
1302
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1303
+ _content_type: Optional[StrictStr] = None,
1304
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1305
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1306
+ ) -> ApiResponse[ReportCopilotTaskSettings]:
1307
+ """This updates the settings of the report-copilot task
1308
+
1309
+
1310
+ :param report_copilot_task_settings_update_payload: (required)
1311
+ :type report_copilot_task_settings_update_payload: ReportCopilotTaskSettingsUpdatePayload
1312
+ :param q_answer_api_key:
1313
+ :type q_answer_api_key: str
1314
+ :param _request_timeout: timeout setting for this request. If one
1315
+ number provided, it will be total request
1316
+ timeout. It can also be a pair (tuple) of
1317
+ (connection, read) timeouts.
1318
+ :type _request_timeout: int, tuple(int, int), optional
1319
+ :param _request_auth: set to override the auth_settings for an a single
1320
+ request; this effectively ignores the
1321
+ authentication in the spec for a single request.
1322
+ :type _request_auth: dict, optional
1323
+ :param _content_type: force content-type for the request.
1324
+ :type _content_type: str, Optional
1325
+ :param _headers: set to override the headers for a single
1326
+ request; this effectively ignores the headers
1327
+ in the spec for a single request.
1328
+ :type _headers: dict, optional
1329
+ :param _host_index: set to override the host_index for a single
1330
+ request; this effectively ignores the host_index
1331
+ in the spec for a single request.
1332
+ :type _host_index: int, optional
1333
+ :return: Returns the result object.
1334
+ """ # noqa: E501
1335
+
1336
+ _param = self._free_text_report_copilot_task_update_settings_serialize(
1337
+ report_copilot_task_settings_update_payload=report_copilot_task_settings_update_payload,
1338
+ q_answer_api_key=q_answer_api_key,
1339
+ _request_auth=_request_auth,
1340
+ _content_type=_content_type,
1341
+ _headers=_headers,
1342
+ _host_index=_host_index
1343
+ )
1344
+
1345
+ _response_types_map: Dict[str, Optional[str]] = {
1346
+ '200': "ReportCopilotTaskSettings",
1347
+ }
1348
+ response_data = self.api_client.call_api(
1349
+ *_param,
1350
+ _request_timeout=_request_timeout
1351
+ )
1352
+ response_data.read()
1353
+ return self.api_client.response_deserialize(
1354
+ response_data=response_data,
1355
+ response_types_map=_response_types_map,
1356
+ )
1357
+
1358
+
1359
+ @validate_call
1360
+ def free_text_report_copilot_task_update_settings_without_preload_content(
1361
+ self,
1362
+ report_copilot_task_settings_update_payload: ReportCopilotTaskSettingsUpdatePayload,
1363
+ q_answer_api_key: Optional[StrictStr] = None,
1364
+ _request_timeout: Union[
1365
+ None,
1366
+ Annotated[StrictFloat, Field(gt=0)],
1367
+ Tuple[
1368
+ Annotated[StrictFloat, Field(gt=0)],
1369
+ Annotated[StrictFloat, Field(gt=0)]
1370
+ ]
1371
+ ] = None,
1372
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1373
+ _content_type: Optional[StrictStr] = None,
1374
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1375
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1376
+ ) -> RESTResponseType:
1377
+ """This updates the settings of the report-copilot task
1378
+
1379
+
1380
+ :param report_copilot_task_settings_update_payload: (required)
1381
+ :type report_copilot_task_settings_update_payload: ReportCopilotTaskSettingsUpdatePayload
1382
+ :param q_answer_api_key:
1383
+ :type q_answer_api_key: str
1384
+ :param _request_timeout: timeout setting for this request. If one
1385
+ number provided, it will be total request
1386
+ timeout. It can also be a pair (tuple) of
1387
+ (connection, read) timeouts.
1388
+ :type _request_timeout: int, tuple(int, int), optional
1389
+ :param _request_auth: set to override the auth_settings for an a single
1390
+ request; this effectively ignores the
1391
+ authentication in the spec for a single request.
1392
+ :type _request_auth: dict, optional
1393
+ :param _content_type: force content-type for the request.
1394
+ :type _content_type: str, Optional
1395
+ :param _headers: set to override the headers for a single
1396
+ request; this effectively ignores the headers
1397
+ in the spec for a single request.
1398
+ :type _headers: dict, optional
1399
+ :param _host_index: set to override the host_index for a single
1400
+ request; this effectively ignores the host_index
1401
+ in the spec for a single request.
1402
+ :type _host_index: int, optional
1403
+ :return: Returns the result object.
1404
+ """ # noqa: E501
1405
+
1406
+ _param = self._free_text_report_copilot_task_update_settings_serialize(
1407
+ report_copilot_task_settings_update_payload=report_copilot_task_settings_update_payload,
1408
+ q_answer_api_key=q_answer_api_key,
1409
+ _request_auth=_request_auth,
1410
+ _content_type=_content_type,
1411
+ _headers=_headers,
1412
+ _host_index=_host_index
1413
+ )
1414
+
1415
+ _response_types_map: Dict[str, Optional[str]] = {
1416
+ '200': "ReportCopilotTaskSettings",
1417
+ }
1418
+ response_data = self.api_client.call_api(
1419
+ *_param,
1420
+ _request_timeout=_request_timeout
1421
+ )
1422
+ return response_data.response
1423
+
1424
+
1425
+ def _free_text_report_copilot_task_update_settings_serialize(
1426
+ self,
1427
+ report_copilot_task_settings_update_payload,
1428
+ q_answer_api_key,
1429
+ _request_auth,
1430
+ _content_type,
1431
+ _headers,
1432
+ _host_index,
1433
+ ) -> RequestSerialized:
1434
+
1435
+ _host = None
1436
+
1437
+ _collection_formats: Dict[str, str] = {
1438
+ }
1439
+
1440
+ _path_params: Dict[str, str] = {}
1441
+ _query_params: List[Tuple[str, str]] = []
1442
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1443
+ _form_params: List[Tuple[str, str]] = []
1444
+ _files: Dict[
1445
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1446
+ ] = {}
1447
+ _body_params: Optional[bytes] = None
1448
+
1449
+ # process the path parameters
1450
+ # process the query parameters
1451
+ # process the header parameters
1452
+ if q_answer_api_key is not None:
1453
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1454
+ # process the form parameters
1455
+ # process the body parameter
1456
+ if report_copilot_task_settings_update_payload is not None:
1457
+ _body_params = report_copilot_task_settings_update_payload
1458
+
1459
+
1460
+ # set the HTTP header `Accept`
1461
+ if 'Accept' not in _header_params:
1462
+ _header_params['Accept'] = self.api_client.select_header_accept(
1463
+ [
1464
+ '*/*'
1465
+ ]
1466
+ )
1467
+
1468
+ # set the HTTP header `Content-Type`
1469
+ if _content_type:
1470
+ _header_params['Content-Type'] = _content_type
1471
+ else:
1472
+ _default_content_type = (
1473
+ self.api_client.select_header_content_type(
1474
+ [
1475
+ 'application/json'
1476
+ ]
1477
+ )
1478
+ )
1479
+ if _default_content_type is not None:
1480
+ _header_params['Content-Type'] = _default_content_type
1481
+
1482
+ # authentication setting
1483
+ _auth_settings: List[str] = [
1484
+ 'QAnswer-Api-Key',
1485
+ 'Bearer'
1486
+ ]
1487
+
1488
+ return self.api_client.param_serialize(
1489
+ method='PUT',
1490
+ resource_path='/api/tasks/report-copilot/settings',
1491
+ path_params=_path_params,
1492
+ query_params=_query_params,
1493
+ header_params=_header_params,
1494
+ body=_body_params,
1495
+ post_params=_form_params,
1496
+ files=_files,
1497
+ auth_settings=_auth_settings,
1498
+ collection_formats=_collection_formats,
1499
+ _host=_host,
1500
+ _request_auth=_request_auth
1501
+ )
1502
+
1503
+
1504
+
1505
+
1506
+ @validate_call
1507
+ def get_report_template(
1508
+ self,
1509
+ username: StrictStr,
1510
+ dataset: StrictStr,
1511
+ template_id: StrictInt,
1512
+ q_answer_api_key: Optional[StrictStr] = None,
1513
+ _request_timeout: Union[
1514
+ None,
1515
+ Annotated[StrictFloat, Field(gt=0)],
1516
+ Tuple[
1517
+ Annotated[StrictFloat, Field(gt=0)],
1518
+ Annotated[StrictFloat, Field(gt=0)]
1519
+ ]
1520
+ ] = None,
1521
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1522
+ _content_type: Optional[StrictStr] = None,
1523
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1524
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1525
+ ) -> ReportCopilotTemplate:
1526
+ """Get a specific report template
1527
+
1528
+
1529
+ :param username: (required)
1530
+ :type username: str
1531
+ :param dataset: (required)
1532
+ :type dataset: str
1533
+ :param template_id: (required)
1534
+ :type template_id: int
1535
+ :param q_answer_api_key:
1536
+ :type q_answer_api_key: str
1537
+ :param _request_timeout: timeout setting for this request. If one
1538
+ number provided, it will be total request
1539
+ timeout. It can also be a pair (tuple) of
1540
+ (connection, read) timeouts.
1541
+ :type _request_timeout: int, tuple(int, int), optional
1542
+ :param _request_auth: set to override the auth_settings for an a single
1543
+ request; this effectively ignores the
1544
+ authentication in the spec for a single request.
1545
+ :type _request_auth: dict, optional
1546
+ :param _content_type: force content-type for the request.
1547
+ :type _content_type: str, Optional
1548
+ :param _headers: set to override the headers for a single
1549
+ request; this effectively ignores the headers
1550
+ in the spec for a single request.
1551
+ :type _headers: dict, optional
1552
+ :param _host_index: set to override the host_index for a single
1553
+ request; this effectively ignores the host_index
1554
+ in the spec for a single request.
1555
+ :type _host_index: int, optional
1556
+ :return: Returns the result object.
1557
+ """ # noqa: E501
1558
+
1559
+ _param = self._get_report_template_serialize(
1560
+ username=username,
1561
+ dataset=dataset,
1562
+ template_id=template_id,
1563
+ q_answer_api_key=q_answer_api_key,
1564
+ _request_auth=_request_auth,
1565
+ _content_type=_content_type,
1566
+ _headers=_headers,
1567
+ _host_index=_host_index
1568
+ )
1569
+
1570
+ _response_types_map: Dict[str, Optional[str]] = {
1571
+ '200': "ReportCopilotTemplate",
1572
+ }
1573
+ response_data = self.api_client.call_api(
1574
+ *_param,
1575
+ _request_timeout=_request_timeout
1576
+ )
1577
+ response_data.read()
1578
+ return self.api_client.response_deserialize(
1579
+ response_data=response_data,
1580
+ response_types_map=_response_types_map,
1581
+ ).data
1582
+
1583
+
1584
+ @validate_call
1585
+ def get_report_template_with_http_info(
1586
+ self,
1587
+ username: StrictStr,
1588
+ dataset: StrictStr,
1589
+ template_id: StrictInt,
1590
+ q_answer_api_key: Optional[StrictStr] = None,
1591
+ _request_timeout: Union[
1592
+ None,
1593
+ Annotated[StrictFloat, Field(gt=0)],
1594
+ Tuple[
1595
+ Annotated[StrictFloat, Field(gt=0)],
1596
+ Annotated[StrictFloat, Field(gt=0)]
1597
+ ]
1598
+ ] = None,
1599
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1600
+ _content_type: Optional[StrictStr] = None,
1601
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1602
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1603
+ ) -> ApiResponse[ReportCopilotTemplate]:
1604
+ """Get a specific report template
1605
+
1606
+
1607
+ :param username: (required)
1608
+ :type username: str
1609
+ :param dataset: (required)
1610
+ :type dataset: str
1611
+ :param template_id: (required)
1612
+ :type template_id: int
1613
+ :param q_answer_api_key:
1614
+ :type q_answer_api_key: str
1615
+ :param _request_timeout: timeout setting for this request. If one
1616
+ number provided, it will be total request
1617
+ timeout. It can also be a pair (tuple) of
1618
+ (connection, read) timeouts.
1619
+ :type _request_timeout: int, tuple(int, int), optional
1620
+ :param _request_auth: set to override the auth_settings for an a single
1621
+ request; this effectively ignores the
1622
+ authentication in the spec for a single request.
1623
+ :type _request_auth: dict, optional
1624
+ :param _content_type: force content-type for the request.
1625
+ :type _content_type: str, Optional
1626
+ :param _headers: set to override the headers for a single
1627
+ request; this effectively ignores the headers
1628
+ in the spec for a single request.
1629
+ :type _headers: dict, optional
1630
+ :param _host_index: set to override the host_index for a single
1631
+ request; this effectively ignores the host_index
1632
+ in the spec for a single request.
1633
+ :type _host_index: int, optional
1634
+ :return: Returns the result object.
1635
+ """ # noqa: E501
1636
+
1637
+ _param = self._get_report_template_serialize(
1638
+ username=username,
1639
+ dataset=dataset,
1640
+ template_id=template_id,
1641
+ q_answer_api_key=q_answer_api_key,
1642
+ _request_auth=_request_auth,
1643
+ _content_type=_content_type,
1644
+ _headers=_headers,
1645
+ _host_index=_host_index
1646
+ )
1647
+
1648
+ _response_types_map: Dict[str, Optional[str]] = {
1649
+ '200': "ReportCopilotTemplate",
1650
+ }
1651
+ response_data = self.api_client.call_api(
1652
+ *_param,
1653
+ _request_timeout=_request_timeout
1654
+ )
1655
+ response_data.read()
1656
+ return self.api_client.response_deserialize(
1657
+ response_data=response_data,
1658
+ response_types_map=_response_types_map,
1659
+ )
1660
+
1661
+
1662
+ @validate_call
1663
+ def get_report_template_without_preload_content(
1664
+ self,
1665
+ username: StrictStr,
1666
+ dataset: StrictStr,
1667
+ template_id: StrictInt,
1668
+ q_answer_api_key: Optional[StrictStr] = None,
1669
+ _request_timeout: Union[
1670
+ None,
1671
+ Annotated[StrictFloat, Field(gt=0)],
1672
+ Tuple[
1673
+ Annotated[StrictFloat, Field(gt=0)],
1674
+ Annotated[StrictFloat, Field(gt=0)]
1675
+ ]
1676
+ ] = None,
1677
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1678
+ _content_type: Optional[StrictStr] = None,
1679
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1680
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1681
+ ) -> RESTResponseType:
1682
+ """Get a specific report template
1683
+
1684
+
1685
+ :param username: (required)
1686
+ :type username: str
1687
+ :param dataset: (required)
1688
+ :type dataset: str
1689
+ :param template_id: (required)
1690
+ :type template_id: int
1691
+ :param q_answer_api_key:
1692
+ :type q_answer_api_key: str
1693
+ :param _request_timeout: timeout setting for this request. If one
1694
+ number provided, it will be total request
1695
+ timeout. It can also be a pair (tuple) of
1696
+ (connection, read) timeouts.
1697
+ :type _request_timeout: int, tuple(int, int), optional
1698
+ :param _request_auth: set to override the auth_settings for an a single
1699
+ request; this effectively ignores the
1700
+ authentication in the spec for a single request.
1701
+ :type _request_auth: dict, optional
1702
+ :param _content_type: force content-type for the request.
1703
+ :type _content_type: str, Optional
1704
+ :param _headers: set to override the headers for a single
1705
+ request; this effectively ignores the headers
1706
+ in the spec for a single request.
1707
+ :type _headers: dict, optional
1708
+ :param _host_index: set to override the host_index for a single
1709
+ request; this effectively ignores the host_index
1710
+ in the spec for a single request.
1711
+ :type _host_index: int, optional
1712
+ :return: Returns the result object.
1713
+ """ # noqa: E501
1714
+
1715
+ _param = self._get_report_template_serialize(
1716
+ username=username,
1717
+ dataset=dataset,
1718
+ template_id=template_id,
1719
+ q_answer_api_key=q_answer_api_key,
1720
+ _request_auth=_request_auth,
1721
+ _content_type=_content_type,
1722
+ _headers=_headers,
1723
+ _host_index=_host_index
1724
+ )
1725
+
1726
+ _response_types_map: Dict[str, Optional[str]] = {
1727
+ '200': "ReportCopilotTemplate",
1728
+ }
1729
+ response_data = self.api_client.call_api(
1730
+ *_param,
1731
+ _request_timeout=_request_timeout
1732
+ )
1733
+ return response_data.response
1734
+
1735
+
1736
+ def _get_report_template_serialize(
1737
+ self,
1738
+ username,
1739
+ dataset,
1740
+ template_id,
1741
+ q_answer_api_key,
1742
+ _request_auth,
1743
+ _content_type,
1744
+ _headers,
1745
+ _host_index,
1746
+ ) -> RequestSerialized:
1747
+
1748
+ _host = None
1749
+
1750
+ _collection_formats: Dict[str, str] = {
1751
+ }
1752
+
1753
+ _path_params: Dict[str, str] = {}
1754
+ _query_params: List[Tuple[str, str]] = []
1755
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1756
+ _form_params: List[Tuple[str, str]] = []
1757
+ _files: Dict[
1758
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1759
+ ] = {}
1760
+ _body_params: Optional[bytes] = None
1761
+
1762
+ # process the path parameters
1763
+ if template_id is not None:
1764
+ _path_params['templateId'] = template_id
1765
+ # process the query parameters
1766
+ if username is not None:
1767
+
1768
+ _query_params.append(('username', username))
1769
+
1770
+ if dataset is not None:
1771
+
1772
+ _query_params.append(('dataset', dataset))
1773
+
1774
+ # process the header parameters
1775
+ if q_answer_api_key is not None:
1776
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1777
+ # process the form parameters
1778
+ # process the body parameter
1779
+
1780
+
1781
+ # set the HTTP header `Accept`
1782
+ if 'Accept' not in _header_params:
1783
+ _header_params['Accept'] = self.api_client.select_header_accept(
1784
+ [
1785
+ '*/*'
1786
+ ]
1787
+ )
1788
+
1789
+
1790
+ # authentication setting
1791
+ _auth_settings: List[str] = [
1792
+ 'QAnswer-Api-Key',
1793
+ 'Bearer'
1794
+ ]
1795
+
1796
+ return self.api_client.param_serialize(
1797
+ method='GET',
1798
+ resource_path='/api/tasks/report-copilot/templates/{templateId}',
1799
+ path_params=_path_params,
1800
+ query_params=_query_params,
1801
+ header_params=_header_params,
1802
+ body=_body_params,
1803
+ post_params=_form_params,
1804
+ files=_files,
1805
+ auth_settings=_auth_settings,
1806
+ collection_formats=_collection_formats,
1807
+ _host=_host,
1808
+ _request_auth=_request_auth
1809
+ )
1810
+
1811
+
1812
+
1813
+
1814
+ @validate_call
1815
+ def list_report_templates(
1816
+ self,
1817
+ username: StrictStr,
1818
+ dataset: StrictStr,
1819
+ q_answer_api_key: Optional[StrictStr] = None,
1820
+ _request_timeout: Union[
1821
+ None,
1822
+ Annotated[StrictFloat, Field(gt=0)],
1823
+ Tuple[
1824
+ Annotated[StrictFloat, Field(gt=0)],
1825
+ Annotated[StrictFloat, Field(gt=0)]
1826
+ ]
1827
+ ] = None,
1828
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1829
+ _content_type: Optional[StrictStr] = None,
1830
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1831
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1832
+ ) -> List[ReportCopilotTemplateSimplified]:
1833
+ """List all report templates
1834
+
1835
+
1836
+ :param username: (required)
1837
+ :type username: str
1838
+ :param dataset: (required)
1839
+ :type dataset: str
1840
+ :param q_answer_api_key:
1841
+ :type q_answer_api_key: str
1842
+ :param _request_timeout: timeout setting for this request. If one
1843
+ number provided, it will be total request
1844
+ timeout. It can also be a pair (tuple) of
1845
+ (connection, read) timeouts.
1846
+ :type _request_timeout: int, tuple(int, int), optional
1847
+ :param _request_auth: set to override the auth_settings for an a single
1848
+ request; this effectively ignores the
1849
+ authentication in the spec for a single request.
1850
+ :type _request_auth: dict, optional
1851
+ :param _content_type: force content-type for the request.
1852
+ :type _content_type: str, Optional
1853
+ :param _headers: set to override the headers for a single
1854
+ request; this effectively ignores the headers
1855
+ in the spec for a single request.
1856
+ :type _headers: dict, optional
1857
+ :param _host_index: set to override the host_index for a single
1858
+ request; this effectively ignores the host_index
1859
+ in the spec for a single request.
1860
+ :type _host_index: int, optional
1861
+ :return: Returns the result object.
1862
+ """ # noqa: E501
1863
+
1864
+ _param = self._list_report_templates_serialize(
1865
+ username=username,
1866
+ dataset=dataset,
1867
+ q_answer_api_key=q_answer_api_key,
1868
+ _request_auth=_request_auth,
1869
+ _content_type=_content_type,
1870
+ _headers=_headers,
1871
+ _host_index=_host_index
1872
+ )
1873
+
1874
+ _response_types_map: Dict[str, Optional[str]] = {
1875
+ '200': "List[ReportCopilotTemplateSimplified]",
1876
+ }
1877
+ response_data = self.api_client.call_api(
1878
+ *_param,
1879
+ _request_timeout=_request_timeout
1880
+ )
1881
+ response_data.read()
1882
+ return self.api_client.response_deserialize(
1883
+ response_data=response_data,
1884
+ response_types_map=_response_types_map,
1885
+ ).data
1886
+
1887
+
1888
+ @validate_call
1889
+ def list_report_templates_with_http_info(
1890
+ self,
1891
+ username: StrictStr,
1892
+ dataset: StrictStr,
1893
+ q_answer_api_key: Optional[StrictStr] = None,
1894
+ _request_timeout: Union[
1895
+ None,
1896
+ Annotated[StrictFloat, Field(gt=0)],
1897
+ Tuple[
1898
+ Annotated[StrictFloat, Field(gt=0)],
1899
+ Annotated[StrictFloat, Field(gt=0)]
1900
+ ]
1901
+ ] = None,
1902
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1903
+ _content_type: Optional[StrictStr] = None,
1904
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1905
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1906
+ ) -> ApiResponse[List[ReportCopilotTemplateSimplified]]:
1907
+ """List all report templates
1908
+
1909
+
1910
+ :param username: (required)
1911
+ :type username: str
1912
+ :param dataset: (required)
1913
+ :type dataset: str
1914
+ :param q_answer_api_key:
1915
+ :type q_answer_api_key: str
1916
+ :param _request_timeout: timeout setting for this request. If one
1917
+ number provided, it will be total request
1918
+ timeout. It can also be a pair (tuple) of
1919
+ (connection, read) timeouts.
1920
+ :type _request_timeout: int, tuple(int, int), optional
1921
+ :param _request_auth: set to override the auth_settings for an a single
1922
+ request; this effectively ignores the
1923
+ authentication in the spec for a single request.
1924
+ :type _request_auth: dict, optional
1925
+ :param _content_type: force content-type for the request.
1926
+ :type _content_type: str, Optional
1927
+ :param _headers: set to override the headers for a single
1928
+ request; this effectively ignores the headers
1929
+ in the spec for a single request.
1930
+ :type _headers: dict, optional
1931
+ :param _host_index: set to override the host_index for a single
1932
+ request; this effectively ignores the host_index
1933
+ in the spec for a single request.
1934
+ :type _host_index: int, optional
1935
+ :return: Returns the result object.
1936
+ """ # noqa: E501
1937
+
1938
+ _param = self._list_report_templates_serialize(
1939
+ username=username,
1940
+ dataset=dataset,
1941
+ q_answer_api_key=q_answer_api_key,
1942
+ _request_auth=_request_auth,
1943
+ _content_type=_content_type,
1944
+ _headers=_headers,
1945
+ _host_index=_host_index
1946
+ )
1947
+
1948
+ _response_types_map: Dict[str, Optional[str]] = {
1949
+ '200': "List[ReportCopilotTemplateSimplified]",
1950
+ }
1951
+ response_data = self.api_client.call_api(
1952
+ *_param,
1953
+ _request_timeout=_request_timeout
1954
+ )
1955
+ response_data.read()
1956
+ return self.api_client.response_deserialize(
1957
+ response_data=response_data,
1958
+ response_types_map=_response_types_map,
1959
+ )
1960
+
1961
+
1962
+ @validate_call
1963
+ def list_report_templates_without_preload_content(
1964
+ self,
1965
+ username: StrictStr,
1966
+ dataset: StrictStr,
1967
+ q_answer_api_key: Optional[StrictStr] = None,
1968
+ _request_timeout: Union[
1969
+ None,
1970
+ Annotated[StrictFloat, Field(gt=0)],
1971
+ Tuple[
1972
+ Annotated[StrictFloat, Field(gt=0)],
1973
+ Annotated[StrictFloat, Field(gt=0)]
1974
+ ]
1975
+ ] = None,
1976
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1977
+ _content_type: Optional[StrictStr] = None,
1978
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1979
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1980
+ ) -> RESTResponseType:
1981
+ """List all report templates
1982
+
1983
+
1984
+ :param username: (required)
1985
+ :type username: str
1986
+ :param dataset: (required)
1987
+ :type dataset: str
1988
+ :param q_answer_api_key:
1989
+ :type q_answer_api_key: str
1990
+ :param _request_timeout: timeout setting for this request. If one
1991
+ number provided, it will be total request
1992
+ timeout. It can also be a pair (tuple) of
1993
+ (connection, read) timeouts.
1994
+ :type _request_timeout: int, tuple(int, int), optional
1995
+ :param _request_auth: set to override the auth_settings for an a single
1996
+ request; this effectively ignores the
1997
+ authentication in the spec for a single request.
1998
+ :type _request_auth: dict, optional
1999
+ :param _content_type: force content-type for the request.
2000
+ :type _content_type: str, Optional
2001
+ :param _headers: set to override the headers for a single
2002
+ request; this effectively ignores the headers
2003
+ in the spec for a single request.
2004
+ :type _headers: dict, optional
2005
+ :param _host_index: set to override the host_index for a single
2006
+ request; this effectively ignores the host_index
2007
+ in the spec for a single request.
2008
+ :type _host_index: int, optional
2009
+ :return: Returns the result object.
2010
+ """ # noqa: E501
2011
+
2012
+ _param = self._list_report_templates_serialize(
2013
+ username=username,
2014
+ dataset=dataset,
2015
+ q_answer_api_key=q_answer_api_key,
2016
+ _request_auth=_request_auth,
2017
+ _content_type=_content_type,
2018
+ _headers=_headers,
2019
+ _host_index=_host_index
2020
+ )
2021
+
2022
+ _response_types_map: Dict[str, Optional[str]] = {
2023
+ '200': "List[ReportCopilotTemplateSimplified]",
2024
+ }
2025
+ response_data = self.api_client.call_api(
2026
+ *_param,
2027
+ _request_timeout=_request_timeout
2028
+ )
2029
+ return response_data.response
2030
+
2031
+
2032
+ def _list_report_templates_serialize(
2033
+ self,
2034
+ username,
2035
+ dataset,
2036
+ q_answer_api_key,
2037
+ _request_auth,
2038
+ _content_type,
2039
+ _headers,
2040
+ _host_index,
2041
+ ) -> RequestSerialized:
2042
+
2043
+ _host = None
2044
+
2045
+ _collection_formats: Dict[str, str] = {
2046
+ }
2047
+
2048
+ _path_params: Dict[str, str] = {}
2049
+ _query_params: List[Tuple[str, str]] = []
2050
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2051
+ _form_params: List[Tuple[str, str]] = []
2052
+ _files: Dict[
2053
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2054
+ ] = {}
2055
+ _body_params: Optional[bytes] = None
2056
+
2057
+ # process the path parameters
2058
+ # process the query parameters
2059
+ if username is not None:
2060
+
2061
+ _query_params.append(('username', username))
2062
+
2063
+ if dataset is not None:
2064
+
2065
+ _query_params.append(('dataset', dataset))
2066
+
2067
+ # process the header parameters
2068
+ if q_answer_api_key is not None:
2069
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2070
+ # process the form parameters
2071
+ # process the body parameter
2072
+
2073
+
2074
+ # set the HTTP header `Accept`
2075
+ if 'Accept' not in _header_params:
2076
+ _header_params['Accept'] = self.api_client.select_header_accept(
2077
+ [
2078
+ '*/*'
2079
+ ]
2080
+ )
2081
+
2082
+
2083
+ # authentication setting
2084
+ _auth_settings: List[str] = [
2085
+ 'QAnswer-Api-Key',
2086
+ 'Bearer'
2087
+ ]
2088
+
2089
+ return self.api_client.param_serialize(
2090
+ method='GET',
2091
+ resource_path='/api/tasks/report-copilot/templates',
2092
+ path_params=_path_params,
2093
+ query_params=_query_params,
2094
+ header_params=_header_params,
2095
+ body=_body_params,
2096
+ post_params=_form_params,
2097
+ files=_files,
2098
+ auth_settings=_auth_settings,
2099
+ collection_formats=_collection_formats,
2100
+ _host=_host,
2101
+ _request_auth=_request_auth
2102
+ )
2103
+
2104
+
2105
+
2106
+
2107
+ @validate_call
2108
+ def report_generation_from_slots(
2109
+ self,
2110
+ report_copilot_generation_from_slots_payload: ReportCopilotGenerationFromSlotsPayload,
2111
+ q_answer_api_key: Optional[StrictStr] = None,
2112
+ _request_timeout: Union[
2113
+ None,
2114
+ Annotated[StrictFloat, Field(gt=0)],
2115
+ Tuple[
2116
+ Annotated[StrictFloat, Field(gt=0)],
2117
+ Annotated[StrictFloat, Field(gt=0)]
2118
+ ]
2119
+ ] = None,
2120
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2121
+ _content_type: Optional[StrictStr] = None,
2122
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2123
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2124
+ ) -> ReportCopilotGenerationFromSlotsResponse:
2125
+ """report_generation_from_slots
2126
+
2127
+
2128
+ :param report_copilot_generation_from_slots_payload: (required)
2129
+ :type report_copilot_generation_from_slots_payload: ReportCopilotGenerationFromSlotsPayload
2130
+ :param q_answer_api_key:
2131
+ :type q_answer_api_key: str
2132
+ :param _request_timeout: timeout setting for this request. If one
2133
+ number provided, it will be total request
2134
+ timeout. It can also be a pair (tuple) of
2135
+ (connection, read) timeouts.
2136
+ :type _request_timeout: int, tuple(int, int), optional
2137
+ :param _request_auth: set to override the auth_settings for an a single
2138
+ request; this effectively ignores the
2139
+ authentication in the spec for a single request.
2140
+ :type _request_auth: dict, optional
2141
+ :param _content_type: force content-type for the request.
2142
+ :type _content_type: str, Optional
2143
+ :param _headers: set to override the headers for a single
2144
+ request; this effectively ignores the headers
2145
+ in the spec for a single request.
2146
+ :type _headers: dict, optional
2147
+ :param _host_index: set to override the host_index for a single
2148
+ request; this effectively ignores the host_index
2149
+ in the spec for a single request.
2150
+ :type _host_index: int, optional
2151
+ :return: Returns the result object.
2152
+ """ # noqa: E501
2153
+
2154
+ _param = self._report_generation_from_slots_serialize(
2155
+ report_copilot_generation_from_slots_payload=report_copilot_generation_from_slots_payload,
2156
+ q_answer_api_key=q_answer_api_key,
2157
+ _request_auth=_request_auth,
2158
+ _content_type=_content_type,
2159
+ _headers=_headers,
2160
+ _host_index=_host_index
2161
+ )
2162
+
2163
+ _response_types_map: Dict[str, Optional[str]] = {
2164
+ '200': "ReportCopilotGenerationFromSlotsResponse",
2165
+ }
2166
+ response_data = self.api_client.call_api(
2167
+ *_param,
2168
+ _request_timeout=_request_timeout
2169
+ )
2170
+ response_data.read()
2171
+ return self.api_client.response_deserialize(
2172
+ response_data=response_data,
2173
+ response_types_map=_response_types_map,
2174
+ ).data
2175
+
2176
+
2177
+ @validate_call
2178
+ def report_generation_from_slots_with_http_info(
2179
+ self,
2180
+ report_copilot_generation_from_slots_payload: ReportCopilotGenerationFromSlotsPayload,
2181
+ q_answer_api_key: Optional[StrictStr] = None,
2182
+ _request_timeout: Union[
2183
+ None,
2184
+ Annotated[StrictFloat, Field(gt=0)],
2185
+ Tuple[
2186
+ Annotated[StrictFloat, Field(gt=0)],
2187
+ Annotated[StrictFloat, Field(gt=0)]
2188
+ ]
2189
+ ] = None,
2190
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2191
+ _content_type: Optional[StrictStr] = None,
2192
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2193
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2194
+ ) -> ApiResponse[ReportCopilotGenerationFromSlotsResponse]:
2195
+ """report_generation_from_slots
2196
+
2197
+
2198
+ :param report_copilot_generation_from_slots_payload: (required)
2199
+ :type report_copilot_generation_from_slots_payload: ReportCopilotGenerationFromSlotsPayload
2200
+ :param q_answer_api_key:
2201
+ :type q_answer_api_key: str
2202
+ :param _request_timeout: timeout setting for this request. If one
2203
+ number provided, it will be total request
2204
+ timeout. It can also be a pair (tuple) of
2205
+ (connection, read) timeouts.
2206
+ :type _request_timeout: int, tuple(int, int), optional
2207
+ :param _request_auth: set to override the auth_settings for an a single
2208
+ request; this effectively ignores the
2209
+ authentication in the spec for a single request.
2210
+ :type _request_auth: dict, optional
2211
+ :param _content_type: force content-type for the request.
2212
+ :type _content_type: str, Optional
2213
+ :param _headers: set to override the headers for a single
2214
+ request; this effectively ignores the headers
2215
+ in the spec for a single request.
2216
+ :type _headers: dict, optional
2217
+ :param _host_index: set to override the host_index for a single
2218
+ request; this effectively ignores the host_index
2219
+ in the spec for a single request.
2220
+ :type _host_index: int, optional
2221
+ :return: Returns the result object.
2222
+ """ # noqa: E501
2223
+
2224
+ _param = self._report_generation_from_slots_serialize(
2225
+ report_copilot_generation_from_slots_payload=report_copilot_generation_from_slots_payload,
2226
+ q_answer_api_key=q_answer_api_key,
2227
+ _request_auth=_request_auth,
2228
+ _content_type=_content_type,
2229
+ _headers=_headers,
2230
+ _host_index=_host_index
2231
+ )
2232
+
2233
+ _response_types_map: Dict[str, Optional[str]] = {
2234
+ '200': "ReportCopilotGenerationFromSlotsResponse",
2235
+ }
2236
+ response_data = self.api_client.call_api(
2237
+ *_param,
2238
+ _request_timeout=_request_timeout
2239
+ )
2240
+ response_data.read()
2241
+ return self.api_client.response_deserialize(
2242
+ response_data=response_data,
2243
+ response_types_map=_response_types_map,
2244
+ )
2245
+
2246
+
2247
+ @validate_call
2248
+ def report_generation_from_slots_without_preload_content(
2249
+ self,
2250
+ report_copilot_generation_from_slots_payload: ReportCopilotGenerationFromSlotsPayload,
2251
+ q_answer_api_key: Optional[StrictStr] = None,
2252
+ _request_timeout: Union[
2253
+ None,
2254
+ Annotated[StrictFloat, Field(gt=0)],
2255
+ Tuple[
2256
+ Annotated[StrictFloat, Field(gt=0)],
2257
+ Annotated[StrictFloat, Field(gt=0)]
2258
+ ]
2259
+ ] = None,
2260
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2261
+ _content_type: Optional[StrictStr] = None,
2262
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2263
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2264
+ ) -> RESTResponseType:
2265
+ """report_generation_from_slots
2266
+
2267
+
2268
+ :param report_copilot_generation_from_slots_payload: (required)
2269
+ :type report_copilot_generation_from_slots_payload: ReportCopilotGenerationFromSlotsPayload
2270
+ :param q_answer_api_key:
2271
+ :type q_answer_api_key: str
2272
+ :param _request_timeout: timeout setting for this request. If one
2273
+ number provided, it will be total request
2274
+ timeout. It can also be a pair (tuple) of
2275
+ (connection, read) timeouts.
2276
+ :type _request_timeout: int, tuple(int, int), optional
2277
+ :param _request_auth: set to override the auth_settings for an a single
2278
+ request; this effectively ignores the
2279
+ authentication in the spec for a single request.
2280
+ :type _request_auth: dict, optional
2281
+ :param _content_type: force content-type for the request.
2282
+ :type _content_type: str, Optional
2283
+ :param _headers: set to override the headers for a single
2284
+ request; this effectively ignores the headers
2285
+ in the spec for a single request.
2286
+ :type _headers: dict, optional
2287
+ :param _host_index: set to override the host_index for a single
2288
+ request; this effectively ignores the host_index
2289
+ in the spec for a single request.
2290
+ :type _host_index: int, optional
2291
+ :return: Returns the result object.
2292
+ """ # noqa: E501
2293
+
2294
+ _param = self._report_generation_from_slots_serialize(
2295
+ report_copilot_generation_from_slots_payload=report_copilot_generation_from_slots_payload,
2296
+ q_answer_api_key=q_answer_api_key,
2297
+ _request_auth=_request_auth,
2298
+ _content_type=_content_type,
2299
+ _headers=_headers,
2300
+ _host_index=_host_index
2301
+ )
2302
+
2303
+ _response_types_map: Dict[str, Optional[str]] = {
2304
+ '200': "ReportCopilotGenerationFromSlotsResponse",
2305
+ }
2306
+ response_data = self.api_client.call_api(
2307
+ *_param,
2308
+ _request_timeout=_request_timeout
2309
+ )
2310
+ return response_data.response
2311
+
2312
+
2313
+ def _report_generation_from_slots_serialize(
2314
+ self,
2315
+ report_copilot_generation_from_slots_payload,
2316
+ q_answer_api_key,
2317
+ _request_auth,
2318
+ _content_type,
2319
+ _headers,
2320
+ _host_index,
2321
+ ) -> RequestSerialized:
2322
+
2323
+ _host = None
2324
+
2325
+ _collection_formats: Dict[str, str] = {
2326
+ }
2327
+
2328
+ _path_params: Dict[str, str] = {}
2329
+ _query_params: List[Tuple[str, str]] = []
2330
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2331
+ _form_params: List[Tuple[str, str]] = []
2332
+ _files: Dict[
2333
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2334
+ ] = {}
2335
+ _body_params: Optional[bytes] = None
2336
+
2337
+ # process the path parameters
2338
+ # process the query parameters
2339
+ # process the header parameters
2340
+ if q_answer_api_key is not None:
2341
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2342
+ # process the form parameters
2343
+ # process the body parameter
2344
+ if report_copilot_generation_from_slots_payload is not None:
2345
+ _body_params = report_copilot_generation_from_slots_payload
2346
+
2347
+
2348
+ # set the HTTP header `Accept`
2349
+ if 'Accept' not in _header_params:
2350
+ _header_params['Accept'] = self.api_client.select_header_accept(
2351
+ [
2352
+ '*/*'
2353
+ ]
2354
+ )
2355
+
2356
+ # set the HTTP header `Content-Type`
2357
+ if _content_type:
2358
+ _header_params['Content-Type'] = _content_type
2359
+ else:
2360
+ _default_content_type = (
2361
+ self.api_client.select_header_content_type(
2362
+ [
2363
+ 'application/json'
2364
+ ]
2365
+ )
2366
+ )
2367
+ if _default_content_type is not None:
2368
+ _header_params['Content-Type'] = _default_content_type
2369
+
2370
+ # authentication setting
2371
+ _auth_settings: List[str] = [
2372
+ 'QAnswer-Api-Key',
2373
+ 'Bearer'
2374
+ ]
2375
+
2376
+ return self.api_client.param_serialize(
2377
+ method='POST',
2378
+ resource_path='/api/tasks/report-copilot/report-generation/from-slots',
2379
+ path_params=_path_params,
2380
+ query_params=_query_params,
2381
+ header_params=_header_params,
2382
+ body=_body_params,
2383
+ post_params=_form_params,
2384
+ files=_files,
2385
+ auth_settings=_auth_settings,
2386
+ collection_formats=_collection_formats,
2387
+ _host=_host,
2388
+ _request_auth=_request_auth
2389
+ )
2390
+
2391
+
2392
+
2393
+
2394
+ @validate_call
2395
+ def report_refinement(
2396
+ self,
2397
+ report_copilot_refinement_payload: ReportCopilotRefinementPayload,
2398
+ q_answer_api_key: Optional[StrictStr] = None,
2399
+ _request_timeout: Union[
2400
+ None,
2401
+ Annotated[StrictFloat, Field(gt=0)],
2402
+ Tuple[
2403
+ Annotated[StrictFloat, Field(gt=0)],
2404
+ Annotated[StrictFloat, Field(gt=0)]
2405
+ ]
2406
+ ] = None,
2407
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2408
+ _content_type: Optional[StrictStr] = None,
2409
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2410
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2411
+ ) -> ReportCopilotRefinementResponse:
2412
+ """report_refinement
2413
+
2414
+
2415
+ :param report_copilot_refinement_payload: (required)
2416
+ :type report_copilot_refinement_payload: ReportCopilotRefinementPayload
2417
+ :param q_answer_api_key:
2418
+ :type q_answer_api_key: str
2419
+ :param _request_timeout: timeout setting for this request. If one
2420
+ number provided, it will be total request
2421
+ timeout. It can also be a pair (tuple) of
2422
+ (connection, read) timeouts.
2423
+ :type _request_timeout: int, tuple(int, int), optional
2424
+ :param _request_auth: set to override the auth_settings for an a single
2425
+ request; this effectively ignores the
2426
+ authentication in the spec for a single request.
2427
+ :type _request_auth: dict, optional
2428
+ :param _content_type: force content-type for the request.
2429
+ :type _content_type: str, Optional
2430
+ :param _headers: set to override the headers for a single
2431
+ request; this effectively ignores the headers
2432
+ in the spec for a single request.
2433
+ :type _headers: dict, optional
2434
+ :param _host_index: set to override the host_index for a single
2435
+ request; this effectively ignores the host_index
2436
+ in the spec for a single request.
2437
+ :type _host_index: int, optional
2438
+ :return: Returns the result object.
2439
+ """ # noqa: E501
2440
+
2441
+ _param = self._report_refinement_serialize(
2442
+ report_copilot_refinement_payload=report_copilot_refinement_payload,
2443
+ q_answer_api_key=q_answer_api_key,
2444
+ _request_auth=_request_auth,
2445
+ _content_type=_content_type,
2446
+ _headers=_headers,
2447
+ _host_index=_host_index
2448
+ )
2449
+
2450
+ _response_types_map: Dict[str, Optional[str]] = {
2451
+ '200': "ReportCopilotRefinementResponse",
2452
+ }
2453
+ response_data = self.api_client.call_api(
2454
+ *_param,
2455
+ _request_timeout=_request_timeout
2456
+ )
2457
+ response_data.read()
2458
+ return self.api_client.response_deserialize(
2459
+ response_data=response_data,
2460
+ response_types_map=_response_types_map,
2461
+ ).data
2462
+
2463
+
2464
+ @validate_call
2465
+ def report_refinement_with_http_info(
2466
+ self,
2467
+ report_copilot_refinement_payload: ReportCopilotRefinementPayload,
2468
+ q_answer_api_key: Optional[StrictStr] = None,
2469
+ _request_timeout: Union[
2470
+ None,
2471
+ Annotated[StrictFloat, Field(gt=0)],
2472
+ Tuple[
2473
+ Annotated[StrictFloat, Field(gt=0)],
2474
+ Annotated[StrictFloat, Field(gt=0)]
2475
+ ]
2476
+ ] = None,
2477
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2478
+ _content_type: Optional[StrictStr] = None,
2479
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2480
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2481
+ ) -> ApiResponse[ReportCopilotRefinementResponse]:
2482
+ """report_refinement
2483
+
2484
+
2485
+ :param report_copilot_refinement_payload: (required)
2486
+ :type report_copilot_refinement_payload: ReportCopilotRefinementPayload
2487
+ :param q_answer_api_key:
2488
+ :type q_answer_api_key: str
2489
+ :param _request_timeout: timeout setting for this request. If one
2490
+ number provided, it will be total request
2491
+ timeout. It can also be a pair (tuple) of
2492
+ (connection, read) timeouts.
2493
+ :type _request_timeout: int, tuple(int, int), optional
2494
+ :param _request_auth: set to override the auth_settings for an a single
2495
+ request; this effectively ignores the
2496
+ authentication in the spec for a single request.
2497
+ :type _request_auth: dict, optional
2498
+ :param _content_type: force content-type for the request.
2499
+ :type _content_type: str, Optional
2500
+ :param _headers: set to override the headers for a single
2501
+ request; this effectively ignores the headers
2502
+ in the spec for a single request.
2503
+ :type _headers: dict, optional
2504
+ :param _host_index: set to override the host_index for a single
2505
+ request; this effectively ignores the host_index
2506
+ in the spec for a single request.
2507
+ :type _host_index: int, optional
2508
+ :return: Returns the result object.
2509
+ """ # noqa: E501
2510
+
2511
+ _param = self._report_refinement_serialize(
2512
+ report_copilot_refinement_payload=report_copilot_refinement_payload,
2513
+ q_answer_api_key=q_answer_api_key,
2514
+ _request_auth=_request_auth,
2515
+ _content_type=_content_type,
2516
+ _headers=_headers,
2517
+ _host_index=_host_index
2518
+ )
2519
+
2520
+ _response_types_map: Dict[str, Optional[str]] = {
2521
+ '200': "ReportCopilotRefinementResponse",
2522
+ }
2523
+ response_data = self.api_client.call_api(
2524
+ *_param,
2525
+ _request_timeout=_request_timeout
2526
+ )
2527
+ response_data.read()
2528
+ return self.api_client.response_deserialize(
2529
+ response_data=response_data,
2530
+ response_types_map=_response_types_map,
2531
+ )
2532
+
2533
+
2534
+ @validate_call
2535
+ def report_refinement_without_preload_content(
2536
+ self,
2537
+ report_copilot_refinement_payload: ReportCopilotRefinementPayload,
2538
+ q_answer_api_key: Optional[StrictStr] = None,
2539
+ _request_timeout: Union[
2540
+ None,
2541
+ Annotated[StrictFloat, Field(gt=0)],
2542
+ Tuple[
2543
+ Annotated[StrictFloat, Field(gt=0)],
2544
+ Annotated[StrictFloat, Field(gt=0)]
2545
+ ]
2546
+ ] = None,
2547
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2548
+ _content_type: Optional[StrictStr] = None,
2549
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2550
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2551
+ ) -> RESTResponseType:
2552
+ """report_refinement
2553
+
2554
+
2555
+ :param report_copilot_refinement_payload: (required)
2556
+ :type report_copilot_refinement_payload: ReportCopilotRefinementPayload
2557
+ :param q_answer_api_key:
2558
+ :type q_answer_api_key: str
2559
+ :param _request_timeout: timeout setting for this request. If one
2560
+ number provided, it will be total request
2561
+ timeout. It can also be a pair (tuple) of
2562
+ (connection, read) timeouts.
2563
+ :type _request_timeout: int, tuple(int, int), optional
2564
+ :param _request_auth: set to override the auth_settings for an a single
2565
+ request; this effectively ignores the
2566
+ authentication in the spec for a single request.
2567
+ :type _request_auth: dict, optional
2568
+ :param _content_type: force content-type for the request.
2569
+ :type _content_type: str, Optional
2570
+ :param _headers: set to override the headers for a single
2571
+ request; this effectively ignores the headers
2572
+ in the spec for a single request.
2573
+ :type _headers: dict, optional
2574
+ :param _host_index: set to override the host_index for a single
2575
+ request; this effectively ignores the host_index
2576
+ in the spec for a single request.
2577
+ :type _host_index: int, optional
2578
+ :return: Returns the result object.
2579
+ """ # noqa: E501
2580
+
2581
+ _param = self._report_refinement_serialize(
2582
+ report_copilot_refinement_payload=report_copilot_refinement_payload,
2583
+ q_answer_api_key=q_answer_api_key,
2584
+ _request_auth=_request_auth,
2585
+ _content_type=_content_type,
2586
+ _headers=_headers,
2587
+ _host_index=_host_index
2588
+ )
2589
+
2590
+ _response_types_map: Dict[str, Optional[str]] = {
2591
+ '200': "ReportCopilotRefinementResponse",
2592
+ }
2593
+ response_data = self.api_client.call_api(
2594
+ *_param,
2595
+ _request_timeout=_request_timeout
2596
+ )
2597
+ return response_data.response
2598
+
2599
+
2600
+ def _report_refinement_serialize(
2601
+ self,
2602
+ report_copilot_refinement_payload,
2603
+ q_answer_api_key,
2604
+ _request_auth,
2605
+ _content_type,
2606
+ _headers,
2607
+ _host_index,
2608
+ ) -> RequestSerialized:
2609
+
2610
+ _host = None
2611
+
2612
+ _collection_formats: Dict[str, str] = {
2613
+ }
2614
+
2615
+ _path_params: Dict[str, str] = {}
2616
+ _query_params: List[Tuple[str, str]] = []
2617
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2618
+ _form_params: List[Tuple[str, str]] = []
2619
+ _files: Dict[
2620
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2621
+ ] = {}
2622
+ _body_params: Optional[bytes] = None
2623
+
2624
+ # process the path parameters
2625
+ # process the query parameters
2626
+ # process the header parameters
2627
+ if q_answer_api_key is not None:
2628
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2629
+ # process the form parameters
2630
+ # process the body parameter
2631
+ if report_copilot_refinement_payload is not None:
2632
+ _body_params = report_copilot_refinement_payload
2633
+
2634
+
2635
+ # set the HTTP header `Accept`
2636
+ if 'Accept' not in _header_params:
2637
+ _header_params['Accept'] = self.api_client.select_header_accept(
2638
+ [
2639
+ '*/*'
2640
+ ]
2641
+ )
2642
+
2643
+ # set the HTTP header `Content-Type`
2644
+ if _content_type:
2645
+ _header_params['Content-Type'] = _content_type
2646
+ else:
2647
+ _default_content_type = (
2648
+ self.api_client.select_header_content_type(
2649
+ [
2650
+ 'application/json'
2651
+ ]
2652
+ )
2653
+ )
2654
+ if _default_content_type is not None:
2655
+ _header_params['Content-Type'] = _default_content_type
2656
+
2657
+ # authentication setting
2658
+ _auth_settings: List[str] = [
2659
+ 'QAnswer-Api-Key',
2660
+ 'Bearer'
2661
+ ]
2662
+
2663
+ return self.api_client.param_serialize(
2664
+ method='POST',
2665
+ resource_path='/api/tasks/report-copilot/report-refinement',
2666
+ path_params=_path_params,
2667
+ query_params=_query_params,
2668
+ header_params=_header_params,
2669
+ body=_body_params,
2670
+ post_params=_form_params,
2671
+ files=_files,
2672
+ auth_settings=_auth_settings,
2673
+ collection_formats=_collection_formats,
2674
+ _host=_host,
2675
+ _request_auth=_request_auth
2676
+ )
2677
+
2678
+
2679
+
2680
+
2681
+ @validate_call
2682
+ def update_report_template(
2683
+ self,
2684
+ template_id: StrictInt,
2685
+ report_copilot_update_payload: ReportCopilotUpdatePayload,
2686
+ q_answer_api_key: Optional[StrictStr] = None,
2687
+ _request_timeout: Union[
2688
+ None,
2689
+ Annotated[StrictFloat, Field(gt=0)],
2690
+ Tuple[
2691
+ Annotated[StrictFloat, Field(gt=0)],
2692
+ Annotated[StrictFloat, Field(gt=0)]
2693
+ ]
2694
+ ] = None,
2695
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2696
+ _content_type: Optional[StrictStr] = None,
2697
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2698
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2699
+ ) -> ReportCopilotTemplate:
2700
+ """Update a report template
2701
+
2702
+
2703
+ :param template_id: (required)
2704
+ :type template_id: int
2705
+ :param report_copilot_update_payload: (required)
2706
+ :type report_copilot_update_payload: ReportCopilotUpdatePayload
2707
+ :param q_answer_api_key:
2708
+ :type q_answer_api_key: str
2709
+ :param _request_timeout: timeout setting for this request. If one
2710
+ number provided, it will be total request
2711
+ timeout. It can also be a pair (tuple) of
2712
+ (connection, read) timeouts.
2713
+ :type _request_timeout: int, tuple(int, int), optional
2714
+ :param _request_auth: set to override the auth_settings for an a single
2715
+ request; this effectively ignores the
2716
+ authentication in the spec for a single request.
2717
+ :type _request_auth: dict, optional
2718
+ :param _content_type: force content-type for the request.
2719
+ :type _content_type: str, Optional
2720
+ :param _headers: set to override the headers for a single
2721
+ request; this effectively ignores the headers
2722
+ in the spec for a single request.
2723
+ :type _headers: dict, optional
2724
+ :param _host_index: set to override the host_index for a single
2725
+ request; this effectively ignores the host_index
2726
+ in the spec for a single request.
2727
+ :type _host_index: int, optional
2728
+ :return: Returns the result object.
2729
+ """ # noqa: E501
2730
+
2731
+ _param = self._update_report_template_serialize(
2732
+ template_id=template_id,
2733
+ report_copilot_update_payload=report_copilot_update_payload,
2734
+ q_answer_api_key=q_answer_api_key,
2735
+ _request_auth=_request_auth,
2736
+ _content_type=_content_type,
2737
+ _headers=_headers,
2738
+ _host_index=_host_index
2739
+ )
2740
+
2741
+ _response_types_map: Dict[str, Optional[str]] = {
2742
+ '200': "ReportCopilotTemplate",
2743
+ }
2744
+ response_data = self.api_client.call_api(
2745
+ *_param,
2746
+ _request_timeout=_request_timeout
2747
+ )
2748
+ response_data.read()
2749
+ return self.api_client.response_deserialize(
2750
+ response_data=response_data,
2751
+ response_types_map=_response_types_map,
2752
+ ).data
2753
+
2754
+
2755
+ @validate_call
2756
+ def update_report_template_with_http_info(
2757
+ self,
2758
+ template_id: StrictInt,
2759
+ report_copilot_update_payload: ReportCopilotUpdatePayload,
2760
+ q_answer_api_key: Optional[StrictStr] = None,
2761
+ _request_timeout: Union[
2762
+ None,
2763
+ Annotated[StrictFloat, Field(gt=0)],
2764
+ Tuple[
2765
+ Annotated[StrictFloat, Field(gt=0)],
2766
+ Annotated[StrictFloat, Field(gt=0)]
2767
+ ]
2768
+ ] = None,
2769
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2770
+ _content_type: Optional[StrictStr] = None,
2771
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2772
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2773
+ ) -> ApiResponse[ReportCopilotTemplate]:
2774
+ """Update a report template
2775
+
2776
+
2777
+ :param template_id: (required)
2778
+ :type template_id: int
2779
+ :param report_copilot_update_payload: (required)
2780
+ :type report_copilot_update_payload: ReportCopilotUpdatePayload
2781
+ :param q_answer_api_key:
2782
+ :type q_answer_api_key: str
2783
+ :param _request_timeout: timeout setting for this request. If one
2784
+ number provided, it will be total request
2785
+ timeout. It can also be a pair (tuple) of
2786
+ (connection, read) timeouts.
2787
+ :type _request_timeout: int, tuple(int, int), optional
2788
+ :param _request_auth: set to override the auth_settings for an a single
2789
+ request; this effectively ignores the
2790
+ authentication in the spec for a single request.
2791
+ :type _request_auth: dict, optional
2792
+ :param _content_type: force content-type for the request.
2793
+ :type _content_type: str, Optional
2794
+ :param _headers: set to override the headers for a single
2795
+ request; this effectively ignores the headers
2796
+ in the spec for a single request.
2797
+ :type _headers: dict, optional
2798
+ :param _host_index: set to override the host_index for a single
2799
+ request; this effectively ignores the host_index
2800
+ in the spec for a single request.
2801
+ :type _host_index: int, optional
2802
+ :return: Returns the result object.
2803
+ """ # noqa: E501
2804
+
2805
+ _param = self._update_report_template_serialize(
2806
+ template_id=template_id,
2807
+ report_copilot_update_payload=report_copilot_update_payload,
2808
+ q_answer_api_key=q_answer_api_key,
2809
+ _request_auth=_request_auth,
2810
+ _content_type=_content_type,
2811
+ _headers=_headers,
2812
+ _host_index=_host_index
2813
+ )
2814
+
2815
+ _response_types_map: Dict[str, Optional[str]] = {
2816
+ '200': "ReportCopilotTemplate",
2817
+ }
2818
+ response_data = self.api_client.call_api(
2819
+ *_param,
2820
+ _request_timeout=_request_timeout
2821
+ )
2822
+ response_data.read()
2823
+ return self.api_client.response_deserialize(
2824
+ response_data=response_data,
2825
+ response_types_map=_response_types_map,
2826
+ )
2827
+
2828
+
2829
+ @validate_call
2830
+ def update_report_template_without_preload_content(
2831
+ self,
2832
+ template_id: StrictInt,
2833
+ report_copilot_update_payload: ReportCopilotUpdatePayload,
2834
+ q_answer_api_key: Optional[StrictStr] = None,
2835
+ _request_timeout: Union[
2836
+ None,
2837
+ Annotated[StrictFloat, Field(gt=0)],
2838
+ Tuple[
2839
+ Annotated[StrictFloat, Field(gt=0)],
2840
+ Annotated[StrictFloat, Field(gt=0)]
2841
+ ]
2842
+ ] = None,
2843
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2844
+ _content_type: Optional[StrictStr] = None,
2845
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2846
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2847
+ ) -> RESTResponseType:
2848
+ """Update a report template
2849
+
2850
+
2851
+ :param template_id: (required)
2852
+ :type template_id: int
2853
+ :param report_copilot_update_payload: (required)
2854
+ :type report_copilot_update_payload: ReportCopilotUpdatePayload
2855
+ :param q_answer_api_key:
2856
+ :type q_answer_api_key: str
2857
+ :param _request_timeout: timeout setting for this request. If one
2858
+ number provided, it will be total request
2859
+ timeout. It can also be a pair (tuple) of
2860
+ (connection, read) timeouts.
2861
+ :type _request_timeout: int, tuple(int, int), optional
2862
+ :param _request_auth: set to override the auth_settings for an a single
2863
+ request; this effectively ignores the
2864
+ authentication in the spec for a single request.
2865
+ :type _request_auth: dict, optional
2866
+ :param _content_type: force content-type for the request.
2867
+ :type _content_type: str, Optional
2868
+ :param _headers: set to override the headers for a single
2869
+ request; this effectively ignores the headers
2870
+ in the spec for a single request.
2871
+ :type _headers: dict, optional
2872
+ :param _host_index: set to override the host_index for a single
2873
+ request; this effectively ignores the host_index
2874
+ in the spec for a single request.
2875
+ :type _host_index: int, optional
2876
+ :return: Returns the result object.
2877
+ """ # noqa: E501
2878
+
2879
+ _param = self._update_report_template_serialize(
2880
+ template_id=template_id,
2881
+ report_copilot_update_payload=report_copilot_update_payload,
2882
+ q_answer_api_key=q_answer_api_key,
2883
+ _request_auth=_request_auth,
2884
+ _content_type=_content_type,
2885
+ _headers=_headers,
2886
+ _host_index=_host_index
2887
+ )
2888
+
2889
+ _response_types_map: Dict[str, Optional[str]] = {
2890
+ '200': "ReportCopilotTemplate",
2891
+ }
2892
+ response_data = self.api_client.call_api(
2893
+ *_param,
2894
+ _request_timeout=_request_timeout
2895
+ )
2896
+ return response_data.response
2897
+
2898
+
2899
+ def _update_report_template_serialize(
2900
+ self,
2901
+ template_id,
2902
+ report_copilot_update_payload,
2903
+ q_answer_api_key,
2904
+ _request_auth,
2905
+ _content_type,
2906
+ _headers,
2907
+ _host_index,
2908
+ ) -> RequestSerialized:
2909
+
2910
+ _host = None
2911
+
2912
+ _collection_formats: Dict[str, str] = {
2913
+ }
2914
+
2915
+ _path_params: Dict[str, str] = {}
2916
+ _query_params: List[Tuple[str, str]] = []
2917
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2918
+ _form_params: List[Tuple[str, str]] = []
2919
+ _files: Dict[
2920
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2921
+ ] = {}
2922
+ _body_params: Optional[bytes] = None
2923
+
2924
+ # process the path parameters
2925
+ if template_id is not None:
2926
+ _path_params['templateId'] = template_id
2927
+ # process the query parameters
2928
+ # process the header parameters
2929
+ if q_answer_api_key is not None:
2930
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2931
+ # process the form parameters
2932
+ # process the body parameter
2933
+ if report_copilot_update_payload is not None:
2934
+ _body_params = report_copilot_update_payload
2935
+
2936
+
2937
+ # set the HTTP header `Accept`
2938
+ if 'Accept' not in _header_params:
2939
+ _header_params['Accept'] = self.api_client.select_header_accept(
2940
+ [
2941
+ '*/*'
2942
+ ]
2943
+ )
2944
+
2945
+ # set the HTTP header `Content-Type`
2946
+ if _content_type:
2947
+ _header_params['Content-Type'] = _content_type
2948
+ else:
2949
+ _default_content_type = (
2950
+ self.api_client.select_header_content_type(
2951
+ [
2952
+ 'application/json'
2953
+ ]
2954
+ )
2955
+ )
2956
+ if _default_content_type is not None:
2957
+ _header_params['Content-Type'] = _default_content_type
2958
+
2959
+ # authentication setting
2960
+ _auth_settings: List[str] = [
2961
+ 'QAnswer-Api-Key',
2962
+ 'Bearer'
2963
+ ]
2964
+
2965
+ return self.api_client.param_serialize(
2966
+ method='PUT',
2967
+ resource_path='/api/tasks/report-copilot/templates/{templateId}',
2968
+ path_params=_path_params,
2969
+ query_params=_query_params,
2970
+ header_params=_header_params,
2971
+ body=_body_params,
2972
+ post_params=_form_params,
2973
+ files=_files,
2974
+ auth_settings=_auth_settings,
2975
+ collection_formats=_collection_formats,
2976
+ _host=_host,
2977
+ _request_auth=_request_auth
2978
+ )
2979
+
2980
+