qanswer-sdk 0.1.0.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (618) hide show
  1. qanswer_sdk/__init__.py +1256 -0
  2. qanswer_sdk/api/__init__.py +63 -0
  3. qanswer_sdk/api/admin_api.py +7893 -0
  4. qanswer_sdk/api/ai_assistant_access_rights_api.py +5881 -0
  5. qanswer_sdk/api/ai_assistant_api.py +11047 -0
  6. qanswer_sdk/api/anthropic_compatible_api.py +311 -0
  7. qanswer_sdk/api/auto_complete_api.py +612 -0
  8. qanswer_sdk/api/bot_slack_api.py +1015 -0
  9. qanswer_sdk/api/branding_api.py +5733 -0
  10. qanswer_sdk/api/bulk_reindex_api.py +2029 -0
  11. qanswer_sdk/api/chatbot_api.py +1102 -0
  12. qanswer_sdk/api/connector_audio_api.py +3469 -0
  13. qanswer_sdk/api/connector_document_api.py +2685 -0
  14. qanswer_sdk/api/connector_e_consilium_api.py +333 -0
  15. qanswer_sdk/api/connector_e_consilium_search_index_api_api.py +1231 -0
  16. qanswer_sdk/api/connector_google_drive_api.py +2175 -0
  17. qanswer_sdk/api/connector_imapapi_api.py +1866 -0
  18. qanswer_sdk/api/connector_one_drive_api.py +1579 -0
  19. qanswer_sdk/api/connector_onenote_api.py +1596 -0
  20. qanswer_sdk/api/connector_pinecone_api.py +893 -0
  21. qanswer_sdk/api/connector_publication_office_api_api.py +1230 -0
  22. qanswer_sdk/api/connector_qn_a_api.py +1521 -0
  23. qanswer_sdk/api/connector_rdf_answer_api.py +1454 -0
  24. qanswer_sdk/api/connector_rdf_api.py +5090 -0
  25. qanswer_sdk/api/connector_sharepoint_api.py +3926 -0
  26. qanswer_sdk/api/connector_websearch_api.py +332 -0
  27. qanswer_sdk/api/connector_website_api.py +3108 -0
  28. qanswer_sdk/api/connector_x_wiki_api_api.py +1278 -0
  29. qanswer_sdk/api/connectors_api.py +6946 -0
  30. qanswer_sdk/api/connectors_data_api.py +5903 -0
  31. qanswer_sdk/api/conversation_logs_api.py +14228 -0
  32. qanswer_sdk/api/dataset_config_api.py +4016 -0
  33. qanswer_sdk/api/debug_api.py +278 -0
  34. qanswer_sdk/api/default_api.py +763 -0
  35. qanswer_sdk/api/frontend_config_api.py +270 -0
  36. qanswer_sdk/api/health_check_api_api.py +278 -0
  37. qanswer_sdk/api/mcp_api.py +10758 -0
  38. qanswer_sdk/api/metadata_api.py +1309 -0
  39. qanswer_sdk/api/notifications_api.py +1842 -0
  40. qanswer_sdk/api/o_auth2_api.py +648 -0
  41. qanswer_sdk/api/open_ai_compatible_api.py +1093 -0
  42. qanswer_sdk/api/payment_api.py +1854 -0
  43. qanswer_sdk/api/retention_policy_api.py +4404 -0
  44. qanswer_sdk/api/socket_api.py +4706 -0
  45. qanswer_sdk/api/speech_to_text_api.py +968 -0
  46. qanswer_sdk/api/task_ai_excel_api.py +3749 -0
  47. qanswer_sdk/api/task_chat_api.py +2079 -0
  48. qanswer_sdk/api/task_entity_linking_api.py +315 -0
  49. qanswer_sdk/api/task_rdf_linker_api.py +4407 -0
  50. qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3355 -0
  51. qanswer_sdk/api/task_rdf_text_linker_api.py +1513 -0
  52. qanswer_sdk/api/task_report_copilot_api.py +7355 -0
  53. qanswer_sdk/api/task_search_api.py +2142 -0
  54. qanswer_sdk/api/task_text2sparql_api.py +947 -0
  55. qanswer_sdk/api/task_text_classification_api.py +592 -0
  56. qanswer_sdk/api/tasks_api.py +26394 -0
  57. qanswer_sdk/api/tool_embedder_api.py +5532 -0
  58. qanswer_sdk/api/tool_llm_api.py +6364 -0
  59. qanswer_sdk/api/unit_organizations_api.py +8600 -0
  60. qanswer_sdk/api/unit_teams_api.py +4492 -0
  61. qanswer_sdk/api/unit_user_api.py +12759 -0
  62. qanswer_sdk/api_client.py +804 -0
  63. qanswer_sdk/api_response.py +21 -0
  64. qanswer_sdk/configuration.py +614 -0
  65. qanswer_sdk/exceptions.py +216 -0
  66. qanswer_sdk/models/__init__.py +562 -0
  67. qanswer_sdk/models/access_audio_spans_response_model.py +91 -0
  68. qanswer_sdk/models/access_pdf_payload_model.py +102 -0
  69. qanswer_sdk/models/access_type.py +42 -0
  70. qanswer_sdk/models/access_type_shared.py +38 -0
  71. qanswer_sdk/models/add_qn_a_request.py +103 -0
  72. qanswer_sdk/models/add_synonyms.py +93 -0
  73. qanswer_sdk/models/add_synonyms_resp.py +89 -0
  74. qanswer_sdk/models/admin_overall_stats_response.py +105 -0
  75. qanswer_sdk/models/admin_user_overall_stats.py +99 -0
  76. qanswer_sdk/models/advanced_o_auth2_mcp_authentication_config.py +95 -0
  77. qanswer_sdk/models/aggregate.py +93 -0
  78. qanswer_sdk/models/aggregation.py +110 -0
  79. qanswer_sdk/models/aggregation_type.py +41 -0
  80. qanswer_sdk/models/aggregations_group.py +102 -0
  81. qanswer_sdk/models/ai_assistant_clone_response.py +91 -0
  82. qanswer_sdk/models/ai_assistant_dto.py +113 -0
  83. qanswer_sdk/models/ai_assistant_filter_dto.py +113 -0
  84. qanswer_sdk/models/ai_assistant_list.py +101 -0
  85. qanswer_sdk/models/ai_assistant_share_response.py +93 -0
  86. qanswer_sdk/models/ai_assistant_shared_access.py +95 -0
  87. qanswer_sdk/models/ai_excel_entity_result.py +97 -0
  88. qanswer_sdk/models/ai_excel_entity_search_payload.py +95 -0
  89. qanswer_sdk/models/ai_excel_entity_search_response.py +103 -0
  90. qanswer_sdk/models/ai_excel_global_settings.py +95 -0
  91. qanswer_sdk/models/ai_excel_global_settings_request.py +95 -0
  92. qanswer_sdk/models/ai_excel_task_settings.py +119 -0
  93. qanswer_sdk/models/ai_excel_task_update.py +119 -0
  94. qanswer_sdk/models/ai_excel_template_create.py +119 -0
  95. qanswer_sdk/models/ai_excel_template_read.py +121 -0
  96. qanswer_sdk/models/ai_excel_template_settings_request.py +91 -0
  97. qanswer_sdk/models/ai_excel_template_update.py +125 -0
  98. qanswer_sdk/models/ai_excel_templates_search_request.py +104 -0
  99. qanswer_sdk/models/ai_excel_templates_search_response.py +101 -0
  100. qanswer_sdk/models/allowed_extension.py +53 -0
  101. qanswer_sdk/models/allowed_file_extensions.py +88 -0
  102. qanswer_sdk/models/api_key_header_type.py +39 -0
  103. qanswer_sdk/models/api_key_mcp_authentication_config.py +98 -0
  104. qanswer_sdk/models/applied_filter_type.py +37 -0
  105. qanswer_sdk/models/applied_metadata_filter.py +97 -0
  106. qanswer_sdk/models/apply_template_task_settings_to_slots_response.py +89 -0
  107. qanswer_sdk/models/assistant_category_color_definition.py +89 -0
  108. qanswer_sdk/models/assistant_category_color_item.py +89 -0
  109. qanswer_sdk/models/assistant_category_colors_update_payload.py +95 -0
  110. qanswer_sdk/models/assistant_category_count.py +91 -0
  111. qanswer_sdk/models/assistant_message_stop.py +93 -0
  112. qanswer_sdk/models/assistant_retention_response.py +97 -0
  113. qanswer_sdk/models/assistant_task.py +43 -0
  114. qanswer_sdk/models/assistant_template_with_tools_selection_dto.py +123 -0
  115. qanswer_sdk/models/audio_allowed_file_extensions.py +87 -0
  116. qanswer_sdk/models/audio_format.py +37 -0
  117. qanswer_sdk/models/audio_segment.py +95 -0
  118. qanswer_sdk/models/audio_segment_update_payload.py +97 -0
  119. qanswer_sdk/models/audio_segment_update_response.py +91 -0
  120. qanswer_sdk/models/audio_speaker_update_payload.py +99 -0
  121. qanswer_sdk/models/audio_speaker_update_response.py +91 -0
  122. qanswer_sdk/models/audio_transcription_list_response.py +101 -0
  123. qanswer_sdk/models/audio_transcription_mode.py +37 -0
  124. qanswer_sdk/models/audio_transcription_record.py +101 -0
  125. qanswer_sdk/models/audio_transcription_status.py +39 -0
  126. qanswer_sdk/models/audio_upload_response.py +91 -0
  127. qanswer_sdk/models/audio_word_segment.py +93 -0
  128. qanswer_sdk/models/audio_word_span_change.py +94 -0
  129. qanswer_sdk/models/audio_word_span_update_payload.py +104 -0
  130. qanswer_sdk/models/audio_word_span_update_response.py +91 -0
  131. qanswer_sdk/models/audio_word_update_payload.py +100 -0
  132. qanswer_sdk/models/audio_word_update_response.py +91 -0
  133. qanswer_sdk/models/auth_link_response.py +91 -0
  134. qanswer_sdk/models/auto_bot_description_request.py +89 -0
  135. qanswer_sdk/models/auto_bot_description_response.py +87 -0
  136. qanswer_sdk/models/available_aggregation.py +92 -0
  137. qanswer_sdk/models/available_connectors_response.py +92 -0
  138. qanswer_sdk/models/available_logs_visibility_policy.py +91 -0
  139. qanswer_sdk/models/available_space_quota_for_dataset.py +95 -0
  140. qanswer_sdk/models/available_storage_preference.py +91 -0
  141. qanswer_sdk/models/base_connectors_response.py +89 -0
  142. qanswer_sdk/models/base_conversation_response.py +89 -0
  143. qanswer_sdk/models/base_feedback_response.py +89 -0
  144. qanswer_sdk/models/bot_answer_length.py +38 -0
  145. qanswer_sdk/models/branding_app_title.py +87 -0
  146. qanswer_sdk/models/branding_system_message.py +87 -0
  147. qanswer_sdk/models/bulk_reindex_counts_by_type.py +89 -0
  148. qanswer_sdk/models/bulk_reindex_item_status.py +41 -0
  149. qanswer_sdk/models/bulk_reindex_job_detail_dto.py +103 -0
  150. qanswer_sdk/models/bulk_reindex_job_dto.py +125 -0
  151. qanswer_sdk/models/bulk_reindex_job_item_dto.py +113 -0
  152. qanswer_sdk/models/bulk_reindex_job_item_sort_by.py +40 -0
  153. qanswer_sdk/models/bulk_reindex_job_status.py +41 -0
  154. qanswer_sdk/models/bulk_reindex_jobs_list_response.py +97 -0
  155. qanswer_sdk/models/bulk_reindex_preview_counts.py +99 -0
  156. qanswer_sdk/models/bulk_reindex_preview_request.py +91 -0
  157. qanswer_sdk/models/bulk_reindex_preview_response.py +102 -0
  158. qanswer_sdk/models/bulk_reindex_skip_reason.py +40 -0
  159. qanswer_sdk/models/bulk_reindex_sort_order.py +37 -0
  160. qanswer_sdk/models/bulk_reindex_submit_request.py +94 -0
  161. qanswer_sdk/models/bulk_update_tool_selections_request.py +87 -0
  162. qanswer_sdk/models/capability_type.py +37 -0
  163. qanswer_sdk/models/cell.py +89 -0
  164. qanswer_sdk/models/change_password.py +89 -0
  165. qanswer_sdk/models/change_password_admin.py +89 -0
  166. qanswer_sdk/models/change_role.py +90 -0
  167. qanswer_sdk/models/chat_task_settings.py +141 -0
  168. qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
  169. qanswer_sdk/models/chat_task_update.py +139 -0
  170. qanswer_sdk/models/chatbot_chat_payload.py +150 -0
  171. qanswer_sdk/models/chatbot_default_settings_response.py +95 -0
  172. qanswer_sdk/models/chatbot_llm_dto.py +120 -0
  173. qanswer_sdk/models/chatbot_response.py +143 -0
  174. qanswer_sdk/models/chatbot_setting_dto.py +99 -0
  175. qanswer_sdk/models/chatbot_setting_request.py +91 -0
  176. qanswer_sdk/models/class_info.py +89 -0
  177. qanswer_sdk/models/config.py +228 -0
  178. qanswer_sdk/models/config1.py +138 -0
  179. qanswer_sdk/models/connector_config_list_response.py +99 -0
  180. qanswer_sdk/models/connector_config_model.py +96 -0
  181. qanswer_sdk/models/connector_config_patch_payload.py +93 -0
  182. qanswer_sdk/models/connector_config_response.py +95 -0
  183. qanswer_sdk/models/connector_config_sync_response.py +93 -0
  184. qanswer_sdk/models/connector_config_type.py +37 -0
  185. qanswer_sdk/models/connector_model.py +114 -0
  186. qanswer_sdk/models/connector_type.py +51 -0
  187. qanswer_sdk/models/connector_type_dto.py +92 -0
  188. qanswer_sdk/models/connector_type_list_dto.py +95 -0
  189. qanswer_sdk/models/content_item.py +106 -0
  190. qanswer_sdk/models/content_item_type.py +39 -0
  191. qanswer_sdk/models/conversation_aggregations_request.py +107 -0
  192. qanswer_sdk/models/conversation_message.py +230 -0
  193. qanswer_sdk/models/conversation_message_error_key.py +52 -0
  194. qanswer_sdk/models/conversation_message_search_result.py +112 -0
  195. qanswer_sdk/models/conversation_model.py +144 -0
  196. qanswer_sdk/models/conversation_overall_stats.py +97 -0
  197. qanswer_sdk/models/conversation_overall_stats_response.py +95 -0
  198. qanswer_sdk/models/conversation_retention_response.py +91 -0
  199. qanswer_sdk/models/conversation_statistics.py +95 -0
  200. qanswer_sdk/models/conversation_update.py +93 -0
  201. qanswer_sdk/models/conversation_users_stats.py +99 -0
  202. qanswer_sdk/models/conversation_users_stats_response.py +99 -0
  203. qanswer_sdk/models/coordinates.py +89 -0
  204. qanswer_sdk/models/cost_summary_dto.py +99 -0
  205. qanswer_sdk/models/create_connector_request.py +95 -0
  206. qanswer_sdk/models/create_connector_response.py +95 -0
  207. qanswer_sdk/models/create_imap_connector_request.py +105 -0
  208. qanswer_sdk/models/create_pinecone_connector_request.py +97 -0
  209. qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +105 -0
  210. qanswer_sdk/models/create_sharepoint_connector_request.py +103 -0
  211. qanswer_sdk/models/create_x_wiki_connector_request.py +103 -0
  212. qanswer_sdk/models/credits_info_dto.py +95 -0
  213. qanswer_sdk/models/credits_info_global_dto.py +97 -0
  214. qanswer_sdk/models/currency.py +38 -0
  215. qanswer_sdk/models/data.py +211 -0
  216. qanswer_sdk/models/data_filling_mode.py +39 -0
  217. qanswer_sdk/models/data_storage_preference.py +38 -0
  218. qanswer_sdk/models/dataset_config_request.py +138 -0
  219. qanswer_sdk/models/dataset_default_values_model.py +129 -0
  220. qanswer_sdk/models/dataset_detail.py +128 -0
  221. qanswer_sdk/models/dataset_detail_kg.py +88 -0
  222. qanswer_sdk/models/dataset_schema.py +193 -0
  223. qanswer_sdk/models/dataset_type.py +38 -0
  224. qanswer_sdk/models/dataset_update_object.py +185 -0
  225. qanswer_sdk/models/dataset_users_response.py +87 -0
  226. qanswer_sdk/models/default_prompt.py +100 -0
  227. qanswer_sdk/models/delete_connector_model.py +90 -0
  228. qanswer_sdk/models/delete_connector_request.py +99 -0
  229. qanswer_sdk/models/delete_connectors_response.py +89 -0
  230. qanswer_sdk/models/delete_files_status_response.py +91 -0
  231. qanswer_sdk/models/delete_index.py +91 -0
  232. qanswer_sdk/models/delete_index_resp.py +89 -0
  233. qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
  234. qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
  235. qanswer_sdk/models/delete_synonym.py +93 -0
  236. qanswer_sdk/models/delete_synonym_resp.py +89 -0
  237. qanswer_sdk/models/delete_synonyms.py +91 -0
  238. qanswer_sdk/models/diarization_queue_status.py +99 -0
  239. qanswer_sdk/models/document_content_response.py +91 -0
  240. qanswer_sdk/models/document_content_update_model.py +99 -0
  241. qanswer_sdk/models/document_file_delete_by_connector_model.py +101 -0
  242. qanswer_sdk/models/document_file_delete_by_id_model.py +91 -0
  243. qanswer_sdk/models/document_parsing_task_settings.py +124 -0
  244. qanswer_sdk/models/document_parsing_task_settings_update_payload.py +95 -0
  245. qanswer_sdk/models/document_parsing_task_update.py +121 -0
  246. qanswer_sdk/models/document_status_group.py +39 -0
  247. qanswer_sdk/models/document_status_response.py +89 -0
  248. qanswer_sdk/models/dummy_error.py +89 -0
  249. qanswer_sdk/models/duplicate_ai_excel_template_request.py +97 -0
  250. qanswer_sdk/models/duplicate_ai_excel_template_response.py +87 -0
  251. qanswer_sdk/models/duplicate_report_template_payload.py +97 -0
  252. qanswer_sdk/models/duplicate_report_template_response.py +87 -0
  253. qanswer_sdk/models/e_consilium_connector_config.py +108 -0
  254. qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
  255. qanswer_sdk/models/econsilium_file_metadata.py +105 -0
  256. qanswer_sdk/models/econsilium_search_index_add_payload.py +107 -0
  257. qanswer_sdk/models/econsilium_search_index_additional_fields.py +103 -0
  258. qanswer_sdk/models/effective_retention_dto.py +95 -0
  259. qanswer_sdk/models/email_folder.py +91 -0
  260. qanswer_sdk/models/email_request.py +87 -0
  261. qanswer_sdk/models/embedder_cost_filter.py +112 -0
  262. qanswer_sdk/models/embedder_cost_list.py +101 -0
  263. qanswer_sdk/models/embedder_create_dto.py +143 -0
  264. qanswer_sdk/models/embedder_detailed_dto.py +163 -0
  265. qanswer_sdk/models/embedder_dto.py +103 -0
  266. qanswer_sdk/models/embedder_list_dto.py +101 -0
  267. qanswer_sdk/models/embedder_ref.py +95 -0
  268. qanswer_sdk/models/embedder_update_dto.py +135 -0
  269. qanswer_sdk/models/embedding_endpoint_import_failure.py +89 -0
  270. qanswer_sdk/models/embedding_endpoint_import_response.py +99 -0
  271. qanswer_sdk/models/embedding_endpoint_modality.py +37 -0
  272. qanswer_sdk/models/embedding_endpoint_validation_response.py +90 -0
  273. qanswer_sdk/models/embedding_provider.py +44 -0
  274. qanswer_sdk/models/enable_enhanced_context_payload.py +91 -0
  275. qanswer_sdk/models/enable_enhanced_context_response.py +87 -0
  276. qanswer_sdk/models/endpoint_status.py +38 -0
  277. qanswer_sdk/models/entity_description_dto.py +93 -0
  278. qanswer_sdk/models/entity_linking_payload.py +97 -0
  279. qanswer_sdk/models/entity_linking_response.py +97 -0
  280. qanswer_sdk/models/entity_model_in_linking.py +95 -0
  281. qanswer_sdk/models/es_meta_data.py +92 -0
  282. qanswer_sdk/models/es_meta_data_value.py +87 -0
  283. qanswer_sdk/models/evaluate_feedback_response.py +109 -0
  284. qanswer_sdk/models/evaluate_single_feedback_response.py +97 -0
  285. qanswer_sdk/models/extra_body.py +91 -0
  286. qanswer_sdk/models/extract_hyper_links_payload.py +100 -0
  287. qanswer_sdk/models/extract_robot_links_payload.py +88 -0
  288. qanswer_sdk/models/extract_robot_links_response.py +88 -0
  289. qanswer_sdk/models/extraction_strategy.py +38 -0
  290. qanswer_sdk/models/fact.py +96 -0
  291. qanswer_sdk/models/feedback_evaluation_history_entries_response.py +101 -0
  292. qanswer_sdk/models/feedback_evaluation_history_entry_model.py +105 -0
  293. qanswer_sdk/models/feedback_model.py +132 -0
  294. qanswer_sdk/models/feedback_response.py +95 -0
  295. qanswer_sdk/models/feedback_update.py +105 -0
  296. qanswer_sdk/models/file_acl_principal.py +99 -0
  297. qanswer_sdk/models/file_acl_response.py +101 -0
  298. qanswer_sdk/models/file_es_meta_data.py +116 -0
  299. qanswer_sdk/models/file_failure_reason.py +49 -0
  300. qanswer_sdk/models/file_folder_model.py +117 -0
  301. qanswer_sdk/models/file_model.py +124 -0
  302. qanswer_sdk/models/file_status.py +43 -0
  303. qanswer_sdk/models/file_type.py +37 -0
  304. qanswer_sdk/models/file_upload_payload.py +107 -0
  305. qanswer_sdk/models/files_by_connector_model.py +89 -0
  306. qanswer_sdk/models/g_drive_connector_info.py +96 -0
  307. qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
  308. qanswer_sdk/models/g_drive_download_request.py +103 -0
  309. qanswer_sdk/models/g_drive_refresh_request.py +91 -0
  310. qanswer_sdk/models/generation_params.py +89 -0
  311. qanswer_sdk/models/get_connector_by_id_response.py +91 -0
  312. qanswer_sdk/models/get_conversation_response.py +95 -0
  313. qanswer_sdk/models/global_config_dto.py +155 -0
  314. qanswer_sdk/models/google_drive_connector_config.py +110 -0
  315. qanswer_sdk/models/guardrail_endpoint.py +112 -0
  316. qanswer_sdk/models/guardrail_mode.py +38 -0
  317. qanswer_sdk/models/highlight_audio_payload_model.py +100 -0
  318. qanswer_sdk/models/http_validation_error.py +95 -0
  319. qanswer_sdk/models/iframe_strategy.py +38 -0
  320. qanswer_sdk/models/image_url_detail.py +38 -0
  321. qanswer_sdk/models/imap_add_payload.py +105 -0
  322. qanswer_sdk/models/imap_additional_fields.py +101 -0
  323. qanswer_sdk/models/imap_file_metadata.py +108 -0
  324. qanswer_sdk/models/imap_search_response.py +113 -0
  325. qanswer_sdk/models/index_config.py +89 -0
  326. qanswer_sdk/models/install_response.py +89 -0
  327. qanswer_sdk/models/interface_origin.py +47 -0
  328. qanswer_sdk/models/ip2_geo_response.py +91 -0
  329. qanswer_sdk/models/is_enabled_response.py +87 -0
  330. qanswer_sdk/models/jwt_authentication_response.py +93 -0
  331. qanswer_sdk/models/label.py +89 -0
  332. qanswer_sdk/models/labeled_node.py +89 -0
  333. qanswer_sdk/models/language.py +38 -0
  334. qanswer_sdk/models/last_updated_template_conversation_id_response.py +87 -0
  335. qanswer_sdk/models/link.py +99 -0
  336. qanswer_sdk/models/link_extraction_response.py +97 -0
  337. qanswer_sdk/models/link_result_paginated.py +97 -0
  338. qanswer_sdk/models/linked_entity_model_in_linking.py +99 -0
  339. qanswer_sdk/models/linker.py +103 -0
  340. qanswer_sdk/models/linking_result.py +95 -0
  341. qanswer_sdk/models/links.py +99 -0
  342. qanswer_sdk/models/list_connectors_response.py +95 -0
  343. qanswer_sdk/models/list_conversation_response.py +105 -0
  344. qanswer_sdk/models/list_feedback_response.py +105 -0
  345. qanswer_sdk/models/list_files_connector_response.py +107 -0
  346. qanswer_sdk/models/list_socket_events.py +88 -0
  347. qanswer_sdk/models/list_synonyms_model.py +95 -0
  348. qanswer_sdk/models/llm_context_ranges.py +93 -0
  349. qanswer_sdk/models/llm_cost_filter.py +112 -0
  350. qanswer_sdk/models/llm_cost_list.py +101 -0
  351. qanswer_sdk/models/llm_create_dto.py +177 -0
  352. qanswer_sdk/models/llm_detailed_dto.py +198 -0
  353. qanswer_sdk/models/llm_dto.py +120 -0
  354. qanswer_sdk/models/llm_endpoint.py +179 -0
  355. qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
  356. qanswer_sdk/models/llm_endpoint_import_failure.py +89 -0
  357. qanswer_sdk/models/llm_endpoint_import_response.py +99 -0
  358. qanswer_sdk/models/llm_endpoint_modality.py +37 -0
  359. qanswer_sdk/models/llm_endpoint_provider.py +44 -0
  360. qanswer_sdk/models/llm_endpoint_read.py +179 -0
  361. qanswer_sdk/models/llm_endpoint_validation_response.py +90 -0
  362. qanswer_sdk/models/llm_health_response.py +89 -0
  363. qanswer_sdk/models/llm_list_detailed_dto.py +101 -0
  364. qanswer_sdk/models/llm_list_dto.py +101 -0
  365. qanswer_sdk/models/llm_update_dto.py +174 -0
  366. qanswer_sdk/models/location_details.py +97 -0
  367. qanswer_sdk/models/log_stats_request.py +100 -0
  368. qanswer_sdk/models/login_request.py +89 -0
  369. qanswer_sdk/models/logs_visibility_policy.py +38 -0
  370. qanswer_sdk/models/logs_visibility_policy_payload.py +92 -0
  371. qanswer_sdk/models/logs_visibility_policy_response.py +92 -0
  372. qanswer_sdk/models/mcp_auth_field_definition.py +98 -0
  373. qanswer_sdk/models/mcp_auth_field_type.py +37 -0
  374. qanswer_sdk/models/mcp_authentication_type.py +39 -0
  375. qanswer_sdk/models/mcp_connection.py +108 -0
  376. qanswer_sdk/models/mcp_connection_create.py +100 -0
  377. qanswer_sdk/models/mcp_server.py +146 -0
  378. qanswer_sdk/models/mcp_server_create.py +116 -0
  379. qanswer_sdk/models/mcp_server_type.py +37 -0
  380. qanswer_sdk/models/mcp_server_update.py +114 -0
  381. qanswer_sdk/models/mcp_tool_dto.py +131 -0
  382. qanswer_sdk/models/mcp_tool_info.py +95 -0
  383. qanswer_sdk/models/mcp_tool_selection_source.py +37 -0
  384. qanswer_sdk/models/mcp_tool_sync_action.py +39 -0
  385. qanswer_sdk/models/mcp_tool_sync_diff.py +94 -0
  386. qanswer_sdk/models/mcp_tool_sync_preview.py +95 -0
  387. qanswer_sdk/models/mcp_tool_update.py +91 -0
  388. qanswer_sdk/models/mcp_transport.py +37 -0
  389. qanswer_sdk/models/mcp_visibility.py +38 -0
  390. qanswer_sdk/models/mcpo_auth2_authorize_body.py +105 -0
  391. qanswer_sdk/models/mcpo_auth2_initiating_origin.py +42 -0
  392. qanswer_sdk/models/message_role.py +38 -0
  393. qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
  394. qanswer_sdk/models/microsoft_connector_config.py +110 -0
  395. qanswer_sdk/models/modify_connector_request.py +98 -0
  396. qanswer_sdk/models/modify_file_display_name_request.py +97 -0
  397. qanswer_sdk/models/notification_dto.py +114 -0
  398. qanswer_sdk/models/notification_filter.py +107 -0
  399. qanswer_sdk/models/notification_list_dto.py +101 -0
  400. qanswer_sdk/models/notification_payload_add_to_org_dto.py +87 -0
  401. qanswer_sdk/models/notification_payload_add_to_team_dto.py +89 -0
  402. qanswer_sdk/models/notification_payload_ai_assistant_shared_dto.py +100 -0
  403. qanswer_sdk/models/notification_payload_conversation_shared_dto.py +96 -0
  404. qanswer_sdk/models/notification_payload_human_takeover_requested_dto.py +89 -0
  405. qanswer_sdk/models/notification_payload_quota_reaching_dto.py +91 -0
  406. qanswer_sdk/models/notification_read_dto.py +89 -0
  407. qanswer_sdk/models/notification_type.py +44 -0
  408. qanswer_sdk/models/o_auth_redirect_response.py +89 -0
  409. qanswer_sdk/models/o_auth_service_dto.py +89 -0
  410. qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
  411. qanswer_sdk/models/one_drive_download_request.py +103 -0
  412. qanswer_sdk/models/one_note_download_by_ids.py +91 -0
  413. qanswer_sdk/models/one_note_download_request.py +103 -0
  414. qanswer_sdk/models/org_llm_detailed_dto.py +105 -0
  415. qanswer_sdk/models/org_llm_features_dto.py +89 -0
  416. qanswer_sdk/models/org_role.py +37 -0
  417. qanswer_sdk/models/org_user_profile_dto.py +210 -0
  418. qanswer_sdk/models/org_user_profile_list_dto.py +101 -0
  419. qanswer_sdk/models/organization_admin_dto.py +97 -0
  420. qanswer_sdk/models/organization_creation_dto.py +91 -0
  421. qanswer_sdk/models/organization_dto.py +93 -0
  422. qanswer_sdk/models/organization_list_dto.py +101 -0
  423. qanswer_sdk/models/organization_user_dto.py +101 -0
  424. qanswer_sdk/models/organization_user_list_dto.py +101 -0
  425. qanswer_sdk/models/paginated_report_templates.py +101 -0
  426. qanswer_sdk/models/password.py +89 -0
  427. qanswer_sdk/models/pinecone_index_model.py +91 -0
  428. qanswer_sdk/models/plan_dto.py +108 -0
  429. qanswer_sdk/models/predicted_class.py +89 -0
  430. qanswer_sdk/models/prepare_synonyms_upload_resp.py +99 -0
  431. qanswer_sdk/models/prepared_synonym_group.py +87 -0
  432. qanswer_sdk/models/pricing_plan.py +51 -0
  433. qanswer_sdk/models/pricing_type.py +38 -0
  434. qanswer_sdk/models/prompt_type.py +49 -0
  435. qanswer_sdk/models/provider.py +87 -0
  436. qanswer_sdk/models/publication_add_payload.py +105 -0
  437. qanswer_sdk/models/publication_file_metadata.py +105 -0
  438. qanswer_sdk/models/publication_office_additional_fields.py +111 -0
  439. qanswer_sdk/models/publication_office_connector_config.py +112 -0
  440. qanswer_sdk/models/publication_search_index_search_response.py +113 -0
  441. qanswer_sdk/models/qa_context.py +129 -0
  442. qanswer_sdk/models/qa_context_display_type.py +44 -0
  443. qanswer_sdk/models/qa_contexts.py +106 -0
  444. qanswer_sdk/models/qa_table.py +100 -0
  445. qanswer_sdk/models/qn_a_pair_model.py +103 -0
  446. qanswer_sdk/models/qn_a_pair_response.py +95 -0
  447. qanswer_sdk/models/rag_payload.py +185 -0
  448. qanswer_sdk/models/rag_response.py +147 -0
  449. qanswer_sdk/models/rdf_entity_linker_response.py +99 -0
  450. qanswer_sdk/models/rdf_linked_entity.py +97 -0
  451. qanswer_sdk/models/reasoning_effort.py +39 -0
  452. qanswer_sdk/models/reference_model.py +99 -0
  453. qanswer_sdk/models/refresh_frequency.py +39 -0
  454. qanswer_sdk/models/refresh_token_request.py +87 -0
  455. qanswer_sdk/models/refresh_website_connector_links_payload.py +96 -0
  456. qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
  457. qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
  458. qanswer_sdk/models/report_copilot_generation_from_slots_ack.py +91 -0
  459. qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
  460. qanswer_sdk/models/report_copilot_refinement_payload.py +106 -0
  461. qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
  462. qanswer_sdk/models/report_copilot_slot_feedback_update.py +95 -0
  463. qanswer_sdk/models/report_copilot_slot_feedback_update_response.py +95 -0
  464. qanswer_sdk/models/report_copilot_slot_task_settings.py +121 -0
  465. qanswer_sdk/models/report_copilot_slot_task_settings_update.py +121 -0
  466. qanswer_sdk/models/report_copilot_task_settings.py +119 -0
  467. qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
  468. qanswer_sdk/models/report_copilot_task_update.py +119 -0
  469. qanswer_sdk/models/report_template.py +155 -0
  470. qanswer_sdk/models/report_template_create_payload.py +132 -0
  471. qanswer_sdk/models/report_template_image_upload_response.py +87 -0
  472. qanswer_sdk/models/report_template_simplified.py +116 -0
  473. qanswer_sdk/models/report_template_simplified_payload.py +91 -0
  474. qanswer_sdk/models/report_template_task_settings_update_payload.py +91 -0
  475. qanswer_sdk/models/report_template_update_payload.py +136 -0
  476. qanswer_sdk/models/report_templates_search_payload.py +106 -0
  477. qanswer_sdk/models/reset_password.py +87 -0
  478. qanswer_sdk/models/response_audit_model.py +99 -0
  479. qanswer_sdk/models/response_audit_stats_response.py +101 -0
  480. qanswer_sdk/models/response_get_dummy_union_connector_config_model_api_connectors_config_dummy_models_union_get.py +228 -0
  481. qanswer_sdk/models/retention_policy_dto.py +106 -0
  482. qanswer_sdk/models/retention_policy_update.py +101 -0
  483. qanswer_sdk/models/retention_preview_response.py +92 -0
  484. qanswer_sdk/models/retention_run_progress_event.py +98 -0
  485. qanswer_sdk/models/retention_run_status_response.py +91 -0
  486. qanswer_sdk/models/retention_scope_type.py +38 -0
  487. qanswer_sdk/models/retention_sweep_result.py +89 -0
  488. qanswer_sdk/models/retention_unit.py +38 -0
  489. qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
  490. qanswer_sdk/models/retry_params.py +89 -0
  491. qanswer_sdk/models/return_type.py +38 -0
  492. qanswer_sdk/models/role.py +90 -0
  493. qanswer_sdk/models/role_name.py +37 -0
  494. qanswer_sdk/models/scrolling_strategy.py +37 -0
  495. qanswer_sdk/models/search_conversation_messages_response.py +105 -0
  496. qanswer_sdk/models/search_document_response.py +107 -0
  497. qanswer_sdk/models/search_index_payload.py +114 -0
  498. qanswer_sdk/models/search_metadata_filter.py +94 -0
  499. qanswer_sdk/models/search_payload.py +150 -0
  500. qanswer_sdk/models/search_response.py +120 -0
  501. qanswer_sdk/models/search_synonyms_resp.py +91 -0
  502. qanswer_sdk/models/search_task_settings.py +135 -0
  503. qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
  504. qanswer_sdk/models/search_task_update.py +133 -0
  505. qanswer_sdk/models/sender_type.py +38 -0
  506. qanswer_sdk/models/serve_pdf200_response.py +87 -0
  507. qanswer_sdk/models/share_point_connector_settings.py +99 -0
  508. qanswer_sdk/models/share_point_download_by_ids.py +99 -0
  509. qanswer_sdk/models/share_point_download_request.py +103 -0
  510. qanswer_sdk/models/shared_by.py +38 -0
  511. qanswer_sdk/models/shared_entity_type.py +38 -0
  512. qanswer_sdk/models/shared_organization_access_dto.py +116 -0
  513. qanswer_sdk/models/shared_team_access_dto.py +116 -0
  514. qanswer_sdk/models/shared_user.py +90 -0
  515. qanswer_sdk/models/sign_out_request.py +87 -0
  516. qanswer_sdk/models/sign_up_request.py +99 -0
  517. qanswer_sdk/models/slot.py +153 -0
  518. qanswer_sdk/models/slot_history_entry.py +119 -0
  519. qanswer_sdk/models/slot_in_prompt.py +91 -0
  520. qanswer_sdk/models/slot_info_with_latest_version.py +95 -0
  521. qanswer_sdk/models/slot_update.py +133 -0
  522. qanswer_sdk/models/socker_join_user.py +91 -0
  523. qanswer_sdk/models/socket_audio_transcription_status.py +102 -0
  524. qanswer_sdk/models/socket_conversation_message.py +245 -0
  525. qanswer_sdk/models/socket_dataset_reindexing_status.py +97 -0
  526. qanswer_sdk/models/socket_events_q_answer.py +55 -0
  527. qanswer_sdk/models/socket_feedback_evaluation_progress.py +108 -0
  528. qanswer_sdk/models/socket_file_metadata.py +194 -0
  529. qanswer_sdk/models/socket_file_status_batch.py +103 -0
  530. qanswer_sdk/models/socket_file_status_item.py +99 -0
  531. qanswer_sdk/models/socket_join_conversation.py +97 -0
  532. qanswer_sdk/models/socket_join_dataset.py +93 -0
  533. qanswer_sdk/models/socket_message_status.py +40 -0
  534. qanswer_sdk/models/socket_notification.py +109 -0
  535. qanswer_sdk/models/socket_report_continuation_response.py +100 -0
  536. qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +116 -0
  537. qanswer_sdk/models/socket_report_copilot_generation_from_template_response.py +116 -0
  538. qanswer_sdk/models/socket_report_copilot_refinement_response.py +102 -0
  539. qanswer_sdk/models/socket_speech2_text_response.py +122 -0
  540. qanswer_sdk/models/socket_stop_conversation.py +97 -0
  541. qanswer_sdk/models/source.py +125 -0
  542. qanswer_sdk/models/source_metadata.py +109 -0
  543. qanswer_sdk/models/speech2_text_response.py +110 -0
  544. qanswer_sdk/models/stat_per_date.py +89 -0
  545. qanswer_sdk/models/status_response.py +89 -0
  546. qanswer_sdk/models/storage_active_status.py +37 -0
  547. qanswer_sdk/models/subscription_response.py +92 -0
  548. qanswer_sdk/models/subscription_status.py +39 -0
  549. qanswer_sdk/models/suggested_replies.py +87 -0
  550. qanswer_sdk/models/suggestion_list_response.py +87 -0
  551. qanswer_sdk/models/summa_server.py +101 -0
  552. qanswer_sdk/models/task_category.py +61 -0
  553. qanswer_sdk/models/task_name.py +43 -0
  554. qanswer_sdk/models/team_admin_dto.py +95 -0
  555. qanswer_sdk/models/team_creation_dto.py +89 -0
  556. qanswer_sdk/models/team_dto.py +93 -0
  557. qanswer_sdk/models/team_list_dto.py +101 -0
  558. qanswer_sdk/models/team_list_dto_teams_inner.py +149 -0
  559. qanswer_sdk/models/team_role.py +37 -0
  560. qanswer_sdk/models/team_with_count_dto.py +95 -0
  561. qanswer_sdk/models/teams_bot_auth_type.py +38 -0
  562. qanswer_sdk/models/teams_bot_registration_dto.py +107 -0
  563. qanswer_sdk/models/teams_bot_registration_upsert_dto.py +105 -0
  564. qanswer_sdk/models/template_clip_structure.py +114 -0
  565. qanswer_sdk/models/template_toggle_request.py +93 -0
  566. qanswer_sdk/models/terms_bucket.py +107 -0
  567. qanswer_sdk/models/test_imap_connection_payload.py +95 -0
  568. qanswer_sdk/models/text2_sparql_payload.py +187 -0
  569. qanswer_sdk/models/text2_sparql_task_settings.py +119 -0
  570. qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
  571. qanswer_sdk/models/text2_sparql_task_update.py +119 -0
  572. qanswer_sdk/models/text_classification_payload.py +99 -0
  573. qanswer_sdk/models/text_classification_response.py +87 -0
  574. qanswer_sdk/models/text_classification_v2_payload.py +99 -0
  575. qanswer_sdk/models/text_classification_v2_response.py +95 -0
  576. qanswer_sdk/models/thinking_block.py +91 -0
  577. qanswer_sdk/models/tool_selection.py +89 -0
  578. qanswer_sdk/models/total_stat.py +96 -0
  579. qanswer_sdk/models/ui_mappings.py +141 -0
  580. qanswer_sdk/models/update_file_es_meta_data.py +116 -0
  581. qanswer_sdk/models/update_metadata_model.py +97 -0
  582. qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
  583. qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
  584. qanswer_sdk/models/update_synonyms.py +95 -0
  585. qanswer_sdk/models/update_synonyms_resp.py +89 -0
  586. qanswer_sdk/models/upload_metadata.py +115 -0
  587. qanswer_sdk/models/user_credits_config_dto.py +99 -0
  588. qanswer_sdk/models/user_credits_dto.py +106 -0
  589. qanswer_sdk/models/user_dataset_api_key_dto.py +120 -0
  590. qanswer_sdk/models/user_dataset_mcp_tool_selection_dto.py +100 -0
  591. qanswer_sdk/models/user_dto.py +91 -0
  592. qanswer_sdk/models/user_identity_availability.py +87 -0
  593. qanswer_sdk/models/user_info_dto.py +95 -0
  594. qanswer_sdk/models/user_list_dto.py +101 -0
  595. qanswer_sdk/models/user_log_dto.py +102 -0
  596. qanswer_sdk/models/user_logs_list_dto.py +97 -0
  597. qanswer_sdk/models/user_mcp_tool_selection_dto.py +107 -0
  598. qanswer_sdk/models/user_oauth_token_dto.py +96 -0
  599. qanswer_sdk/models/user_profile_dto.py +199 -0
  600. qanswer_sdk/models/user_profile_list_dto.py +101 -0
  601. qanswer_sdk/models/user_team_dto.py +94 -0
  602. qanswer_sdk/models/validation_error.py +108 -0
  603. qanswer_sdk/models/validation_error_loc_inner.py +138 -0
  604. qanswer_sdk/models/warn_visibility.py +40 -0
  605. qanswer_sdk/models/websearch_connector_config.py +102 -0
  606. qanswer_sdk/models/websearch_scraping_site.py +91 -0
  607. qanswer_sdk/models/website_add_payload.py +102 -0
  608. qanswer_sdk/models/website_connector_config.py +102 -0
  609. qanswer_sdk/models/website_connector_settings.py +123 -0
  610. qanswer_sdk/models/widget_configs.py +109 -0
  611. qanswer_sdk/models/x_wiki_add_request.py +97 -0
  612. qanswer_sdk/models/x_wiki_download_by_ids.py +89 -0
  613. qanswer_sdk/py.typed +0 -0
  614. qanswer_sdk/rest.py +258 -0
  615. qanswer_sdk-0.1.0.dev0.dist-info/METADATA +252 -0
  616. qanswer_sdk-0.1.0.dev0.dist-info/RECORD +618 -0
  617. qanswer_sdk-0.1.0.dev0.dist-info/WHEEL +5 -0
  618. qanswer_sdk-0.1.0.dev0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3749 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ free-text-client
5
+
6
+ QAnswer 2.0 API
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBytes, StrictInt, StrictStr
20
+ from typing import Any, Optional, Tuple, Union
21
+ from typing_extensions import Annotated
22
+ from qanswer_sdk.models.ai_excel_entity_search_payload import AIExcelEntitySearchPayload
23
+ from qanswer_sdk.models.ai_excel_entity_search_response import AIExcelEntitySearchResponse
24
+ from qanswer_sdk.models.ai_excel_global_settings import AIExcelGlobalSettings
25
+ from qanswer_sdk.models.ai_excel_global_settings_request import AIExcelGlobalSettingsRequest
26
+ from qanswer_sdk.models.ai_excel_task_settings import AIExcelTaskSettings
27
+ from qanswer_sdk.models.ai_excel_template_create import AIExcelTemplateCreate
28
+ from qanswer_sdk.models.ai_excel_template_read import AIExcelTemplateRead
29
+ from qanswer_sdk.models.ai_excel_template_settings_request import AIExcelTemplateSettingsRequest
30
+ from qanswer_sdk.models.ai_excel_template_update import AIExcelTemplateUpdate
31
+ from qanswer_sdk.models.ai_excel_templates_search_request import AIExcelTemplatesSearchRequest
32
+ from qanswer_sdk.models.ai_excel_templates_search_response import AIExcelTemplatesSearchResponse
33
+ from qanswer_sdk.models.duplicate_ai_excel_template_request import DuplicateAIExcelTemplateRequest
34
+ from qanswer_sdk.models.duplicate_ai_excel_template_response import DuplicateAIExcelTemplateResponse
35
+
36
+ from qanswer_sdk.api_client import ApiClient, RequestSerialized
37
+ from qanswer_sdk.api_response import ApiResponse
38
+ from qanswer_sdk.rest import RESTResponseType
39
+
40
+
41
+ class TaskAIExcelApi:
42
+ """NOTE: This class is auto generated by OpenAPI Generator
43
+ Ref: https://openapi-generator.tech
44
+
45
+ Do not edit the class manually.
46
+ """
47
+
48
+ def __init__(self, api_client=None) -> None:
49
+ if api_client is None:
50
+ api_client = ApiClient.get_default()
51
+ self.api_client = api_client
52
+
53
+
54
+ @validate_call
55
+ def convert_docx_to_xlsx(
56
+ self,
57
+ username: StrictStr,
58
+ dataset: StrictStr,
59
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
60
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
61
+ _request_timeout: Union[
62
+ None,
63
+ Annotated[StrictFloat, Field(gt=0)],
64
+ Tuple[
65
+ Annotated[StrictFloat, Field(gt=0)],
66
+ Annotated[StrictFloat, Field(gt=0)]
67
+ ]
68
+ ] = None,
69
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
70
+ _content_type: Optional[StrictStr] = None,
71
+ _headers: Optional[Dict[StrictStr, Any]] = None,
72
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
73
+ ) -> object:
74
+ """Convert Docx To Xlsx
75
+
76
+
77
+ :param username: (required)
78
+ :type username: str
79
+ :param dataset: (required)
80
+ :type dataset: str
81
+ :param file: (required)
82
+ :type file: bytearray
83
+ :param q_answer_api_key: Optional QAnswer API key
84
+ :type q_answer_api_key: str
85
+ :param _request_timeout: timeout setting for this request. If one
86
+ number provided, it will be total request
87
+ timeout. It can also be a pair (tuple) of
88
+ (connection, read) timeouts.
89
+ :type _request_timeout: int, tuple(int, int), optional
90
+ :param _request_auth: set to override the auth_settings for an a single
91
+ request; this effectively ignores the
92
+ authentication in the spec for a single request.
93
+ :type _request_auth: dict, optional
94
+ :param _content_type: force content-type for the request.
95
+ :type _content_type: str, Optional
96
+ :param _headers: set to override the headers for a single
97
+ request; this effectively ignores the headers
98
+ in the spec for a single request.
99
+ :type _headers: dict, optional
100
+ :param _host_index: set to override the host_index for a single
101
+ request; this effectively ignores the host_index
102
+ in the spec for a single request.
103
+ :type _host_index: int, optional
104
+ :return: Returns the result object.
105
+ """ # noqa: E501
106
+
107
+ _param = self._convert_docx_to_xlsx_serialize(
108
+ username=username,
109
+ dataset=dataset,
110
+ file=file,
111
+ q_answer_api_key=q_answer_api_key,
112
+ _request_auth=_request_auth,
113
+ _content_type=_content_type,
114
+ _headers=_headers,
115
+ _host_index=_host_index
116
+ )
117
+
118
+ _response_types_map: Dict[str, Optional[str]] = {
119
+ '200': "object",
120
+ '422': "HTTPValidationError",
121
+ }
122
+ response_data = self.api_client.call_api(
123
+ *_param,
124
+ _request_timeout=_request_timeout
125
+ )
126
+ response_data.read()
127
+ return self.api_client.response_deserialize(
128
+ response_data=response_data,
129
+ response_types_map=_response_types_map,
130
+ ).data
131
+
132
+
133
+ @validate_call
134
+ def convert_docx_to_xlsx_with_http_info(
135
+ self,
136
+ username: StrictStr,
137
+ dataset: StrictStr,
138
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
139
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
140
+ _request_timeout: Union[
141
+ None,
142
+ Annotated[StrictFloat, Field(gt=0)],
143
+ Tuple[
144
+ Annotated[StrictFloat, Field(gt=0)],
145
+ Annotated[StrictFloat, Field(gt=0)]
146
+ ]
147
+ ] = None,
148
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
149
+ _content_type: Optional[StrictStr] = None,
150
+ _headers: Optional[Dict[StrictStr, Any]] = None,
151
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
152
+ ) -> ApiResponse[object]:
153
+ """Convert Docx To Xlsx
154
+
155
+
156
+ :param username: (required)
157
+ :type username: str
158
+ :param dataset: (required)
159
+ :type dataset: str
160
+ :param file: (required)
161
+ :type file: bytearray
162
+ :param q_answer_api_key: Optional QAnswer API key
163
+ :type q_answer_api_key: str
164
+ :param _request_timeout: timeout setting for this request. If one
165
+ number provided, it will be total request
166
+ timeout. It can also be a pair (tuple) of
167
+ (connection, read) timeouts.
168
+ :type _request_timeout: int, tuple(int, int), optional
169
+ :param _request_auth: set to override the auth_settings for an a single
170
+ request; this effectively ignores the
171
+ authentication in the spec for a single request.
172
+ :type _request_auth: dict, optional
173
+ :param _content_type: force content-type for the request.
174
+ :type _content_type: str, Optional
175
+ :param _headers: set to override the headers for a single
176
+ request; this effectively ignores the headers
177
+ in the spec for a single request.
178
+ :type _headers: dict, optional
179
+ :param _host_index: set to override the host_index for a single
180
+ request; this effectively ignores the host_index
181
+ in the spec for a single request.
182
+ :type _host_index: int, optional
183
+ :return: Returns the result object.
184
+ """ # noqa: E501
185
+
186
+ _param = self._convert_docx_to_xlsx_serialize(
187
+ username=username,
188
+ dataset=dataset,
189
+ file=file,
190
+ q_answer_api_key=q_answer_api_key,
191
+ _request_auth=_request_auth,
192
+ _content_type=_content_type,
193
+ _headers=_headers,
194
+ _host_index=_host_index
195
+ )
196
+
197
+ _response_types_map: Dict[str, Optional[str]] = {
198
+ '200': "object",
199
+ '422': "HTTPValidationError",
200
+ }
201
+ response_data = self.api_client.call_api(
202
+ *_param,
203
+ _request_timeout=_request_timeout
204
+ )
205
+ response_data.read()
206
+ return self.api_client.response_deserialize(
207
+ response_data=response_data,
208
+ response_types_map=_response_types_map,
209
+ )
210
+
211
+
212
+ @validate_call
213
+ def convert_docx_to_xlsx_without_preload_content(
214
+ self,
215
+ username: StrictStr,
216
+ dataset: StrictStr,
217
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
218
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
219
+ _request_timeout: Union[
220
+ None,
221
+ Annotated[StrictFloat, Field(gt=0)],
222
+ Tuple[
223
+ Annotated[StrictFloat, Field(gt=0)],
224
+ Annotated[StrictFloat, Field(gt=0)]
225
+ ]
226
+ ] = None,
227
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
228
+ _content_type: Optional[StrictStr] = None,
229
+ _headers: Optional[Dict[StrictStr, Any]] = None,
230
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
231
+ ) -> RESTResponseType:
232
+ """Convert Docx To Xlsx
233
+
234
+
235
+ :param username: (required)
236
+ :type username: str
237
+ :param dataset: (required)
238
+ :type dataset: str
239
+ :param file: (required)
240
+ :type file: bytearray
241
+ :param q_answer_api_key: Optional QAnswer API key
242
+ :type q_answer_api_key: str
243
+ :param _request_timeout: timeout setting for this request. If one
244
+ number provided, it will be total request
245
+ timeout. It can also be a pair (tuple) of
246
+ (connection, read) timeouts.
247
+ :type _request_timeout: int, tuple(int, int), optional
248
+ :param _request_auth: set to override the auth_settings for an a single
249
+ request; this effectively ignores the
250
+ authentication in the spec for a single request.
251
+ :type _request_auth: dict, optional
252
+ :param _content_type: force content-type for the request.
253
+ :type _content_type: str, Optional
254
+ :param _headers: set to override the headers for a single
255
+ request; this effectively ignores the headers
256
+ in the spec for a single request.
257
+ :type _headers: dict, optional
258
+ :param _host_index: set to override the host_index for a single
259
+ request; this effectively ignores the host_index
260
+ in the spec for a single request.
261
+ :type _host_index: int, optional
262
+ :return: Returns the result object.
263
+ """ # noqa: E501
264
+
265
+ _param = self._convert_docx_to_xlsx_serialize(
266
+ username=username,
267
+ dataset=dataset,
268
+ file=file,
269
+ q_answer_api_key=q_answer_api_key,
270
+ _request_auth=_request_auth,
271
+ _content_type=_content_type,
272
+ _headers=_headers,
273
+ _host_index=_host_index
274
+ )
275
+
276
+ _response_types_map: Dict[str, Optional[str]] = {
277
+ '200': "object",
278
+ '422': "HTTPValidationError",
279
+ }
280
+ response_data = self.api_client.call_api(
281
+ *_param,
282
+ _request_timeout=_request_timeout
283
+ )
284
+ return response_data.response
285
+
286
+
287
+ def _convert_docx_to_xlsx_serialize(
288
+ self,
289
+ username,
290
+ dataset,
291
+ file,
292
+ q_answer_api_key,
293
+ _request_auth,
294
+ _content_type,
295
+ _headers,
296
+ _host_index,
297
+ ) -> RequestSerialized:
298
+
299
+ _host = None
300
+
301
+ _collection_formats: Dict[str, str] = {
302
+ }
303
+
304
+ _path_params: Dict[str, str] = {}
305
+ _query_params: List[Tuple[str, str]] = []
306
+ _header_params: Dict[str, Optional[str]] = _headers or {}
307
+ _form_params: List[Tuple[str, str]] = []
308
+ _files: Dict[
309
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
310
+ ] = {}
311
+ _body_params: Optional[bytes] = None
312
+
313
+ # process the path parameters
314
+ # process the query parameters
315
+ if username is not None:
316
+
317
+ _query_params.append(('username', username))
318
+
319
+ if dataset is not None:
320
+
321
+ _query_params.append(('dataset', dataset))
322
+
323
+ # process the header parameters
324
+ if q_answer_api_key is not None:
325
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
326
+ # process the form parameters
327
+ if file is not None:
328
+ _files['file'] = file
329
+ # process the body parameter
330
+
331
+
332
+ # set the HTTP header `Accept`
333
+ if 'Accept' not in _header_params:
334
+ _header_params['Accept'] = self.api_client.select_header_accept(
335
+ [
336
+ 'application/json'
337
+ ]
338
+ )
339
+
340
+ # set the HTTP header `Content-Type`
341
+ if _content_type:
342
+ _header_params['Content-Type'] = _content_type
343
+ else:
344
+ _default_content_type = (
345
+ self.api_client.select_header_content_type(
346
+ [
347
+ 'multipart/form-data'
348
+ ]
349
+ )
350
+ )
351
+ if _default_content_type is not None:
352
+ _header_params['Content-Type'] = _default_content_type
353
+
354
+ # authentication setting
355
+ _auth_settings: List[str] = [
356
+ 'QAnswer-Api-Key',
357
+ 'Bearer token'
358
+ ]
359
+
360
+ return self.api_client.param_serialize(
361
+ method='POST',
362
+ resource_path='/api/tasks/ai-excel/convert/docx-to-xlsx',
363
+ path_params=_path_params,
364
+ query_params=_query_params,
365
+ header_params=_header_params,
366
+ body=_body_params,
367
+ post_params=_form_params,
368
+ files=_files,
369
+ auth_settings=_auth_settings,
370
+ collection_formats=_collection_formats,
371
+ _host=_host,
372
+ _request_auth=_request_auth
373
+ )
374
+
375
+
376
+
377
+
378
+ @validate_call
379
+ def create_ai_excel_template(
380
+ self,
381
+ ai_excel_template_create: AIExcelTemplateCreate,
382
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
383
+ _request_timeout: Union[
384
+ None,
385
+ Annotated[StrictFloat, Field(gt=0)],
386
+ Tuple[
387
+ Annotated[StrictFloat, Field(gt=0)],
388
+ Annotated[StrictFloat, Field(gt=0)]
389
+ ]
390
+ ] = None,
391
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
392
+ _content_type: Optional[StrictStr] = None,
393
+ _headers: Optional[Dict[StrictStr, Any]] = None,
394
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
395
+ ) -> AIExcelTemplateRead:
396
+ """Create Ai Excel Template
397
+
398
+
399
+ :param ai_excel_template_create: (required)
400
+ :type ai_excel_template_create: AIExcelTemplateCreate
401
+ :param q_answer_api_key: Optional QAnswer API key
402
+ :type q_answer_api_key: str
403
+ :param _request_timeout: timeout setting for this request. If one
404
+ number provided, it will be total request
405
+ timeout. It can also be a pair (tuple) of
406
+ (connection, read) timeouts.
407
+ :type _request_timeout: int, tuple(int, int), optional
408
+ :param _request_auth: set to override the auth_settings for an a single
409
+ request; this effectively ignores the
410
+ authentication in the spec for a single request.
411
+ :type _request_auth: dict, optional
412
+ :param _content_type: force content-type for the request.
413
+ :type _content_type: str, Optional
414
+ :param _headers: set to override the headers for a single
415
+ request; this effectively ignores the headers
416
+ in the spec for a single request.
417
+ :type _headers: dict, optional
418
+ :param _host_index: set to override the host_index for a single
419
+ request; this effectively ignores the host_index
420
+ in the spec for a single request.
421
+ :type _host_index: int, optional
422
+ :return: Returns the result object.
423
+ """ # noqa: E501
424
+
425
+ _param = self._create_ai_excel_template_serialize(
426
+ ai_excel_template_create=ai_excel_template_create,
427
+ q_answer_api_key=q_answer_api_key,
428
+ _request_auth=_request_auth,
429
+ _content_type=_content_type,
430
+ _headers=_headers,
431
+ _host_index=_host_index
432
+ )
433
+
434
+ _response_types_map: Dict[str, Optional[str]] = {
435
+ '200': "AIExcelTemplateRead",
436
+ '422': "HTTPValidationError",
437
+ }
438
+ response_data = self.api_client.call_api(
439
+ *_param,
440
+ _request_timeout=_request_timeout
441
+ )
442
+ response_data.read()
443
+ return self.api_client.response_deserialize(
444
+ response_data=response_data,
445
+ response_types_map=_response_types_map,
446
+ ).data
447
+
448
+
449
+ @validate_call
450
+ def create_ai_excel_template_with_http_info(
451
+ self,
452
+ ai_excel_template_create: AIExcelTemplateCreate,
453
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
454
+ _request_timeout: Union[
455
+ None,
456
+ Annotated[StrictFloat, Field(gt=0)],
457
+ Tuple[
458
+ Annotated[StrictFloat, Field(gt=0)],
459
+ Annotated[StrictFloat, Field(gt=0)]
460
+ ]
461
+ ] = None,
462
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
463
+ _content_type: Optional[StrictStr] = None,
464
+ _headers: Optional[Dict[StrictStr, Any]] = None,
465
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
466
+ ) -> ApiResponse[AIExcelTemplateRead]:
467
+ """Create Ai Excel Template
468
+
469
+
470
+ :param ai_excel_template_create: (required)
471
+ :type ai_excel_template_create: AIExcelTemplateCreate
472
+ :param q_answer_api_key: Optional QAnswer API key
473
+ :type q_answer_api_key: str
474
+ :param _request_timeout: timeout setting for this request. If one
475
+ number provided, it will be total request
476
+ timeout. It can also be a pair (tuple) of
477
+ (connection, read) timeouts.
478
+ :type _request_timeout: int, tuple(int, int), optional
479
+ :param _request_auth: set to override the auth_settings for an a single
480
+ request; this effectively ignores the
481
+ authentication in the spec for a single request.
482
+ :type _request_auth: dict, optional
483
+ :param _content_type: force content-type for the request.
484
+ :type _content_type: str, Optional
485
+ :param _headers: set to override the headers for a single
486
+ request; this effectively ignores the headers
487
+ in the spec for a single request.
488
+ :type _headers: dict, optional
489
+ :param _host_index: set to override the host_index for a single
490
+ request; this effectively ignores the host_index
491
+ in the spec for a single request.
492
+ :type _host_index: int, optional
493
+ :return: Returns the result object.
494
+ """ # noqa: E501
495
+
496
+ _param = self._create_ai_excel_template_serialize(
497
+ ai_excel_template_create=ai_excel_template_create,
498
+ q_answer_api_key=q_answer_api_key,
499
+ _request_auth=_request_auth,
500
+ _content_type=_content_type,
501
+ _headers=_headers,
502
+ _host_index=_host_index
503
+ )
504
+
505
+ _response_types_map: Dict[str, Optional[str]] = {
506
+ '200': "AIExcelTemplateRead",
507
+ '422': "HTTPValidationError",
508
+ }
509
+ response_data = self.api_client.call_api(
510
+ *_param,
511
+ _request_timeout=_request_timeout
512
+ )
513
+ response_data.read()
514
+ return self.api_client.response_deserialize(
515
+ response_data=response_data,
516
+ response_types_map=_response_types_map,
517
+ )
518
+
519
+
520
+ @validate_call
521
+ def create_ai_excel_template_without_preload_content(
522
+ self,
523
+ ai_excel_template_create: AIExcelTemplateCreate,
524
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
525
+ _request_timeout: Union[
526
+ None,
527
+ Annotated[StrictFloat, Field(gt=0)],
528
+ Tuple[
529
+ Annotated[StrictFloat, Field(gt=0)],
530
+ Annotated[StrictFloat, Field(gt=0)]
531
+ ]
532
+ ] = None,
533
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
534
+ _content_type: Optional[StrictStr] = None,
535
+ _headers: Optional[Dict[StrictStr, Any]] = None,
536
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
537
+ ) -> RESTResponseType:
538
+ """Create Ai Excel Template
539
+
540
+
541
+ :param ai_excel_template_create: (required)
542
+ :type ai_excel_template_create: AIExcelTemplateCreate
543
+ :param q_answer_api_key: Optional QAnswer API key
544
+ :type q_answer_api_key: str
545
+ :param _request_timeout: timeout setting for this request. If one
546
+ number provided, it will be total request
547
+ timeout. It can also be a pair (tuple) of
548
+ (connection, read) timeouts.
549
+ :type _request_timeout: int, tuple(int, int), optional
550
+ :param _request_auth: set to override the auth_settings for an a single
551
+ request; this effectively ignores the
552
+ authentication in the spec for a single request.
553
+ :type _request_auth: dict, optional
554
+ :param _content_type: force content-type for the request.
555
+ :type _content_type: str, Optional
556
+ :param _headers: set to override the headers for a single
557
+ request; this effectively ignores the headers
558
+ in the spec for a single request.
559
+ :type _headers: dict, optional
560
+ :param _host_index: set to override the host_index for a single
561
+ request; this effectively ignores the host_index
562
+ in the spec for a single request.
563
+ :type _host_index: int, optional
564
+ :return: Returns the result object.
565
+ """ # noqa: E501
566
+
567
+ _param = self._create_ai_excel_template_serialize(
568
+ ai_excel_template_create=ai_excel_template_create,
569
+ q_answer_api_key=q_answer_api_key,
570
+ _request_auth=_request_auth,
571
+ _content_type=_content_type,
572
+ _headers=_headers,
573
+ _host_index=_host_index
574
+ )
575
+
576
+ _response_types_map: Dict[str, Optional[str]] = {
577
+ '200': "AIExcelTemplateRead",
578
+ '422': "HTTPValidationError",
579
+ }
580
+ response_data = self.api_client.call_api(
581
+ *_param,
582
+ _request_timeout=_request_timeout
583
+ )
584
+ return response_data.response
585
+
586
+
587
+ def _create_ai_excel_template_serialize(
588
+ self,
589
+ ai_excel_template_create,
590
+ q_answer_api_key,
591
+ _request_auth,
592
+ _content_type,
593
+ _headers,
594
+ _host_index,
595
+ ) -> RequestSerialized:
596
+
597
+ _host = None
598
+
599
+ _collection_formats: Dict[str, str] = {
600
+ }
601
+
602
+ _path_params: Dict[str, str] = {}
603
+ _query_params: List[Tuple[str, str]] = []
604
+ _header_params: Dict[str, Optional[str]] = _headers or {}
605
+ _form_params: List[Tuple[str, str]] = []
606
+ _files: Dict[
607
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
608
+ ] = {}
609
+ _body_params: Optional[bytes] = None
610
+
611
+ # process the path parameters
612
+ # process the query parameters
613
+ # process the header parameters
614
+ if q_answer_api_key is not None:
615
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
616
+ # process the form parameters
617
+ # process the body parameter
618
+ if ai_excel_template_create is not None:
619
+ _body_params = ai_excel_template_create
620
+
621
+
622
+ # set the HTTP header `Accept`
623
+ if 'Accept' not in _header_params:
624
+ _header_params['Accept'] = self.api_client.select_header_accept(
625
+ [
626
+ 'application/json'
627
+ ]
628
+ )
629
+
630
+ # set the HTTP header `Content-Type`
631
+ if _content_type:
632
+ _header_params['Content-Type'] = _content_type
633
+ else:
634
+ _default_content_type = (
635
+ self.api_client.select_header_content_type(
636
+ [
637
+ 'application/json'
638
+ ]
639
+ )
640
+ )
641
+ if _default_content_type is not None:
642
+ _header_params['Content-Type'] = _default_content_type
643
+
644
+ # authentication setting
645
+ _auth_settings: List[str] = [
646
+ 'QAnswer-Api-Key',
647
+ 'Bearer token'
648
+ ]
649
+
650
+ return self.api_client.param_serialize(
651
+ method='POST',
652
+ resource_path='/api/tasks/ai-excel/templates',
653
+ path_params=_path_params,
654
+ query_params=_query_params,
655
+ header_params=_header_params,
656
+ body=_body_params,
657
+ post_params=_form_params,
658
+ files=_files,
659
+ auth_settings=_auth_settings,
660
+ collection_formats=_collection_formats,
661
+ _host=_host,
662
+ _request_auth=_request_auth
663
+ )
664
+
665
+
666
+
667
+
668
+ @validate_call
669
+ def delete_ai_excel_template(
670
+ self,
671
+ conversation_id: StrictStr,
672
+ username: StrictStr,
673
+ dataset: StrictStr,
674
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
675
+ _request_timeout: Union[
676
+ None,
677
+ Annotated[StrictFloat, Field(gt=0)],
678
+ Tuple[
679
+ Annotated[StrictFloat, Field(gt=0)],
680
+ Annotated[StrictFloat, Field(gt=0)]
681
+ ]
682
+ ] = None,
683
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
684
+ _content_type: Optional[StrictStr] = None,
685
+ _headers: Optional[Dict[StrictStr, Any]] = None,
686
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
687
+ ) -> object:
688
+ """Delete Ai Excel Template
689
+
690
+
691
+ :param conversation_id: (required)
692
+ :type conversation_id: str
693
+ :param username: (required)
694
+ :type username: str
695
+ :param dataset: (required)
696
+ :type dataset: str
697
+ :param q_answer_api_key: Optional QAnswer API key
698
+ :type q_answer_api_key: str
699
+ :param _request_timeout: timeout setting for this request. If one
700
+ number provided, it will be total request
701
+ timeout. It can also be a pair (tuple) of
702
+ (connection, read) timeouts.
703
+ :type _request_timeout: int, tuple(int, int), optional
704
+ :param _request_auth: set to override the auth_settings for an a single
705
+ request; this effectively ignores the
706
+ authentication in the spec for a single request.
707
+ :type _request_auth: dict, optional
708
+ :param _content_type: force content-type for the request.
709
+ :type _content_type: str, Optional
710
+ :param _headers: set to override the headers for a single
711
+ request; this effectively ignores the headers
712
+ in the spec for a single request.
713
+ :type _headers: dict, optional
714
+ :param _host_index: set to override the host_index for a single
715
+ request; this effectively ignores the host_index
716
+ in the spec for a single request.
717
+ :type _host_index: int, optional
718
+ :return: Returns the result object.
719
+ """ # noqa: E501
720
+
721
+ _param = self._delete_ai_excel_template_serialize(
722
+ conversation_id=conversation_id,
723
+ username=username,
724
+ dataset=dataset,
725
+ q_answer_api_key=q_answer_api_key,
726
+ _request_auth=_request_auth,
727
+ _content_type=_content_type,
728
+ _headers=_headers,
729
+ _host_index=_host_index
730
+ )
731
+
732
+ _response_types_map: Dict[str, Optional[str]] = {
733
+ '200': "object",
734
+ '422': "HTTPValidationError",
735
+ }
736
+ response_data = self.api_client.call_api(
737
+ *_param,
738
+ _request_timeout=_request_timeout
739
+ )
740
+ response_data.read()
741
+ return self.api_client.response_deserialize(
742
+ response_data=response_data,
743
+ response_types_map=_response_types_map,
744
+ ).data
745
+
746
+
747
+ @validate_call
748
+ def delete_ai_excel_template_with_http_info(
749
+ self,
750
+ conversation_id: StrictStr,
751
+ username: StrictStr,
752
+ dataset: StrictStr,
753
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
754
+ _request_timeout: Union[
755
+ None,
756
+ Annotated[StrictFloat, Field(gt=0)],
757
+ Tuple[
758
+ Annotated[StrictFloat, Field(gt=0)],
759
+ Annotated[StrictFloat, Field(gt=0)]
760
+ ]
761
+ ] = None,
762
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
763
+ _content_type: Optional[StrictStr] = None,
764
+ _headers: Optional[Dict[StrictStr, Any]] = None,
765
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
766
+ ) -> ApiResponse[object]:
767
+ """Delete Ai Excel Template
768
+
769
+
770
+ :param conversation_id: (required)
771
+ :type conversation_id: str
772
+ :param username: (required)
773
+ :type username: str
774
+ :param dataset: (required)
775
+ :type dataset: str
776
+ :param q_answer_api_key: Optional QAnswer API key
777
+ :type q_answer_api_key: str
778
+ :param _request_timeout: timeout setting for this request. If one
779
+ number provided, it will be total request
780
+ timeout. It can also be a pair (tuple) of
781
+ (connection, read) timeouts.
782
+ :type _request_timeout: int, tuple(int, int), optional
783
+ :param _request_auth: set to override the auth_settings for an a single
784
+ request; this effectively ignores the
785
+ authentication in the spec for a single request.
786
+ :type _request_auth: dict, optional
787
+ :param _content_type: force content-type for the request.
788
+ :type _content_type: str, Optional
789
+ :param _headers: set to override the headers for a single
790
+ request; this effectively ignores the headers
791
+ in the spec for a single request.
792
+ :type _headers: dict, optional
793
+ :param _host_index: set to override the host_index for a single
794
+ request; this effectively ignores the host_index
795
+ in the spec for a single request.
796
+ :type _host_index: int, optional
797
+ :return: Returns the result object.
798
+ """ # noqa: E501
799
+
800
+ _param = self._delete_ai_excel_template_serialize(
801
+ conversation_id=conversation_id,
802
+ username=username,
803
+ dataset=dataset,
804
+ q_answer_api_key=q_answer_api_key,
805
+ _request_auth=_request_auth,
806
+ _content_type=_content_type,
807
+ _headers=_headers,
808
+ _host_index=_host_index
809
+ )
810
+
811
+ _response_types_map: Dict[str, Optional[str]] = {
812
+ '200': "object",
813
+ '422': "HTTPValidationError",
814
+ }
815
+ response_data = self.api_client.call_api(
816
+ *_param,
817
+ _request_timeout=_request_timeout
818
+ )
819
+ response_data.read()
820
+ return self.api_client.response_deserialize(
821
+ response_data=response_data,
822
+ response_types_map=_response_types_map,
823
+ )
824
+
825
+
826
+ @validate_call
827
+ def delete_ai_excel_template_without_preload_content(
828
+ self,
829
+ conversation_id: StrictStr,
830
+ username: StrictStr,
831
+ dataset: StrictStr,
832
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
833
+ _request_timeout: Union[
834
+ None,
835
+ Annotated[StrictFloat, Field(gt=0)],
836
+ Tuple[
837
+ Annotated[StrictFloat, Field(gt=0)],
838
+ Annotated[StrictFloat, Field(gt=0)]
839
+ ]
840
+ ] = None,
841
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
842
+ _content_type: Optional[StrictStr] = None,
843
+ _headers: Optional[Dict[StrictStr, Any]] = None,
844
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
845
+ ) -> RESTResponseType:
846
+ """Delete Ai Excel Template
847
+
848
+
849
+ :param conversation_id: (required)
850
+ :type conversation_id: str
851
+ :param username: (required)
852
+ :type username: str
853
+ :param dataset: (required)
854
+ :type dataset: str
855
+ :param q_answer_api_key: Optional QAnswer API key
856
+ :type q_answer_api_key: str
857
+ :param _request_timeout: timeout setting for this request. If one
858
+ number provided, it will be total request
859
+ timeout. It can also be a pair (tuple) of
860
+ (connection, read) timeouts.
861
+ :type _request_timeout: int, tuple(int, int), optional
862
+ :param _request_auth: set to override the auth_settings for an a single
863
+ request; this effectively ignores the
864
+ authentication in the spec for a single request.
865
+ :type _request_auth: dict, optional
866
+ :param _content_type: force content-type for the request.
867
+ :type _content_type: str, Optional
868
+ :param _headers: set to override the headers for a single
869
+ request; this effectively ignores the headers
870
+ in the spec for a single request.
871
+ :type _headers: dict, optional
872
+ :param _host_index: set to override the host_index for a single
873
+ request; this effectively ignores the host_index
874
+ in the spec for a single request.
875
+ :type _host_index: int, optional
876
+ :return: Returns the result object.
877
+ """ # noqa: E501
878
+
879
+ _param = self._delete_ai_excel_template_serialize(
880
+ conversation_id=conversation_id,
881
+ username=username,
882
+ dataset=dataset,
883
+ q_answer_api_key=q_answer_api_key,
884
+ _request_auth=_request_auth,
885
+ _content_type=_content_type,
886
+ _headers=_headers,
887
+ _host_index=_host_index
888
+ )
889
+
890
+ _response_types_map: Dict[str, Optional[str]] = {
891
+ '200': "object",
892
+ '422': "HTTPValidationError",
893
+ }
894
+ response_data = self.api_client.call_api(
895
+ *_param,
896
+ _request_timeout=_request_timeout
897
+ )
898
+ return response_data.response
899
+
900
+
901
+ def _delete_ai_excel_template_serialize(
902
+ self,
903
+ conversation_id,
904
+ username,
905
+ dataset,
906
+ q_answer_api_key,
907
+ _request_auth,
908
+ _content_type,
909
+ _headers,
910
+ _host_index,
911
+ ) -> RequestSerialized:
912
+
913
+ _host = None
914
+
915
+ _collection_formats: Dict[str, str] = {
916
+ }
917
+
918
+ _path_params: Dict[str, str] = {}
919
+ _query_params: List[Tuple[str, str]] = []
920
+ _header_params: Dict[str, Optional[str]] = _headers or {}
921
+ _form_params: List[Tuple[str, str]] = []
922
+ _files: Dict[
923
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
924
+ ] = {}
925
+ _body_params: Optional[bytes] = None
926
+
927
+ # process the path parameters
928
+ if conversation_id is not None:
929
+ _path_params['conversation_id'] = conversation_id
930
+ # process the query parameters
931
+ if username is not None:
932
+
933
+ _query_params.append(('username', username))
934
+
935
+ if dataset is not None:
936
+
937
+ _query_params.append(('dataset', dataset))
938
+
939
+ # process the header parameters
940
+ if q_answer_api_key is not None:
941
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
942
+ # process the form parameters
943
+ # process the body parameter
944
+
945
+
946
+ # set the HTTP header `Accept`
947
+ if 'Accept' not in _header_params:
948
+ _header_params['Accept'] = self.api_client.select_header_accept(
949
+ [
950
+ 'application/json'
951
+ ]
952
+ )
953
+
954
+
955
+ # authentication setting
956
+ _auth_settings: List[str] = [
957
+ 'QAnswer-Api-Key',
958
+ 'Bearer token'
959
+ ]
960
+
961
+ return self.api_client.param_serialize(
962
+ method='DELETE',
963
+ resource_path='/api/tasks/ai-excel/templates/{conversation_id}',
964
+ path_params=_path_params,
965
+ query_params=_query_params,
966
+ header_params=_header_params,
967
+ body=_body_params,
968
+ post_params=_form_params,
969
+ files=_files,
970
+ auth_settings=_auth_settings,
971
+ collection_formats=_collection_formats,
972
+ _host=_host,
973
+ _request_auth=_request_auth
974
+ )
975
+
976
+
977
+
978
+
979
+ @validate_call
980
+ def duplicate_ai_excel_template(
981
+ self,
982
+ duplicate_ai_excel_template_request: DuplicateAIExcelTemplateRequest,
983
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
984
+ _request_timeout: Union[
985
+ None,
986
+ Annotated[StrictFloat, Field(gt=0)],
987
+ Tuple[
988
+ Annotated[StrictFloat, Field(gt=0)],
989
+ Annotated[StrictFloat, Field(gt=0)]
990
+ ]
991
+ ] = None,
992
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
993
+ _content_type: Optional[StrictStr] = None,
994
+ _headers: Optional[Dict[StrictStr, Any]] = None,
995
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
996
+ ) -> DuplicateAIExcelTemplateResponse:
997
+ """Duplicate Ai Excel Template
998
+
999
+
1000
+ :param duplicate_ai_excel_template_request: (required)
1001
+ :type duplicate_ai_excel_template_request: DuplicateAIExcelTemplateRequest
1002
+ :param q_answer_api_key: Optional QAnswer API key
1003
+ :type q_answer_api_key: str
1004
+ :param _request_timeout: timeout setting for this request. If one
1005
+ number provided, it will be total request
1006
+ timeout. It can also be a pair (tuple) of
1007
+ (connection, read) timeouts.
1008
+ :type _request_timeout: int, tuple(int, int), optional
1009
+ :param _request_auth: set to override the auth_settings for an a single
1010
+ request; this effectively ignores the
1011
+ authentication in the spec for a single request.
1012
+ :type _request_auth: dict, optional
1013
+ :param _content_type: force content-type for the request.
1014
+ :type _content_type: str, Optional
1015
+ :param _headers: set to override the headers for a single
1016
+ request; this effectively ignores the headers
1017
+ in the spec for a single request.
1018
+ :type _headers: dict, optional
1019
+ :param _host_index: set to override the host_index for a single
1020
+ request; this effectively ignores the host_index
1021
+ in the spec for a single request.
1022
+ :type _host_index: int, optional
1023
+ :return: Returns the result object.
1024
+ """ # noqa: E501
1025
+
1026
+ _param = self._duplicate_ai_excel_template_serialize(
1027
+ duplicate_ai_excel_template_request=duplicate_ai_excel_template_request,
1028
+ q_answer_api_key=q_answer_api_key,
1029
+ _request_auth=_request_auth,
1030
+ _content_type=_content_type,
1031
+ _headers=_headers,
1032
+ _host_index=_host_index
1033
+ )
1034
+
1035
+ _response_types_map: Dict[str, Optional[str]] = {
1036
+ '200': "DuplicateAIExcelTemplateResponse",
1037
+ '422': "HTTPValidationError",
1038
+ }
1039
+ response_data = self.api_client.call_api(
1040
+ *_param,
1041
+ _request_timeout=_request_timeout
1042
+ )
1043
+ response_data.read()
1044
+ return self.api_client.response_deserialize(
1045
+ response_data=response_data,
1046
+ response_types_map=_response_types_map,
1047
+ ).data
1048
+
1049
+
1050
+ @validate_call
1051
+ def duplicate_ai_excel_template_with_http_info(
1052
+ self,
1053
+ duplicate_ai_excel_template_request: DuplicateAIExcelTemplateRequest,
1054
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1055
+ _request_timeout: Union[
1056
+ None,
1057
+ Annotated[StrictFloat, Field(gt=0)],
1058
+ Tuple[
1059
+ Annotated[StrictFloat, Field(gt=0)],
1060
+ Annotated[StrictFloat, Field(gt=0)]
1061
+ ]
1062
+ ] = None,
1063
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1064
+ _content_type: Optional[StrictStr] = None,
1065
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1066
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1067
+ ) -> ApiResponse[DuplicateAIExcelTemplateResponse]:
1068
+ """Duplicate Ai Excel Template
1069
+
1070
+
1071
+ :param duplicate_ai_excel_template_request: (required)
1072
+ :type duplicate_ai_excel_template_request: DuplicateAIExcelTemplateRequest
1073
+ :param q_answer_api_key: Optional QAnswer API key
1074
+ :type q_answer_api_key: str
1075
+ :param _request_timeout: timeout setting for this request. If one
1076
+ number provided, it will be total request
1077
+ timeout. It can also be a pair (tuple) of
1078
+ (connection, read) timeouts.
1079
+ :type _request_timeout: int, tuple(int, int), optional
1080
+ :param _request_auth: set to override the auth_settings for an a single
1081
+ request; this effectively ignores the
1082
+ authentication in the spec for a single request.
1083
+ :type _request_auth: dict, optional
1084
+ :param _content_type: force content-type for the request.
1085
+ :type _content_type: str, Optional
1086
+ :param _headers: set to override the headers for a single
1087
+ request; this effectively ignores the headers
1088
+ in the spec for a single request.
1089
+ :type _headers: dict, optional
1090
+ :param _host_index: set to override the host_index for a single
1091
+ request; this effectively ignores the host_index
1092
+ in the spec for a single request.
1093
+ :type _host_index: int, optional
1094
+ :return: Returns the result object.
1095
+ """ # noqa: E501
1096
+
1097
+ _param = self._duplicate_ai_excel_template_serialize(
1098
+ duplicate_ai_excel_template_request=duplicate_ai_excel_template_request,
1099
+ q_answer_api_key=q_answer_api_key,
1100
+ _request_auth=_request_auth,
1101
+ _content_type=_content_type,
1102
+ _headers=_headers,
1103
+ _host_index=_host_index
1104
+ )
1105
+
1106
+ _response_types_map: Dict[str, Optional[str]] = {
1107
+ '200': "DuplicateAIExcelTemplateResponse",
1108
+ '422': "HTTPValidationError",
1109
+ }
1110
+ response_data = self.api_client.call_api(
1111
+ *_param,
1112
+ _request_timeout=_request_timeout
1113
+ )
1114
+ response_data.read()
1115
+ return self.api_client.response_deserialize(
1116
+ response_data=response_data,
1117
+ response_types_map=_response_types_map,
1118
+ )
1119
+
1120
+
1121
+ @validate_call
1122
+ def duplicate_ai_excel_template_without_preload_content(
1123
+ self,
1124
+ duplicate_ai_excel_template_request: DuplicateAIExcelTemplateRequest,
1125
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1126
+ _request_timeout: Union[
1127
+ None,
1128
+ Annotated[StrictFloat, Field(gt=0)],
1129
+ Tuple[
1130
+ Annotated[StrictFloat, Field(gt=0)],
1131
+ Annotated[StrictFloat, Field(gt=0)]
1132
+ ]
1133
+ ] = None,
1134
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1135
+ _content_type: Optional[StrictStr] = None,
1136
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1137
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1138
+ ) -> RESTResponseType:
1139
+ """Duplicate Ai Excel Template
1140
+
1141
+
1142
+ :param duplicate_ai_excel_template_request: (required)
1143
+ :type duplicate_ai_excel_template_request: DuplicateAIExcelTemplateRequest
1144
+ :param q_answer_api_key: Optional QAnswer API key
1145
+ :type q_answer_api_key: str
1146
+ :param _request_timeout: timeout setting for this request. If one
1147
+ number provided, it will be total request
1148
+ timeout. It can also be a pair (tuple) of
1149
+ (connection, read) timeouts.
1150
+ :type _request_timeout: int, tuple(int, int), optional
1151
+ :param _request_auth: set to override the auth_settings for an a single
1152
+ request; this effectively ignores the
1153
+ authentication in the spec for a single request.
1154
+ :type _request_auth: dict, optional
1155
+ :param _content_type: force content-type for the request.
1156
+ :type _content_type: str, Optional
1157
+ :param _headers: set to override the headers for a single
1158
+ request; this effectively ignores the headers
1159
+ in the spec for a single request.
1160
+ :type _headers: dict, optional
1161
+ :param _host_index: set to override the host_index for a single
1162
+ request; this effectively ignores the host_index
1163
+ in the spec for a single request.
1164
+ :type _host_index: int, optional
1165
+ :return: Returns the result object.
1166
+ """ # noqa: E501
1167
+
1168
+ _param = self._duplicate_ai_excel_template_serialize(
1169
+ duplicate_ai_excel_template_request=duplicate_ai_excel_template_request,
1170
+ q_answer_api_key=q_answer_api_key,
1171
+ _request_auth=_request_auth,
1172
+ _content_type=_content_type,
1173
+ _headers=_headers,
1174
+ _host_index=_host_index
1175
+ )
1176
+
1177
+ _response_types_map: Dict[str, Optional[str]] = {
1178
+ '200': "DuplicateAIExcelTemplateResponse",
1179
+ '422': "HTTPValidationError",
1180
+ }
1181
+ response_data = self.api_client.call_api(
1182
+ *_param,
1183
+ _request_timeout=_request_timeout
1184
+ )
1185
+ return response_data.response
1186
+
1187
+
1188
+ def _duplicate_ai_excel_template_serialize(
1189
+ self,
1190
+ duplicate_ai_excel_template_request,
1191
+ q_answer_api_key,
1192
+ _request_auth,
1193
+ _content_type,
1194
+ _headers,
1195
+ _host_index,
1196
+ ) -> RequestSerialized:
1197
+
1198
+ _host = None
1199
+
1200
+ _collection_formats: Dict[str, str] = {
1201
+ }
1202
+
1203
+ _path_params: Dict[str, str] = {}
1204
+ _query_params: List[Tuple[str, str]] = []
1205
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1206
+ _form_params: List[Tuple[str, str]] = []
1207
+ _files: Dict[
1208
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1209
+ ] = {}
1210
+ _body_params: Optional[bytes] = None
1211
+
1212
+ # process the path parameters
1213
+ # process the query parameters
1214
+ # process the header parameters
1215
+ if q_answer_api_key is not None:
1216
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1217
+ # process the form parameters
1218
+ # process the body parameter
1219
+ if duplicate_ai_excel_template_request is not None:
1220
+ _body_params = duplicate_ai_excel_template_request
1221
+
1222
+
1223
+ # set the HTTP header `Accept`
1224
+ if 'Accept' not in _header_params:
1225
+ _header_params['Accept'] = self.api_client.select_header_accept(
1226
+ [
1227
+ 'application/json'
1228
+ ]
1229
+ )
1230
+
1231
+ # set the HTTP header `Content-Type`
1232
+ if _content_type:
1233
+ _header_params['Content-Type'] = _content_type
1234
+ else:
1235
+ _default_content_type = (
1236
+ self.api_client.select_header_content_type(
1237
+ [
1238
+ 'application/json'
1239
+ ]
1240
+ )
1241
+ )
1242
+ if _default_content_type is not None:
1243
+ _header_params['Content-Type'] = _default_content_type
1244
+
1245
+ # authentication setting
1246
+ _auth_settings: List[str] = [
1247
+ 'QAnswer-Api-Key',
1248
+ 'Bearer token'
1249
+ ]
1250
+
1251
+ return self.api_client.param_serialize(
1252
+ method='POST',
1253
+ resource_path='/api/tasks/ai-excel/template/duplicate',
1254
+ path_params=_path_params,
1255
+ query_params=_query_params,
1256
+ header_params=_header_params,
1257
+ body=_body_params,
1258
+ post_params=_form_params,
1259
+ files=_files,
1260
+ auth_settings=_auth_settings,
1261
+ collection_formats=_collection_formats,
1262
+ _host=_host,
1263
+ _request_auth=_request_auth
1264
+ )
1265
+
1266
+
1267
+
1268
+
1269
+ @validate_call
1270
+ def get_ai_excel_task_settings(
1271
+ self,
1272
+ username: StrictStr,
1273
+ dataset: StrictStr,
1274
+ conversation_id: Optional[StrictStr] = None,
1275
+ organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
1276
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1277
+ _request_timeout: Union[
1278
+ None,
1279
+ Annotated[StrictFloat, Field(gt=0)],
1280
+ Tuple[
1281
+ Annotated[StrictFloat, Field(gt=0)],
1282
+ Annotated[StrictFloat, Field(gt=0)]
1283
+ ]
1284
+ ] = None,
1285
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1286
+ _content_type: Optional[StrictStr] = None,
1287
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1288
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1289
+ ) -> AIExcelGlobalSettings:
1290
+ """Get Ai Excel Task Settings
1291
+
1292
+
1293
+ :param username: (required)
1294
+ :type username: str
1295
+ :param dataset: (required)
1296
+ :type dataset: str
1297
+ :param conversation_id:
1298
+ :type conversation_id: str
1299
+ :param organization_id: organization identifier
1300
+ :type organization_id: int
1301
+ :param q_answer_api_key: Optional QAnswer API key
1302
+ :type q_answer_api_key: str
1303
+ :param _request_timeout: timeout setting for this request. If one
1304
+ number provided, it will be total request
1305
+ timeout. It can also be a pair (tuple) of
1306
+ (connection, read) timeouts.
1307
+ :type _request_timeout: int, tuple(int, int), optional
1308
+ :param _request_auth: set to override the auth_settings for an a single
1309
+ request; this effectively ignores the
1310
+ authentication in the spec for a single request.
1311
+ :type _request_auth: dict, optional
1312
+ :param _content_type: force content-type for the request.
1313
+ :type _content_type: str, Optional
1314
+ :param _headers: set to override the headers for a single
1315
+ request; this effectively ignores the headers
1316
+ in the spec for a single request.
1317
+ :type _headers: dict, optional
1318
+ :param _host_index: set to override the host_index for a single
1319
+ request; this effectively ignores the host_index
1320
+ in the spec for a single request.
1321
+ :type _host_index: int, optional
1322
+ :return: Returns the result object.
1323
+ """ # noqa: E501
1324
+
1325
+ _param = self._get_ai_excel_task_settings_serialize(
1326
+ username=username,
1327
+ dataset=dataset,
1328
+ conversation_id=conversation_id,
1329
+ organization_id=organization_id,
1330
+ q_answer_api_key=q_answer_api_key,
1331
+ _request_auth=_request_auth,
1332
+ _content_type=_content_type,
1333
+ _headers=_headers,
1334
+ _host_index=_host_index
1335
+ )
1336
+
1337
+ _response_types_map: Dict[str, Optional[str]] = {
1338
+ '200': "AIExcelGlobalSettings",
1339
+ '422': "HTTPValidationError",
1340
+ }
1341
+ response_data = self.api_client.call_api(
1342
+ *_param,
1343
+ _request_timeout=_request_timeout
1344
+ )
1345
+ response_data.read()
1346
+ return self.api_client.response_deserialize(
1347
+ response_data=response_data,
1348
+ response_types_map=_response_types_map,
1349
+ ).data
1350
+
1351
+
1352
+ @validate_call
1353
+ def get_ai_excel_task_settings_with_http_info(
1354
+ self,
1355
+ username: StrictStr,
1356
+ dataset: StrictStr,
1357
+ conversation_id: Optional[StrictStr] = None,
1358
+ organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
1359
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1360
+ _request_timeout: Union[
1361
+ None,
1362
+ Annotated[StrictFloat, Field(gt=0)],
1363
+ Tuple[
1364
+ Annotated[StrictFloat, Field(gt=0)],
1365
+ Annotated[StrictFloat, Field(gt=0)]
1366
+ ]
1367
+ ] = None,
1368
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1369
+ _content_type: Optional[StrictStr] = None,
1370
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1371
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1372
+ ) -> ApiResponse[AIExcelGlobalSettings]:
1373
+ """Get Ai Excel Task Settings
1374
+
1375
+
1376
+ :param username: (required)
1377
+ :type username: str
1378
+ :param dataset: (required)
1379
+ :type dataset: str
1380
+ :param conversation_id:
1381
+ :type conversation_id: str
1382
+ :param organization_id: organization identifier
1383
+ :type organization_id: int
1384
+ :param q_answer_api_key: Optional QAnswer API key
1385
+ :type q_answer_api_key: str
1386
+ :param _request_timeout: timeout setting for this request. If one
1387
+ number provided, it will be total request
1388
+ timeout. It can also be a pair (tuple) of
1389
+ (connection, read) timeouts.
1390
+ :type _request_timeout: int, tuple(int, int), optional
1391
+ :param _request_auth: set to override the auth_settings for an a single
1392
+ request; this effectively ignores the
1393
+ authentication in the spec for a single request.
1394
+ :type _request_auth: dict, optional
1395
+ :param _content_type: force content-type for the request.
1396
+ :type _content_type: str, Optional
1397
+ :param _headers: set to override the headers for a single
1398
+ request; this effectively ignores the headers
1399
+ in the spec for a single request.
1400
+ :type _headers: dict, optional
1401
+ :param _host_index: set to override the host_index for a single
1402
+ request; this effectively ignores the host_index
1403
+ in the spec for a single request.
1404
+ :type _host_index: int, optional
1405
+ :return: Returns the result object.
1406
+ """ # noqa: E501
1407
+
1408
+ _param = self._get_ai_excel_task_settings_serialize(
1409
+ username=username,
1410
+ dataset=dataset,
1411
+ conversation_id=conversation_id,
1412
+ organization_id=organization_id,
1413
+ q_answer_api_key=q_answer_api_key,
1414
+ _request_auth=_request_auth,
1415
+ _content_type=_content_type,
1416
+ _headers=_headers,
1417
+ _host_index=_host_index
1418
+ )
1419
+
1420
+ _response_types_map: Dict[str, Optional[str]] = {
1421
+ '200': "AIExcelGlobalSettings",
1422
+ '422': "HTTPValidationError",
1423
+ }
1424
+ response_data = self.api_client.call_api(
1425
+ *_param,
1426
+ _request_timeout=_request_timeout
1427
+ )
1428
+ response_data.read()
1429
+ return self.api_client.response_deserialize(
1430
+ response_data=response_data,
1431
+ response_types_map=_response_types_map,
1432
+ )
1433
+
1434
+
1435
+ @validate_call
1436
+ def get_ai_excel_task_settings_without_preload_content(
1437
+ self,
1438
+ username: StrictStr,
1439
+ dataset: StrictStr,
1440
+ conversation_id: Optional[StrictStr] = None,
1441
+ organization_id: Annotated[Optional[StrictInt], Field(description="organization identifier")] = None,
1442
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1443
+ _request_timeout: Union[
1444
+ None,
1445
+ Annotated[StrictFloat, Field(gt=0)],
1446
+ Tuple[
1447
+ Annotated[StrictFloat, Field(gt=0)],
1448
+ Annotated[StrictFloat, Field(gt=0)]
1449
+ ]
1450
+ ] = None,
1451
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1452
+ _content_type: Optional[StrictStr] = None,
1453
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1454
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1455
+ ) -> RESTResponseType:
1456
+ """Get Ai Excel Task Settings
1457
+
1458
+
1459
+ :param username: (required)
1460
+ :type username: str
1461
+ :param dataset: (required)
1462
+ :type dataset: str
1463
+ :param conversation_id:
1464
+ :type conversation_id: str
1465
+ :param organization_id: organization identifier
1466
+ :type organization_id: int
1467
+ :param q_answer_api_key: Optional QAnswer API key
1468
+ :type q_answer_api_key: str
1469
+ :param _request_timeout: timeout setting for this request. If one
1470
+ number provided, it will be total request
1471
+ timeout. It can also be a pair (tuple) of
1472
+ (connection, read) timeouts.
1473
+ :type _request_timeout: int, tuple(int, int), optional
1474
+ :param _request_auth: set to override the auth_settings for an a single
1475
+ request; this effectively ignores the
1476
+ authentication in the spec for a single request.
1477
+ :type _request_auth: dict, optional
1478
+ :param _content_type: force content-type for the request.
1479
+ :type _content_type: str, Optional
1480
+ :param _headers: set to override the headers for a single
1481
+ request; this effectively ignores the headers
1482
+ in the spec for a single request.
1483
+ :type _headers: dict, optional
1484
+ :param _host_index: set to override the host_index for a single
1485
+ request; this effectively ignores the host_index
1486
+ in the spec for a single request.
1487
+ :type _host_index: int, optional
1488
+ :return: Returns the result object.
1489
+ """ # noqa: E501
1490
+
1491
+ _param = self._get_ai_excel_task_settings_serialize(
1492
+ username=username,
1493
+ dataset=dataset,
1494
+ conversation_id=conversation_id,
1495
+ organization_id=organization_id,
1496
+ q_answer_api_key=q_answer_api_key,
1497
+ _request_auth=_request_auth,
1498
+ _content_type=_content_type,
1499
+ _headers=_headers,
1500
+ _host_index=_host_index
1501
+ )
1502
+
1503
+ _response_types_map: Dict[str, Optional[str]] = {
1504
+ '200': "AIExcelGlobalSettings",
1505
+ '422': "HTTPValidationError",
1506
+ }
1507
+ response_data = self.api_client.call_api(
1508
+ *_param,
1509
+ _request_timeout=_request_timeout
1510
+ )
1511
+ return response_data.response
1512
+
1513
+
1514
+ def _get_ai_excel_task_settings_serialize(
1515
+ self,
1516
+ username,
1517
+ dataset,
1518
+ conversation_id,
1519
+ organization_id,
1520
+ q_answer_api_key,
1521
+ _request_auth,
1522
+ _content_type,
1523
+ _headers,
1524
+ _host_index,
1525
+ ) -> RequestSerialized:
1526
+
1527
+ _host = None
1528
+
1529
+ _collection_formats: Dict[str, str] = {
1530
+ }
1531
+
1532
+ _path_params: Dict[str, str] = {}
1533
+ _query_params: List[Tuple[str, str]] = []
1534
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1535
+ _form_params: List[Tuple[str, str]] = []
1536
+ _files: Dict[
1537
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1538
+ ] = {}
1539
+ _body_params: Optional[bytes] = None
1540
+
1541
+ # process the path parameters
1542
+ # process the query parameters
1543
+ if username is not None:
1544
+
1545
+ _query_params.append(('username', username))
1546
+
1547
+ if dataset is not None:
1548
+
1549
+ _query_params.append(('dataset', dataset))
1550
+
1551
+ if conversation_id is not None:
1552
+
1553
+ _query_params.append(('conversationId', conversation_id))
1554
+
1555
+ if organization_id is not None:
1556
+
1557
+ _query_params.append(('organization_id', organization_id))
1558
+
1559
+ # process the header parameters
1560
+ if q_answer_api_key is not None:
1561
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1562
+ # process the form parameters
1563
+ # process the body parameter
1564
+
1565
+
1566
+ # set the HTTP header `Accept`
1567
+ if 'Accept' not in _header_params:
1568
+ _header_params['Accept'] = self.api_client.select_header_accept(
1569
+ [
1570
+ 'application/json'
1571
+ ]
1572
+ )
1573
+
1574
+
1575
+ # authentication setting
1576
+ _auth_settings: List[str] = [
1577
+ 'QAnswer-Api-Key',
1578
+ 'Bearer token'
1579
+ ]
1580
+
1581
+ return self.api_client.param_serialize(
1582
+ method='GET',
1583
+ resource_path='/api/tasks/ai-excel/settings',
1584
+ path_params=_path_params,
1585
+ query_params=_query_params,
1586
+ header_params=_header_params,
1587
+ body=_body_params,
1588
+ post_params=_form_params,
1589
+ files=_files,
1590
+ auth_settings=_auth_settings,
1591
+ collection_formats=_collection_formats,
1592
+ _host=_host,
1593
+ _request_auth=_request_auth
1594
+ )
1595
+
1596
+
1597
+
1598
+
1599
+ @validate_call
1600
+ def get_ai_excel_template(
1601
+ self,
1602
+ conversation_id: StrictStr,
1603
+ username: StrictStr,
1604
+ dataset: StrictStr,
1605
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1606
+ _request_timeout: Union[
1607
+ None,
1608
+ Annotated[StrictFloat, Field(gt=0)],
1609
+ Tuple[
1610
+ Annotated[StrictFloat, Field(gt=0)],
1611
+ Annotated[StrictFloat, Field(gt=0)]
1612
+ ]
1613
+ ] = None,
1614
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1615
+ _content_type: Optional[StrictStr] = None,
1616
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1617
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1618
+ ) -> AIExcelTemplateRead:
1619
+ """Get Ai Excel Template
1620
+
1621
+
1622
+ :param conversation_id: (required)
1623
+ :type conversation_id: str
1624
+ :param username: (required)
1625
+ :type username: str
1626
+ :param dataset: (required)
1627
+ :type dataset: str
1628
+ :param q_answer_api_key: Optional QAnswer API key
1629
+ :type q_answer_api_key: str
1630
+ :param _request_timeout: timeout setting for this request. If one
1631
+ number provided, it will be total request
1632
+ timeout. It can also be a pair (tuple) of
1633
+ (connection, read) timeouts.
1634
+ :type _request_timeout: int, tuple(int, int), optional
1635
+ :param _request_auth: set to override the auth_settings for an a single
1636
+ request; this effectively ignores the
1637
+ authentication in the spec for a single request.
1638
+ :type _request_auth: dict, optional
1639
+ :param _content_type: force content-type for the request.
1640
+ :type _content_type: str, Optional
1641
+ :param _headers: set to override the headers for a single
1642
+ request; this effectively ignores the headers
1643
+ in the spec for a single request.
1644
+ :type _headers: dict, optional
1645
+ :param _host_index: set to override the host_index for a single
1646
+ request; this effectively ignores the host_index
1647
+ in the spec for a single request.
1648
+ :type _host_index: int, optional
1649
+ :return: Returns the result object.
1650
+ """ # noqa: E501
1651
+
1652
+ _param = self._get_ai_excel_template_serialize(
1653
+ conversation_id=conversation_id,
1654
+ username=username,
1655
+ dataset=dataset,
1656
+ q_answer_api_key=q_answer_api_key,
1657
+ _request_auth=_request_auth,
1658
+ _content_type=_content_type,
1659
+ _headers=_headers,
1660
+ _host_index=_host_index
1661
+ )
1662
+
1663
+ _response_types_map: Dict[str, Optional[str]] = {
1664
+ '200': "AIExcelTemplateRead",
1665
+ '422': "HTTPValidationError",
1666
+ }
1667
+ response_data = self.api_client.call_api(
1668
+ *_param,
1669
+ _request_timeout=_request_timeout
1670
+ )
1671
+ response_data.read()
1672
+ return self.api_client.response_deserialize(
1673
+ response_data=response_data,
1674
+ response_types_map=_response_types_map,
1675
+ ).data
1676
+
1677
+
1678
+ @validate_call
1679
+ def get_ai_excel_template_with_http_info(
1680
+ self,
1681
+ conversation_id: StrictStr,
1682
+ username: StrictStr,
1683
+ dataset: StrictStr,
1684
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1685
+ _request_timeout: Union[
1686
+ None,
1687
+ Annotated[StrictFloat, Field(gt=0)],
1688
+ Tuple[
1689
+ Annotated[StrictFloat, Field(gt=0)],
1690
+ Annotated[StrictFloat, Field(gt=0)]
1691
+ ]
1692
+ ] = None,
1693
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1694
+ _content_type: Optional[StrictStr] = None,
1695
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1696
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1697
+ ) -> ApiResponse[AIExcelTemplateRead]:
1698
+ """Get Ai Excel Template
1699
+
1700
+
1701
+ :param conversation_id: (required)
1702
+ :type conversation_id: str
1703
+ :param username: (required)
1704
+ :type username: str
1705
+ :param dataset: (required)
1706
+ :type dataset: str
1707
+ :param q_answer_api_key: Optional QAnswer API key
1708
+ :type q_answer_api_key: str
1709
+ :param _request_timeout: timeout setting for this request. If one
1710
+ number provided, it will be total request
1711
+ timeout. It can also be a pair (tuple) of
1712
+ (connection, read) timeouts.
1713
+ :type _request_timeout: int, tuple(int, int), optional
1714
+ :param _request_auth: set to override the auth_settings for an a single
1715
+ request; this effectively ignores the
1716
+ authentication in the spec for a single request.
1717
+ :type _request_auth: dict, optional
1718
+ :param _content_type: force content-type for the request.
1719
+ :type _content_type: str, Optional
1720
+ :param _headers: set to override the headers for a single
1721
+ request; this effectively ignores the headers
1722
+ in the spec for a single request.
1723
+ :type _headers: dict, optional
1724
+ :param _host_index: set to override the host_index for a single
1725
+ request; this effectively ignores the host_index
1726
+ in the spec for a single request.
1727
+ :type _host_index: int, optional
1728
+ :return: Returns the result object.
1729
+ """ # noqa: E501
1730
+
1731
+ _param = self._get_ai_excel_template_serialize(
1732
+ conversation_id=conversation_id,
1733
+ username=username,
1734
+ dataset=dataset,
1735
+ q_answer_api_key=q_answer_api_key,
1736
+ _request_auth=_request_auth,
1737
+ _content_type=_content_type,
1738
+ _headers=_headers,
1739
+ _host_index=_host_index
1740
+ )
1741
+
1742
+ _response_types_map: Dict[str, Optional[str]] = {
1743
+ '200': "AIExcelTemplateRead",
1744
+ '422': "HTTPValidationError",
1745
+ }
1746
+ response_data = self.api_client.call_api(
1747
+ *_param,
1748
+ _request_timeout=_request_timeout
1749
+ )
1750
+ response_data.read()
1751
+ return self.api_client.response_deserialize(
1752
+ response_data=response_data,
1753
+ response_types_map=_response_types_map,
1754
+ )
1755
+
1756
+
1757
+ @validate_call
1758
+ def get_ai_excel_template_without_preload_content(
1759
+ self,
1760
+ conversation_id: StrictStr,
1761
+ username: StrictStr,
1762
+ dataset: StrictStr,
1763
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1764
+ _request_timeout: Union[
1765
+ None,
1766
+ Annotated[StrictFloat, Field(gt=0)],
1767
+ Tuple[
1768
+ Annotated[StrictFloat, Field(gt=0)],
1769
+ Annotated[StrictFloat, Field(gt=0)]
1770
+ ]
1771
+ ] = None,
1772
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1773
+ _content_type: Optional[StrictStr] = None,
1774
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1775
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1776
+ ) -> RESTResponseType:
1777
+ """Get Ai Excel Template
1778
+
1779
+
1780
+ :param conversation_id: (required)
1781
+ :type conversation_id: str
1782
+ :param username: (required)
1783
+ :type username: str
1784
+ :param dataset: (required)
1785
+ :type dataset: str
1786
+ :param q_answer_api_key: Optional QAnswer API key
1787
+ :type q_answer_api_key: str
1788
+ :param _request_timeout: timeout setting for this request. If one
1789
+ number provided, it will be total request
1790
+ timeout. It can also be a pair (tuple) of
1791
+ (connection, read) timeouts.
1792
+ :type _request_timeout: int, tuple(int, int), optional
1793
+ :param _request_auth: set to override the auth_settings for an a single
1794
+ request; this effectively ignores the
1795
+ authentication in the spec for a single request.
1796
+ :type _request_auth: dict, optional
1797
+ :param _content_type: force content-type for the request.
1798
+ :type _content_type: str, Optional
1799
+ :param _headers: set to override the headers for a single
1800
+ request; this effectively ignores the headers
1801
+ in the spec for a single request.
1802
+ :type _headers: dict, optional
1803
+ :param _host_index: set to override the host_index for a single
1804
+ request; this effectively ignores the host_index
1805
+ in the spec for a single request.
1806
+ :type _host_index: int, optional
1807
+ :return: Returns the result object.
1808
+ """ # noqa: E501
1809
+
1810
+ _param = self._get_ai_excel_template_serialize(
1811
+ conversation_id=conversation_id,
1812
+ username=username,
1813
+ dataset=dataset,
1814
+ q_answer_api_key=q_answer_api_key,
1815
+ _request_auth=_request_auth,
1816
+ _content_type=_content_type,
1817
+ _headers=_headers,
1818
+ _host_index=_host_index
1819
+ )
1820
+
1821
+ _response_types_map: Dict[str, Optional[str]] = {
1822
+ '200': "AIExcelTemplateRead",
1823
+ '422': "HTTPValidationError",
1824
+ }
1825
+ response_data = self.api_client.call_api(
1826
+ *_param,
1827
+ _request_timeout=_request_timeout
1828
+ )
1829
+ return response_data.response
1830
+
1831
+
1832
+ def _get_ai_excel_template_serialize(
1833
+ self,
1834
+ conversation_id,
1835
+ username,
1836
+ dataset,
1837
+ q_answer_api_key,
1838
+ _request_auth,
1839
+ _content_type,
1840
+ _headers,
1841
+ _host_index,
1842
+ ) -> RequestSerialized:
1843
+
1844
+ _host = None
1845
+
1846
+ _collection_formats: Dict[str, str] = {
1847
+ }
1848
+
1849
+ _path_params: Dict[str, str] = {}
1850
+ _query_params: List[Tuple[str, str]] = []
1851
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1852
+ _form_params: List[Tuple[str, str]] = []
1853
+ _files: Dict[
1854
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1855
+ ] = {}
1856
+ _body_params: Optional[bytes] = None
1857
+
1858
+ # process the path parameters
1859
+ if conversation_id is not None:
1860
+ _path_params['conversation_id'] = conversation_id
1861
+ # process the query parameters
1862
+ if username is not None:
1863
+
1864
+ _query_params.append(('username', username))
1865
+
1866
+ if dataset is not None:
1867
+
1868
+ _query_params.append(('dataset', dataset))
1869
+
1870
+ # process the header parameters
1871
+ if q_answer_api_key is not None:
1872
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1873
+ # process the form parameters
1874
+ # process the body parameter
1875
+
1876
+
1877
+ # set the HTTP header `Accept`
1878
+ if 'Accept' not in _header_params:
1879
+ _header_params['Accept'] = self.api_client.select_header_accept(
1880
+ [
1881
+ 'application/json'
1882
+ ]
1883
+ )
1884
+
1885
+
1886
+ # authentication setting
1887
+ _auth_settings: List[str] = [
1888
+ 'QAnswer-Api-Key',
1889
+ 'Bearer token'
1890
+ ]
1891
+
1892
+ return self.api_client.param_serialize(
1893
+ method='GET',
1894
+ resource_path='/api/tasks/ai-excel/templates/{conversation_id}',
1895
+ path_params=_path_params,
1896
+ query_params=_query_params,
1897
+ header_params=_header_params,
1898
+ body=_body_params,
1899
+ post_params=_form_params,
1900
+ files=_files,
1901
+ auth_settings=_auth_settings,
1902
+ collection_formats=_collection_formats,
1903
+ _host=_host,
1904
+ _request_auth=_request_auth
1905
+ )
1906
+
1907
+
1908
+
1909
+
1910
+ @validate_call
1911
+ def get_ai_excel_template_settings(
1912
+ self,
1913
+ conversation_id: StrictStr,
1914
+ username: StrictStr,
1915
+ dataset: StrictStr,
1916
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1917
+ _request_timeout: Union[
1918
+ None,
1919
+ Annotated[StrictFloat, Field(gt=0)],
1920
+ Tuple[
1921
+ Annotated[StrictFloat, Field(gt=0)],
1922
+ Annotated[StrictFloat, Field(gt=0)]
1923
+ ]
1924
+ ] = None,
1925
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1926
+ _content_type: Optional[StrictStr] = None,
1927
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1928
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1929
+ ) -> AIExcelTaskSettings:
1930
+ """Get Ai Excel Template Settings
1931
+
1932
+
1933
+ :param conversation_id: (required)
1934
+ :type conversation_id: str
1935
+ :param username: (required)
1936
+ :type username: str
1937
+ :param dataset: (required)
1938
+ :type dataset: str
1939
+ :param q_answer_api_key: Optional QAnswer API key
1940
+ :type q_answer_api_key: str
1941
+ :param _request_timeout: timeout setting for this request. If one
1942
+ number provided, it will be total request
1943
+ timeout. It can also be a pair (tuple) of
1944
+ (connection, read) timeouts.
1945
+ :type _request_timeout: int, tuple(int, int), optional
1946
+ :param _request_auth: set to override the auth_settings for an a single
1947
+ request; this effectively ignores the
1948
+ authentication in the spec for a single request.
1949
+ :type _request_auth: dict, optional
1950
+ :param _content_type: force content-type for the request.
1951
+ :type _content_type: str, Optional
1952
+ :param _headers: set to override the headers for a single
1953
+ request; this effectively ignores the headers
1954
+ in the spec for a single request.
1955
+ :type _headers: dict, optional
1956
+ :param _host_index: set to override the host_index for a single
1957
+ request; this effectively ignores the host_index
1958
+ in the spec for a single request.
1959
+ :type _host_index: int, optional
1960
+ :return: Returns the result object.
1961
+ """ # noqa: E501
1962
+
1963
+ _param = self._get_ai_excel_template_settings_serialize(
1964
+ conversation_id=conversation_id,
1965
+ username=username,
1966
+ dataset=dataset,
1967
+ q_answer_api_key=q_answer_api_key,
1968
+ _request_auth=_request_auth,
1969
+ _content_type=_content_type,
1970
+ _headers=_headers,
1971
+ _host_index=_host_index
1972
+ )
1973
+
1974
+ _response_types_map: Dict[str, Optional[str]] = {
1975
+ '200': "AIExcelTaskSettings",
1976
+ '422': "HTTPValidationError",
1977
+ }
1978
+ response_data = self.api_client.call_api(
1979
+ *_param,
1980
+ _request_timeout=_request_timeout
1981
+ )
1982
+ response_data.read()
1983
+ return self.api_client.response_deserialize(
1984
+ response_data=response_data,
1985
+ response_types_map=_response_types_map,
1986
+ ).data
1987
+
1988
+
1989
+ @validate_call
1990
+ def get_ai_excel_template_settings_with_http_info(
1991
+ self,
1992
+ conversation_id: StrictStr,
1993
+ username: StrictStr,
1994
+ dataset: StrictStr,
1995
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
1996
+ _request_timeout: Union[
1997
+ None,
1998
+ Annotated[StrictFloat, Field(gt=0)],
1999
+ Tuple[
2000
+ Annotated[StrictFloat, Field(gt=0)],
2001
+ Annotated[StrictFloat, Field(gt=0)]
2002
+ ]
2003
+ ] = None,
2004
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2005
+ _content_type: Optional[StrictStr] = None,
2006
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2007
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2008
+ ) -> ApiResponse[AIExcelTaskSettings]:
2009
+ """Get Ai Excel Template Settings
2010
+
2011
+
2012
+ :param conversation_id: (required)
2013
+ :type conversation_id: str
2014
+ :param username: (required)
2015
+ :type username: str
2016
+ :param dataset: (required)
2017
+ :type dataset: str
2018
+ :param q_answer_api_key: Optional QAnswer API key
2019
+ :type q_answer_api_key: str
2020
+ :param _request_timeout: timeout setting for this request. If one
2021
+ number provided, it will be total request
2022
+ timeout. It can also be a pair (tuple) of
2023
+ (connection, read) timeouts.
2024
+ :type _request_timeout: int, tuple(int, int), optional
2025
+ :param _request_auth: set to override the auth_settings for an a single
2026
+ request; this effectively ignores the
2027
+ authentication in the spec for a single request.
2028
+ :type _request_auth: dict, optional
2029
+ :param _content_type: force content-type for the request.
2030
+ :type _content_type: str, Optional
2031
+ :param _headers: set to override the headers for a single
2032
+ request; this effectively ignores the headers
2033
+ in the spec for a single request.
2034
+ :type _headers: dict, optional
2035
+ :param _host_index: set to override the host_index for a single
2036
+ request; this effectively ignores the host_index
2037
+ in the spec for a single request.
2038
+ :type _host_index: int, optional
2039
+ :return: Returns the result object.
2040
+ """ # noqa: E501
2041
+
2042
+ _param = self._get_ai_excel_template_settings_serialize(
2043
+ conversation_id=conversation_id,
2044
+ username=username,
2045
+ dataset=dataset,
2046
+ q_answer_api_key=q_answer_api_key,
2047
+ _request_auth=_request_auth,
2048
+ _content_type=_content_type,
2049
+ _headers=_headers,
2050
+ _host_index=_host_index
2051
+ )
2052
+
2053
+ _response_types_map: Dict[str, Optional[str]] = {
2054
+ '200': "AIExcelTaskSettings",
2055
+ '422': "HTTPValidationError",
2056
+ }
2057
+ response_data = self.api_client.call_api(
2058
+ *_param,
2059
+ _request_timeout=_request_timeout
2060
+ )
2061
+ response_data.read()
2062
+ return self.api_client.response_deserialize(
2063
+ response_data=response_data,
2064
+ response_types_map=_response_types_map,
2065
+ )
2066
+
2067
+
2068
+ @validate_call
2069
+ def get_ai_excel_template_settings_without_preload_content(
2070
+ self,
2071
+ conversation_id: StrictStr,
2072
+ username: StrictStr,
2073
+ dataset: StrictStr,
2074
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2075
+ _request_timeout: Union[
2076
+ None,
2077
+ Annotated[StrictFloat, Field(gt=0)],
2078
+ Tuple[
2079
+ Annotated[StrictFloat, Field(gt=0)],
2080
+ Annotated[StrictFloat, Field(gt=0)]
2081
+ ]
2082
+ ] = None,
2083
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2084
+ _content_type: Optional[StrictStr] = None,
2085
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2086
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2087
+ ) -> RESTResponseType:
2088
+ """Get Ai Excel Template Settings
2089
+
2090
+
2091
+ :param conversation_id: (required)
2092
+ :type conversation_id: str
2093
+ :param username: (required)
2094
+ :type username: str
2095
+ :param dataset: (required)
2096
+ :type dataset: str
2097
+ :param q_answer_api_key: Optional QAnswer API key
2098
+ :type q_answer_api_key: str
2099
+ :param _request_timeout: timeout setting for this request. If one
2100
+ number provided, it will be total request
2101
+ timeout. It can also be a pair (tuple) of
2102
+ (connection, read) timeouts.
2103
+ :type _request_timeout: int, tuple(int, int), optional
2104
+ :param _request_auth: set to override the auth_settings for an a single
2105
+ request; this effectively ignores the
2106
+ authentication in the spec for a single request.
2107
+ :type _request_auth: dict, optional
2108
+ :param _content_type: force content-type for the request.
2109
+ :type _content_type: str, Optional
2110
+ :param _headers: set to override the headers for a single
2111
+ request; this effectively ignores the headers
2112
+ in the spec for a single request.
2113
+ :type _headers: dict, optional
2114
+ :param _host_index: set to override the host_index for a single
2115
+ request; this effectively ignores the host_index
2116
+ in the spec for a single request.
2117
+ :type _host_index: int, optional
2118
+ :return: Returns the result object.
2119
+ """ # noqa: E501
2120
+
2121
+ _param = self._get_ai_excel_template_settings_serialize(
2122
+ conversation_id=conversation_id,
2123
+ username=username,
2124
+ dataset=dataset,
2125
+ q_answer_api_key=q_answer_api_key,
2126
+ _request_auth=_request_auth,
2127
+ _content_type=_content_type,
2128
+ _headers=_headers,
2129
+ _host_index=_host_index
2130
+ )
2131
+
2132
+ _response_types_map: Dict[str, Optional[str]] = {
2133
+ '200': "AIExcelTaskSettings",
2134
+ '422': "HTTPValidationError",
2135
+ }
2136
+ response_data = self.api_client.call_api(
2137
+ *_param,
2138
+ _request_timeout=_request_timeout
2139
+ )
2140
+ return response_data.response
2141
+
2142
+
2143
+ def _get_ai_excel_template_settings_serialize(
2144
+ self,
2145
+ conversation_id,
2146
+ username,
2147
+ dataset,
2148
+ q_answer_api_key,
2149
+ _request_auth,
2150
+ _content_type,
2151
+ _headers,
2152
+ _host_index,
2153
+ ) -> RequestSerialized:
2154
+
2155
+ _host = None
2156
+
2157
+ _collection_formats: Dict[str, str] = {
2158
+ }
2159
+
2160
+ _path_params: Dict[str, str] = {}
2161
+ _query_params: List[Tuple[str, str]] = []
2162
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2163
+ _form_params: List[Tuple[str, str]] = []
2164
+ _files: Dict[
2165
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2166
+ ] = {}
2167
+ _body_params: Optional[bytes] = None
2168
+
2169
+ # process the path parameters
2170
+ if conversation_id is not None:
2171
+ _path_params['conversation_id'] = conversation_id
2172
+ # process the query parameters
2173
+ if username is not None:
2174
+
2175
+ _query_params.append(('username', username))
2176
+
2177
+ if dataset is not None:
2178
+
2179
+ _query_params.append(('dataset', dataset))
2180
+
2181
+ # process the header parameters
2182
+ if q_answer_api_key is not None:
2183
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2184
+ # process the form parameters
2185
+ # process the body parameter
2186
+
2187
+
2188
+ # set the HTTP header `Accept`
2189
+ if 'Accept' not in _header_params:
2190
+ _header_params['Accept'] = self.api_client.select_header_accept(
2191
+ [
2192
+ 'application/json'
2193
+ ]
2194
+ )
2195
+
2196
+
2197
+ # authentication setting
2198
+ _auth_settings: List[str] = [
2199
+ 'QAnswer-Api-Key',
2200
+ 'Bearer token'
2201
+ ]
2202
+
2203
+ return self.api_client.param_serialize(
2204
+ method='GET',
2205
+ resource_path='/api/tasks/ai-excel/templates/{conversation_id}/settings',
2206
+ path_params=_path_params,
2207
+ query_params=_query_params,
2208
+ header_params=_header_params,
2209
+ body=_body_params,
2210
+ post_params=_form_params,
2211
+ files=_files,
2212
+ auth_settings=_auth_settings,
2213
+ collection_formats=_collection_formats,
2214
+ _host=_host,
2215
+ _request_auth=_request_auth
2216
+ )
2217
+
2218
+
2219
+
2220
+
2221
+ @validate_call
2222
+ def search_ai_excel_templates(
2223
+ self,
2224
+ ai_excel_templates_search_request: AIExcelTemplatesSearchRequest,
2225
+ query: Annotated[Optional[StrictStr], Field(description="Search query for template names")] = None,
2226
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2227
+ _request_timeout: Union[
2228
+ None,
2229
+ Annotated[StrictFloat, Field(gt=0)],
2230
+ Tuple[
2231
+ Annotated[StrictFloat, Field(gt=0)],
2232
+ Annotated[StrictFloat, Field(gt=0)]
2233
+ ]
2234
+ ] = None,
2235
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2236
+ _content_type: Optional[StrictStr] = None,
2237
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2238
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2239
+ ) -> AIExcelTemplatesSearchResponse:
2240
+ """Search Ai Excel Templates
2241
+
2242
+
2243
+ :param ai_excel_templates_search_request: (required)
2244
+ :type ai_excel_templates_search_request: AIExcelTemplatesSearchRequest
2245
+ :param query: Search query for template names
2246
+ :type query: str
2247
+ :param q_answer_api_key: Optional QAnswer API key
2248
+ :type q_answer_api_key: str
2249
+ :param _request_timeout: timeout setting for this request. If one
2250
+ number provided, it will be total request
2251
+ timeout. It can also be a pair (tuple) of
2252
+ (connection, read) timeouts.
2253
+ :type _request_timeout: int, tuple(int, int), optional
2254
+ :param _request_auth: set to override the auth_settings for an a single
2255
+ request; this effectively ignores the
2256
+ authentication in the spec for a single request.
2257
+ :type _request_auth: dict, optional
2258
+ :param _content_type: force content-type for the request.
2259
+ :type _content_type: str, Optional
2260
+ :param _headers: set to override the headers for a single
2261
+ request; this effectively ignores the headers
2262
+ in the spec for a single request.
2263
+ :type _headers: dict, optional
2264
+ :param _host_index: set to override the host_index for a single
2265
+ request; this effectively ignores the host_index
2266
+ in the spec for a single request.
2267
+ :type _host_index: int, optional
2268
+ :return: Returns the result object.
2269
+ """ # noqa: E501
2270
+
2271
+ _param = self._search_ai_excel_templates_serialize(
2272
+ ai_excel_templates_search_request=ai_excel_templates_search_request,
2273
+ query=query,
2274
+ q_answer_api_key=q_answer_api_key,
2275
+ _request_auth=_request_auth,
2276
+ _content_type=_content_type,
2277
+ _headers=_headers,
2278
+ _host_index=_host_index
2279
+ )
2280
+
2281
+ _response_types_map: Dict[str, Optional[str]] = {
2282
+ '200': "AIExcelTemplatesSearchResponse",
2283
+ '422': "HTTPValidationError",
2284
+ }
2285
+ response_data = self.api_client.call_api(
2286
+ *_param,
2287
+ _request_timeout=_request_timeout
2288
+ )
2289
+ response_data.read()
2290
+ return self.api_client.response_deserialize(
2291
+ response_data=response_data,
2292
+ response_types_map=_response_types_map,
2293
+ ).data
2294
+
2295
+
2296
+ @validate_call
2297
+ def search_ai_excel_templates_with_http_info(
2298
+ self,
2299
+ ai_excel_templates_search_request: AIExcelTemplatesSearchRequest,
2300
+ query: Annotated[Optional[StrictStr], Field(description="Search query for template names")] = None,
2301
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2302
+ _request_timeout: Union[
2303
+ None,
2304
+ Annotated[StrictFloat, Field(gt=0)],
2305
+ Tuple[
2306
+ Annotated[StrictFloat, Field(gt=0)],
2307
+ Annotated[StrictFloat, Field(gt=0)]
2308
+ ]
2309
+ ] = None,
2310
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2311
+ _content_type: Optional[StrictStr] = None,
2312
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2313
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2314
+ ) -> ApiResponse[AIExcelTemplatesSearchResponse]:
2315
+ """Search Ai Excel Templates
2316
+
2317
+
2318
+ :param ai_excel_templates_search_request: (required)
2319
+ :type ai_excel_templates_search_request: AIExcelTemplatesSearchRequest
2320
+ :param query: Search query for template names
2321
+ :type query: str
2322
+ :param q_answer_api_key: Optional QAnswer API key
2323
+ :type q_answer_api_key: str
2324
+ :param _request_timeout: timeout setting for this request. If one
2325
+ number provided, it will be total request
2326
+ timeout. It can also be a pair (tuple) of
2327
+ (connection, read) timeouts.
2328
+ :type _request_timeout: int, tuple(int, int), optional
2329
+ :param _request_auth: set to override the auth_settings for an a single
2330
+ request; this effectively ignores the
2331
+ authentication in the spec for a single request.
2332
+ :type _request_auth: dict, optional
2333
+ :param _content_type: force content-type for the request.
2334
+ :type _content_type: str, Optional
2335
+ :param _headers: set to override the headers for a single
2336
+ request; this effectively ignores the headers
2337
+ in the spec for a single request.
2338
+ :type _headers: dict, optional
2339
+ :param _host_index: set to override the host_index for a single
2340
+ request; this effectively ignores the host_index
2341
+ in the spec for a single request.
2342
+ :type _host_index: int, optional
2343
+ :return: Returns the result object.
2344
+ """ # noqa: E501
2345
+
2346
+ _param = self._search_ai_excel_templates_serialize(
2347
+ ai_excel_templates_search_request=ai_excel_templates_search_request,
2348
+ query=query,
2349
+ q_answer_api_key=q_answer_api_key,
2350
+ _request_auth=_request_auth,
2351
+ _content_type=_content_type,
2352
+ _headers=_headers,
2353
+ _host_index=_host_index
2354
+ )
2355
+
2356
+ _response_types_map: Dict[str, Optional[str]] = {
2357
+ '200': "AIExcelTemplatesSearchResponse",
2358
+ '422': "HTTPValidationError",
2359
+ }
2360
+ response_data = self.api_client.call_api(
2361
+ *_param,
2362
+ _request_timeout=_request_timeout
2363
+ )
2364
+ response_data.read()
2365
+ return self.api_client.response_deserialize(
2366
+ response_data=response_data,
2367
+ response_types_map=_response_types_map,
2368
+ )
2369
+
2370
+
2371
+ @validate_call
2372
+ def search_ai_excel_templates_without_preload_content(
2373
+ self,
2374
+ ai_excel_templates_search_request: AIExcelTemplatesSearchRequest,
2375
+ query: Annotated[Optional[StrictStr], Field(description="Search query for template names")] = None,
2376
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2377
+ _request_timeout: Union[
2378
+ None,
2379
+ Annotated[StrictFloat, Field(gt=0)],
2380
+ Tuple[
2381
+ Annotated[StrictFloat, Field(gt=0)],
2382
+ Annotated[StrictFloat, Field(gt=0)]
2383
+ ]
2384
+ ] = None,
2385
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2386
+ _content_type: Optional[StrictStr] = None,
2387
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2388
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2389
+ ) -> RESTResponseType:
2390
+ """Search Ai Excel Templates
2391
+
2392
+
2393
+ :param ai_excel_templates_search_request: (required)
2394
+ :type ai_excel_templates_search_request: AIExcelTemplatesSearchRequest
2395
+ :param query: Search query for template names
2396
+ :type query: str
2397
+ :param q_answer_api_key: Optional QAnswer API key
2398
+ :type q_answer_api_key: str
2399
+ :param _request_timeout: timeout setting for this request. If one
2400
+ number provided, it will be total request
2401
+ timeout. It can also be a pair (tuple) of
2402
+ (connection, read) timeouts.
2403
+ :type _request_timeout: int, tuple(int, int), optional
2404
+ :param _request_auth: set to override the auth_settings for an a single
2405
+ request; this effectively ignores the
2406
+ authentication in the spec for a single request.
2407
+ :type _request_auth: dict, optional
2408
+ :param _content_type: force content-type for the request.
2409
+ :type _content_type: str, Optional
2410
+ :param _headers: set to override the headers for a single
2411
+ request; this effectively ignores the headers
2412
+ in the spec for a single request.
2413
+ :type _headers: dict, optional
2414
+ :param _host_index: set to override the host_index for a single
2415
+ request; this effectively ignores the host_index
2416
+ in the spec for a single request.
2417
+ :type _host_index: int, optional
2418
+ :return: Returns the result object.
2419
+ """ # noqa: E501
2420
+
2421
+ _param = self._search_ai_excel_templates_serialize(
2422
+ ai_excel_templates_search_request=ai_excel_templates_search_request,
2423
+ query=query,
2424
+ q_answer_api_key=q_answer_api_key,
2425
+ _request_auth=_request_auth,
2426
+ _content_type=_content_type,
2427
+ _headers=_headers,
2428
+ _host_index=_host_index
2429
+ )
2430
+
2431
+ _response_types_map: Dict[str, Optional[str]] = {
2432
+ '200': "AIExcelTemplatesSearchResponse",
2433
+ '422': "HTTPValidationError",
2434
+ }
2435
+ response_data = self.api_client.call_api(
2436
+ *_param,
2437
+ _request_timeout=_request_timeout
2438
+ )
2439
+ return response_data.response
2440
+
2441
+
2442
+ def _search_ai_excel_templates_serialize(
2443
+ self,
2444
+ ai_excel_templates_search_request,
2445
+ query,
2446
+ q_answer_api_key,
2447
+ _request_auth,
2448
+ _content_type,
2449
+ _headers,
2450
+ _host_index,
2451
+ ) -> RequestSerialized:
2452
+
2453
+ _host = None
2454
+
2455
+ _collection_formats: Dict[str, str] = {
2456
+ }
2457
+
2458
+ _path_params: Dict[str, str] = {}
2459
+ _query_params: List[Tuple[str, str]] = []
2460
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2461
+ _form_params: List[Tuple[str, str]] = []
2462
+ _files: Dict[
2463
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2464
+ ] = {}
2465
+ _body_params: Optional[bytes] = None
2466
+
2467
+ # process the path parameters
2468
+ # process the query parameters
2469
+ if query is not None:
2470
+
2471
+ _query_params.append(('query', query))
2472
+
2473
+ # process the header parameters
2474
+ if q_answer_api_key is not None:
2475
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2476
+ # process the form parameters
2477
+ # process the body parameter
2478
+ if ai_excel_templates_search_request is not None:
2479
+ _body_params = ai_excel_templates_search_request
2480
+
2481
+
2482
+ # set the HTTP header `Accept`
2483
+ if 'Accept' not in _header_params:
2484
+ _header_params['Accept'] = self.api_client.select_header_accept(
2485
+ [
2486
+ 'application/json'
2487
+ ]
2488
+ )
2489
+
2490
+ # set the HTTP header `Content-Type`
2491
+ if _content_type:
2492
+ _header_params['Content-Type'] = _content_type
2493
+ else:
2494
+ _default_content_type = (
2495
+ self.api_client.select_header_content_type(
2496
+ [
2497
+ 'application/json'
2498
+ ]
2499
+ )
2500
+ )
2501
+ if _default_content_type is not None:
2502
+ _header_params['Content-Type'] = _default_content_type
2503
+
2504
+ # authentication setting
2505
+ _auth_settings: List[str] = [
2506
+ 'QAnswer-Api-Key',
2507
+ 'Bearer token'
2508
+ ]
2509
+
2510
+ return self.api_client.param_serialize(
2511
+ method='POST',
2512
+ resource_path='/api/tasks/ai-excel/templates/search',
2513
+ path_params=_path_params,
2514
+ query_params=_query_params,
2515
+ header_params=_header_params,
2516
+ body=_body_params,
2517
+ post_params=_form_params,
2518
+ files=_files,
2519
+ auth_settings=_auth_settings,
2520
+ collection_formats=_collection_formats,
2521
+ _host=_host,
2522
+ _request_auth=_request_auth
2523
+ )
2524
+
2525
+
2526
+
2527
+
2528
+ @validate_call
2529
+ def search_entities(
2530
+ self,
2531
+ ai_excel_entity_search_payload: AIExcelEntitySearchPayload,
2532
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2533
+ _request_timeout: Union[
2534
+ None,
2535
+ Annotated[StrictFloat, Field(gt=0)],
2536
+ Tuple[
2537
+ Annotated[StrictFloat, Field(gt=0)],
2538
+ Annotated[StrictFloat, Field(gt=0)]
2539
+ ]
2540
+ ] = None,
2541
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2542
+ _content_type: Optional[StrictStr] = None,
2543
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2544
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2545
+ ) -> AIExcelEntitySearchResponse:
2546
+ """Search Entities
2547
+
2548
+
2549
+ :param ai_excel_entity_search_payload: (required)
2550
+ :type ai_excel_entity_search_payload: AIExcelEntitySearchPayload
2551
+ :param q_answer_api_key: Optional QAnswer API key
2552
+ :type q_answer_api_key: str
2553
+ :param _request_timeout: timeout setting for this request. If one
2554
+ number provided, it will be total request
2555
+ timeout. It can also be a pair (tuple) of
2556
+ (connection, read) timeouts.
2557
+ :type _request_timeout: int, tuple(int, int), optional
2558
+ :param _request_auth: set to override the auth_settings for an a single
2559
+ request; this effectively ignores the
2560
+ authentication in the spec for a single request.
2561
+ :type _request_auth: dict, optional
2562
+ :param _content_type: force content-type for the request.
2563
+ :type _content_type: str, Optional
2564
+ :param _headers: set to override the headers for a single
2565
+ request; this effectively ignores the headers
2566
+ in the spec for a single request.
2567
+ :type _headers: dict, optional
2568
+ :param _host_index: set to override the host_index for a single
2569
+ request; this effectively ignores the host_index
2570
+ in the spec for a single request.
2571
+ :type _host_index: int, optional
2572
+ :return: Returns the result object.
2573
+ """ # noqa: E501
2574
+
2575
+ _param = self._search_entities_serialize(
2576
+ ai_excel_entity_search_payload=ai_excel_entity_search_payload,
2577
+ q_answer_api_key=q_answer_api_key,
2578
+ _request_auth=_request_auth,
2579
+ _content_type=_content_type,
2580
+ _headers=_headers,
2581
+ _host_index=_host_index
2582
+ )
2583
+
2584
+ _response_types_map: Dict[str, Optional[str]] = {
2585
+ '200': "AIExcelEntitySearchResponse",
2586
+ '422': "HTTPValidationError",
2587
+ }
2588
+ response_data = self.api_client.call_api(
2589
+ *_param,
2590
+ _request_timeout=_request_timeout
2591
+ )
2592
+ response_data.read()
2593
+ return self.api_client.response_deserialize(
2594
+ response_data=response_data,
2595
+ response_types_map=_response_types_map,
2596
+ ).data
2597
+
2598
+
2599
+ @validate_call
2600
+ def search_entities_with_http_info(
2601
+ self,
2602
+ ai_excel_entity_search_payload: AIExcelEntitySearchPayload,
2603
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2604
+ _request_timeout: Union[
2605
+ None,
2606
+ Annotated[StrictFloat, Field(gt=0)],
2607
+ Tuple[
2608
+ Annotated[StrictFloat, Field(gt=0)],
2609
+ Annotated[StrictFloat, Field(gt=0)]
2610
+ ]
2611
+ ] = None,
2612
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2613
+ _content_type: Optional[StrictStr] = None,
2614
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2615
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2616
+ ) -> ApiResponse[AIExcelEntitySearchResponse]:
2617
+ """Search Entities
2618
+
2619
+
2620
+ :param ai_excel_entity_search_payload: (required)
2621
+ :type ai_excel_entity_search_payload: AIExcelEntitySearchPayload
2622
+ :param q_answer_api_key: Optional QAnswer API key
2623
+ :type q_answer_api_key: str
2624
+ :param _request_timeout: timeout setting for this request. If one
2625
+ number provided, it will be total request
2626
+ timeout. It can also be a pair (tuple) of
2627
+ (connection, read) timeouts.
2628
+ :type _request_timeout: int, tuple(int, int), optional
2629
+ :param _request_auth: set to override the auth_settings for an a single
2630
+ request; this effectively ignores the
2631
+ authentication in the spec for a single request.
2632
+ :type _request_auth: dict, optional
2633
+ :param _content_type: force content-type for the request.
2634
+ :type _content_type: str, Optional
2635
+ :param _headers: set to override the headers for a single
2636
+ request; this effectively ignores the headers
2637
+ in the spec for a single request.
2638
+ :type _headers: dict, optional
2639
+ :param _host_index: set to override the host_index for a single
2640
+ request; this effectively ignores the host_index
2641
+ in the spec for a single request.
2642
+ :type _host_index: int, optional
2643
+ :return: Returns the result object.
2644
+ """ # noqa: E501
2645
+
2646
+ _param = self._search_entities_serialize(
2647
+ ai_excel_entity_search_payload=ai_excel_entity_search_payload,
2648
+ q_answer_api_key=q_answer_api_key,
2649
+ _request_auth=_request_auth,
2650
+ _content_type=_content_type,
2651
+ _headers=_headers,
2652
+ _host_index=_host_index
2653
+ )
2654
+
2655
+ _response_types_map: Dict[str, Optional[str]] = {
2656
+ '200': "AIExcelEntitySearchResponse",
2657
+ '422': "HTTPValidationError",
2658
+ }
2659
+ response_data = self.api_client.call_api(
2660
+ *_param,
2661
+ _request_timeout=_request_timeout
2662
+ )
2663
+ response_data.read()
2664
+ return self.api_client.response_deserialize(
2665
+ response_data=response_data,
2666
+ response_types_map=_response_types_map,
2667
+ )
2668
+
2669
+
2670
+ @validate_call
2671
+ def search_entities_without_preload_content(
2672
+ self,
2673
+ ai_excel_entity_search_payload: AIExcelEntitySearchPayload,
2674
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2675
+ _request_timeout: Union[
2676
+ None,
2677
+ Annotated[StrictFloat, Field(gt=0)],
2678
+ Tuple[
2679
+ Annotated[StrictFloat, Field(gt=0)],
2680
+ Annotated[StrictFloat, Field(gt=0)]
2681
+ ]
2682
+ ] = None,
2683
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2684
+ _content_type: Optional[StrictStr] = None,
2685
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2686
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2687
+ ) -> RESTResponseType:
2688
+ """Search Entities
2689
+
2690
+
2691
+ :param ai_excel_entity_search_payload: (required)
2692
+ :type ai_excel_entity_search_payload: AIExcelEntitySearchPayload
2693
+ :param q_answer_api_key: Optional QAnswer API key
2694
+ :type q_answer_api_key: str
2695
+ :param _request_timeout: timeout setting for this request. If one
2696
+ number provided, it will be total request
2697
+ timeout. It can also be a pair (tuple) of
2698
+ (connection, read) timeouts.
2699
+ :type _request_timeout: int, tuple(int, int), optional
2700
+ :param _request_auth: set to override the auth_settings for an a single
2701
+ request; this effectively ignores the
2702
+ authentication in the spec for a single request.
2703
+ :type _request_auth: dict, optional
2704
+ :param _content_type: force content-type for the request.
2705
+ :type _content_type: str, Optional
2706
+ :param _headers: set to override the headers for a single
2707
+ request; this effectively ignores the headers
2708
+ in the spec for a single request.
2709
+ :type _headers: dict, optional
2710
+ :param _host_index: set to override the host_index for a single
2711
+ request; this effectively ignores the host_index
2712
+ in the spec for a single request.
2713
+ :type _host_index: int, optional
2714
+ :return: Returns the result object.
2715
+ """ # noqa: E501
2716
+
2717
+ _param = self._search_entities_serialize(
2718
+ ai_excel_entity_search_payload=ai_excel_entity_search_payload,
2719
+ q_answer_api_key=q_answer_api_key,
2720
+ _request_auth=_request_auth,
2721
+ _content_type=_content_type,
2722
+ _headers=_headers,
2723
+ _host_index=_host_index
2724
+ )
2725
+
2726
+ _response_types_map: Dict[str, Optional[str]] = {
2727
+ '200': "AIExcelEntitySearchResponse",
2728
+ '422': "HTTPValidationError",
2729
+ }
2730
+ response_data = self.api_client.call_api(
2731
+ *_param,
2732
+ _request_timeout=_request_timeout
2733
+ )
2734
+ return response_data.response
2735
+
2736
+
2737
+ def _search_entities_serialize(
2738
+ self,
2739
+ ai_excel_entity_search_payload,
2740
+ q_answer_api_key,
2741
+ _request_auth,
2742
+ _content_type,
2743
+ _headers,
2744
+ _host_index,
2745
+ ) -> RequestSerialized:
2746
+
2747
+ _host = None
2748
+
2749
+ _collection_formats: Dict[str, str] = {
2750
+ }
2751
+
2752
+ _path_params: Dict[str, str] = {}
2753
+ _query_params: List[Tuple[str, str]] = []
2754
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2755
+ _form_params: List[Tuple[str, str]] = []
2756
+ _files: Dict[
2757
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2758
+ ] = {}
2759
+ _body_params: Optional[bytes] = None
2760
+
2761
+ # process the path parameters
2762
+ # process the query parameters
2763
+ # process the header parameters
2764
+ if q_answer_api_key is not None:
2765
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2766
+ # process the form parameters
2767
+ # process the body parameter
2768
+ if ai_excel_entity_search_payload is not None:
2769
+ _body_params = ai_excel_entity_search_payload
2770
+
2771
+
2772
+ # set the HTTP header `Accept`
2773
+ if 'Accept' not in _header_params:
2774
+ _header_params['Accept'] = self.api_client.select_header_accept(
2775
+ [
2776
+ 'application/json'
2777
+ ]
2778
+ )
2779
+
2780
+ # set the HTTP header `Content-Type`
2781
+ if _content_type:
2782
+ _header_params['Content-Type'] = _content_type
2783
+ else:
2784
+ _default_content_type = (
2785
+ self.api_client.select_header_content_type(
2786
+ [
2787
+ 'application/json'
2788
+ ]
2789
+ )
2790
+ )
2791
+ if _default_content_type is not None:
2792
+ _header_params['Content-Type'] = _default_content_type
2793
+
2794
+ # authentication setting
2795
+ _auth_settings: List[str] = [
2796
+ 'QAnswer-Api-Key',
2797
+ 'Bearer token'
2798
+ ]
2799
+
2800
+ return self.api_client.param_serialize(
2801
+ method='POST',
2802
+ resource_path='/api/tasks/ai-excel/entity-search',
2803
+ path_params=_path_params,
2804
+ query_params=_query_params,
2805
+ header_params=_header_params,
2806
+ body=_body_params,
2807
+ post_params=_form_params,
2808
+ files=_files,
2809
+ auth_settings=_auth_settings,
2810
+ collection_formats=_collection_formats,
2811
+ _host=_host,
2812
+ _request_auth=_request_auth
2813
+ )
2814
+
2815
+
2816
+
2817
+
2818
+ @validate_call
2819
+ def update_ai_excel_task_settings(
2820
+ self,
2821
+ ai_excel_global_settings_request: AIExcelGlobalSettingsRequest,
2822
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2823
+ _request_timeout: Union[
2824
+ None,
2825
+ Annotated[StrictFloat, Field(gt=0)],
2826
+ Tuple[
2827
+ Annotated[StrictFloat, Field(gt=0)],
2828
+ Annotated[StrictFloat, Field(gt=0)]
2829
+ ]
2830
+ ] = None,
2831
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2832
+ _content_type: Optional[StrictStr] = None,
2833
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2834
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2835
+ ) -> AIExcelGlobalSettings:
2836
+ """Update Ai Excel Task Settings
2837
+
2838
+
2839
+ :param ai_excel_global_settings_request: (required)
2840
+ :type ai_excel_global_settings_request: AIExcelGlobalSettingsRequest
2841
+ :param q_answer_api_key: Optional QAnswer API key
2842
+ :type q_answer_api_key: str
2843
+ :param _request_timeout: timeout setting for this request. If one
2844
+ number provided, it will be total request
2845
+ timeout. It can also be a pair (tuple) of
2846
+ (connection, read) timeouts.
2847
+ :type _request_timeout: int, tuple(int, int), optional
2848
+ :param _request_auth: set to override the auth_settings for an a single
2849
+ request; this effectively ignores the
2850
+ authentication in the spec for a single request.
2851
+ :type _request_auth: dict, optional
2852
+ :param _content_type: force content-type for the request.
2853
+ :type _content_type: str, Optional
2854
+ :param _headers: set to override the headers for a single
2855
+ request; this effectively ignores the headers
2856
+ in the spec for a single request.
2857
+ :type _headers: dict, optional
2858
+ :param _host_index: set to override the host_index for a single
2859
+ request; this effectively ignores the host_index
2860
+ in the spec for a single request.
2861
+ :type _host_index: int, optional
2862
+ :return: Returns the result object.
2863
+ """ # noqa: E501
2864
+
2865
+ _param = self._update_ai_excel_task_settings_serialize(
2866
+ ai_excel_global_settings_request=ai_excel_global_settings_request,
2867
+ q_answer_api_key=q_answer_api_key,
2868
+ _request_auth=_request_auth,
2869
+ _content_type=_content_type,
2870
+ _headers=_headers,
2871
+ _host_index=_host_index
2872
+ )
2873
+
2874
+ _response_types_map: Dict[str, Optional[str]] = {
2875
+ '200': "AIExcelGlobalSettings",
2876
+ '422': "HTTPValidationError",
2877
+ }
2878
+ response_data = self.api_client.call_api(
2879
+ *_param,
2880
+ _request_timeout=_request_timeout
2881
+ )
2882
+ response_data.read()
2883
+ return self.api_client.response_deserialize(
2884
+ response_data=response_data,
2885
+ response_types_map=_response_types_map,
2886
+ ).data
2887
+
2888
+
2889
+ @validate_call
2890
+ def update_ai_excel_task_settings_with_http_info(
2891
+ self,
2892
+ ai_excel_global_settings_request: AIExcelGlobalSettingsRequest,
2893
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2894
+ _request_timeout: Union[
2895
+ None,
2896
+ Annotated[StrictFloat, Field(gt=0)],
2897
+ Tuple[
2898
+ Annotated[StrictFloat, Field(gt=0)],
2899
+ Annotated[StrictFloat, Field(gt=0)]
2900
+ ]
2901
+ ] = None,
2902
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2903
+ _content_type: Optional[StrictStr] = None,
2904
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2905
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2906
+ ) -> ApiResponse[AIExcelGlobalSettings]:
2907
+ """Update Ai Excel Task Settings
2908
+
2909
+
2910
+ :param ai_excel_global_settings_request: (required)
2911
+ :type ai_excel_global_settings_request: AIExcelGlobalSettingsRequest
2912
+ :param q_answer_api_key: Optional QAnswer API key
2913
+ :type q_answer_api_key: str
2914
+ :param _request_timeout: timeout setting for this request. If one
2915
+ number provided, it will be total request
2916
+ timeout. It can also be a pair (tuple) of
2917
+ (connection, read) timeouts.
2918
+ :type _request_timeout: int, tuple(int, int), optional
2919
+ :param _request_auth: set to override the auth_settings for an a single
2920
+ request; this effectively ignores the
2921
+ authentication in the spec for a single request.
2922
+ :type _request_auth: dict, optional
2923
+ :param _content_type: force content-type for the request.
2924
+ :type _content_type: str, Optional
2925
+ :param _headers: set to override the headers for a single
2926
+ request; this effectively ignores the headers
2927
+ in the spec for a single request.
2928
+ :type _headers: dict, optional
2929
+ :param _host_index: set to override the host_index for a single
2930
+ request; this effectively ignores the host_index
2931
+ in the spec for a single request.
2932
+ :type _host_index: int, optional
2933
+ :return: Returns the result object.
2934
+ """ # noqa: E501
2935
+
2936
+ _param = self._update_ai_excel_task_settings_serialize(
2937
+ ai_excel_global_settings_request=ai_excel_global_settings_request,
2938
+ q_answer_api_key=q_answer_api_key,
2939
+ _request_auth=_request_auth,
2940
+ _content_type=_content_type,
2941
+ _headers=_headers,
2942
+ _host_index=_host_index
2943
+ )
2944
+
2945
+ _response_types_map: Dict[str, Optional[str]] = {
2946
+ '200': "AIExcelGlobalSettings",
2947
+ '422': "HTTPValidationError",
2948
+ }
2949
+ response_data = self.api_client.call_api(
2950
+ *_param,
2951
+ _request_timeout=_request_timeout
2952
+ )
2953
+ response_data.read()
2954
+ return self.api_client.response_deserialize(
2955
+ response_data=response_data,
2956
+ response_types_map=_response_types_map,
2957
+ )
2958
+
2959
+
2960
+ @validate_call
2961
+ def update_ai_excel_task_settings_without_preload_content(
2962
+ self,
2963
+ ai_excel_global_settings_request: AIExcelGlobalSettingsRequest,
2964
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
2965
+ _request_timeout: Union[
2966
+ None,
2967
+ Annotated[StrictFloat, Field(gt=0)],
2968
+ Tuple[
2969
+ Annotated[StrictFloat, Field(gt=0)],
2970
+ Annotated[StrictFloat, Field(gt=0)]
2971
+ ]
2972
+ ] = None,
2973
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2974
+ _content_type: Optional[StrictStr] = None,
2975
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2976
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2977
+ ) -> RESTResponseType:
2978
+ """Update Ai Excel Task Settings
2979
+
2980
+
2981
+ :param ai_excel_global_settings_request: (required)
2982
+ :type ai_excel_global_settings_request: AIExcelGlobalSettingsRequest
2983
+ :param q_answer_api_key: Optional QAnswer API key
2984
+ :type q_answer_api_key: str
2985
+ :param _request_timeout: timeout setting for this request. If one
2986
+ number provided, it will be total request
2987
+ timeout. It can also be a pair (tuple) of
2988
+ (connection, read) timeouts.
2989
+ :type _request_timeout: int, tuple(int, int), optional
2990
+ :param _request_auth: set to override the auth_settings for an a single
2991
+ request; this effectively ignores the
2992
+ authentication in the spec for a single request.
2993
+ :type _request_auth: dict, optional
2994
+ :param _content_type: force content-type for the request.
2995
+ :type _content_type: str, Optional
2996
+ :param _headers: set to override the headers for a single
2997
+ request; this effectively ignores the headers
2998
+ in the spec for a single request.
2999
+ :type _headers: dict, optional
3000
+ :param _host_index: set to override the host_index for a single
3001
+ request; this effectively ignores the host_index
3002
+ in the spec for a single request.
3003
+ :type _host_index: int, optional
3004
+ :return: Returns the result object.
3005
+ """ # noqa: E501
3006
+
3007
+ _param = self._update_ai_excel_task_settings_serialize(
3008
+ ai_excel_global_settings_request=ai_excel_global_settings_request,
3009
+ q_answer_api_key=q_answer_api_key,
3010
+ _request_auth=_request_auth,
3011
+ _content_type=_content_type,
3012
+ _headers=_headers,
3013
+ _host_index=_host_index
3014
+ )
3015
+
3016
+ _response_types_map: Dict[str, Optional[str]] = {
3017
+ '200': "AIExcelGlobalSettings",
3018
+ '422': "HTTPValidationError",
3019
+ }
3020
+ response_data = self.api_client.call_api(
3021
+ *_param,
3022
+ _request_timeout=_request_timeout
3023
+ )
3024
+ return response_data.response
3025
+
3026
+
3027
+ def _update_ai_excel_task_settings_serialize(
3028
+ self,
3029
+ ai_excel_global_settings_request,
3030
+ q_answer_api_key,
3031
+ _request_auth,
3032
+ _content_type,
3033
+ _headers,
3034
+ _host_index,
3035
+ ) -> RequestSerialized:
3036
+
3037
+ _host = None
3038
+
3039
+ _collection_formats: Dict[str, str] = {
3040
+ }
3041
+
3042
+ _path_params: Dict[str, str] = {}
3043
+ _query_params: List[Tuple[str, str]] = []
3044
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3045
+ _form_params: List[Tuple[str, str]] = []
3046
+ _files: Dict[
3047
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3048
+ ] = {}
3049
+ _body_params: Optional[bytes] = None
3050
+
3051
+ # process the path parameters
3052
+ # process the query parameters
3053
+ # process the header parameters
3054
+ if q_answer_api_key is not None:
3055
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
3056
+ # process the form parameters
3057
+ # process the body parameter
3058
+ if ai_excel_global_settings_request is not None:
3059
+ _body_params = ai_excel_global_settings_request
3060
+
3061
+
3062
+ # set the HTTP header `Accept`
3063
+ if 'Accept' not in _header_params:
3064
+ _header_params['Accept'] = self.api_client.select_header_accept(
3065
+ [
3066
+ 'application/json'
3067
+ ]
3068
+ )
3069
+
3070
+ # set the HTTP header `Content-Type`
3071
+ if _content_type:
3072
+ _header_params['Content-Type'] = _content_type
3073
+ else:
3074
+ _default_content_type = (
3075
+ self.api_client.select_header_content_type(
3076
+ [
3077
+ 'application/json'
3078
+ ]
3079
+ )
3080
+ )
3081
+ if _default_content_type is not None:
3082
+ _header_params['Content-Type'] = _default_content_type
3083
+
3084
+ # authentication setting
3085
+ _auth_settings: List[str] = [
3086
+ 'QAnswer-Api-Key',
3087
+ 'Bearer token'
3088
+ ]
3089
+
3090
+ return self.api_client.param_serialize(
3091
+ method='PUT',
3092
+ resource_path='/api/tasks/ai-excel/settings',
3093
+ path_params=_path_params,
3094
+ query_params=_query_params,
3095
+ header_params=_header_params,
3096
+ body=_body_params,
3097
+ post_params=_form_params,
3098
+ files=_files,
3099
+ auth_settings=_auth_settings,
3100
+ collection_formats=_collection_formats,
3101
+ _host=_host,
3102
+ _request_auth=_request_auth
3103
+ )
3104
+
3105
+
3106
+
3107
+
3108
+ @validate_call
3109
+ def update_ai_excel_template(
3110
+ self,
3111
+ conversation_id: StrictStr,
3112
+ ai_excel_template_update: AIExcelTemplateUpdate,
3113
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
3114
+ _request_timeout: Union[
3115
+ None,
3116
+ Annotated[StrictFloat, Field(gt=0)],
3117
+ Tuple[
3118
+ Annotated[StrictFloat, Field(gt=0)],
3119
+ Annotated[StrictFloat, Field(gt=0)]
3120
+ ]
3121
+ ] = None,
3122
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3123
+ _content_type: Optional[StrictStr] = None,
3124
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3125
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3126
+ ) -> AIExcelTemplateRead:
3127
+ """Update Ai Excel Template
3128
+
3129
+
3130
+ :param conversation_id: (required)
3131
+ :type conversation_id: str
3132
+ :param ai_excel_template_update: (required)
3133
+ :type ai_excel_template_update: AIExcelTemplateUpdate
3134
+ :param q_answer_api_key: Optional QAnswer API key
3135
+ :type q_answer_api_key: str
3136
+ :param _request_timeout: timeout setting for this request. If one
3137
+ number provided, it will be total request
3138
+ timeout. It can also be a pair (tuple) of
3139
+ (connection, read) timeouts.
3140
+ :type _request_timeout: int, tuple(int, int), optional
3141
+ :param _request_auth: set to override the auth_settings for an a single
3142
+ request; this effectively ignores the
3143
+ authentication in the spec for a single request.
3144
+ :type _request_auth: dict, optional
3145
+ :param _content_type: force content-type for the request.
3146
+ :type _content_type: str, Optional
3147
+ :param _headers: set to override the headers for a single
3148
+ request; this effectively ignores the headers
3149
+ in the spec for a single request.
3150
+ :type _headers: dict, optional
3151
+ :param _host_index: set to override the host_index for a single
3152
+ request; this effectively ignores the host_index
3153
+ in the spec for a single request.
3154
+ :type _host_index: int, optional
3155
+ :return: Returns the result object.
3156
+ """ # noqa: E501
3157
+
3158
+ _param = self._update_ai_excel_template_serialize(
3159
+ conversation_id=conversation_id,
3160
+ ai_excel_template_update=ai_excel_template_update,
3161
+ q_answer_api_key=q_answer_api_key,
3162
+ _request_auth=_request_auth,
3163
+ _content_type=_content_type,
3164
+ _headers=_headers,
3165
+ _host_index=_host_index
3166
+ )
3167
+
3168
+ _response_types_map: Dict[str, Optional[str]] = {
3169
+ '200': "AIExcelTemplateRead",
3170
+ '422': "HTTPValidationError",
3171
+ }
3172
+ response_data = self.api_client.call_api(
3173
+ *_param,
3174
+ _request_timeout=_request_timeout
3175
+ )
3176
+ response_data.read()
3177
+ return self.api_client.response_deserialize(
3178
+ response_data=response_data,
3179
+ response_types_map=_response_types_map,
3180
+ ).data
3181
+
3182
+
3183
+ @validate_call
3184
+ def update_ai_excel_template_with_http_info(
3185
+ self,
3186
+ conversation_id: StrictStr,
3187
+ ai_excel_template_update: AIExcelTemplateUpdate,
3188
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
3189
+ _request_timeout: Union[
3190
+ None,
3191
+ Annotated[StrictFloat, Field(gt=0)],
3192
+ Tuple[
3193
+ Annotated[StrictFloat, Field(gt=0)],
3194
+ Annotated[StrictFloat, Field(gt=0)]
3195
+ ]
3196
+ ] = None,
3197
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3198
+ _content_type: Optional[StrictStr] = None,
3199
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3200
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3201
+ ) -> ApiResponse[AIExcelTemplateRead]:
3202
+ """Update Ai Excel Template
3203
+
3204
+
3205
+ :param conversation_id: (required)
3206
+ :type conversation_id: str
3207
+ :param ai_excel_template_update: (required)
3208
+ :type ai_excel_template_update: AIExcelTemplateUpdate
3209
+ :param q_answer_api_key: Optional QAnswer API key
3210
+ :type q_answer_api_key: str
3211
+ :param _request_timeout: timeout setting for this request. If one
3212
+ number provided, it will be total request
3213
+ timeout. It can also be a pair (tuple) of
3214
+ (connection, read) timeouts.
3215
+ :type _request_timeout: int, tuple(int, int), optional
3216
+ :param _request_auth: set to override the auth_settings for an a single
3217
+ request; this effectively ignores the
3218
+ authentication in the spec for a single request.
3219
+ :type _request_auth: dict, optional
3220
+ :param _content_type: force content-type for the request.
3221
+ :type _content_type: str, Optional
3222
+ :param _headers: set to override the headers for a single
3223
+ request; this effectively ignores the headers
3224
+ in the spec for a single request.
3225
+ :type _headers: dict, optional
3226
+ :param _host_index: set to override the host_index for a single
3227
+ request; this effectively ignores the host_index
3228
+ in the spec for a single request.
3229
+ :type _host_index: int, optional
3230
+ :return: Returns the result object.
3231
+ """ # noqa: E501
3232
+
3233
+ _param = self._update_ai_excel_template_serialize(
3234
+ conversation_id=conversation_id,
3235
+ ai_excel_template_update=ai_excel_template_update,
3236
+ q_answer_api_key=q_answer_api_key,
3237
+ _request_auth=_request_auth,
3238
+ _content_type=_content_type,
3239
+ _headers=_headers,
3240
+ _host_index=_host_index
3241
+ )
3242
+
3243
+ _response_types_map: Dict[str, Optional[str]] = {
3244
+ '200': "AIExcelTemplateRead",
3245
+ '422': "HTTPValidationError",
3246
+ }
3247
+ response_data = self.api_client.call_api(
3248
+ *_param,
3249
+ _request_timeout=_request_timeout
3250
+ )
3251
+ response_data.read()
3252
+ return self.api_client.response_deserialize(
3253
+ response_data=response_data,
3254
+ response_types_map=_response_types_map,
3255
+ )
3256
+
3257
+
3258
+ @validate_call
3259
+ def update_ai_excel_template_without_preload_content(
3260
+ self,
3261
+ conversation_id: StrictStr,
3262
+ ai_excel_template_update: AIExcelTemplateUpdate,
3263
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
3264
+ _request_timeout: Union[
3265
+ None,
3266
+ Annotated[StrictFloat, Field(gt=0)],
3267
+ Tuple[
3268
+ Annotated[StrictFloat, Field(gt=0)],
3269
+ Annotated[StrictFloat, Field(gt=0)]
3270
+ ]
3271
+ ] = None,
3272
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3273
+ _content_type: Optional[StrictStr] = None,
3274
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3275
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3276
+ ) -> RESTResponseType:
3277
+ """Update Ai Excel Template
3278
+
3279
+
3280
+ :param conversation_id: (required)
3281
+ :type conversation_id: str
3282
+ :param ai_excel_template_update: (required)
3283
+ :type ai_excel_template_update: AIExcelTemplateUpdate
3284
+ :param q_answer_api_key: Optional QAnswer API key
3285
+ :type q_answer_api_key: str
3286
+ :param _request_timeout: timeout setting for this request. If one
3287
+ number provided, it will be total request
3288
+ timeout. It can also be a pair (tuple) of
3289
+ (connection, read) timeouts.
3290
+ :type _request_timeout: int, tuple(int, int), optional
3291
+ :param _request_auth: set to override the auth_settings for an a single
3292
+ request; this effectively ignores the
3293
+ authentication in the spec for a single request.
3294
+ :type _request_auth: dict, optional
3295
+ :param _content_type: force content-type for the request.
3296
+ :type _content_type: str, Optional
3297
+ :param _headers: set to override the headers for a single
3298
+ request; this effectively ignores the headers
3299
+ in the spec for a single request.
3300
+ :type _headers: dict, optional
3301
+ :param _host_index: set to override the host_index for a single
3302
+ request; this effectively ignores the host_index
3303
+ in the spec for a single request.
3304
+ :type _host_index: int, optional
3305
+ :return: Returns the result object.
3306
+ """ # noqa: E501
3307
+
3308
+ _param = self._update_ai_excel_template_serialize(
3309
+ conversation_id=conversation_id,
3310
+ ai_excel_template_update=ai_excel_template_update,
3311
+ q_answer_api_key=q_answer_api_key,
3312
+ _request_auth=_request_auth,
3313
+ _content_type=_content_type,
3314
+ _headers=_headers,
3315
+ _host_index=_host_index
3316
+ )
3317
+
3318
+ _response_types_map: Dict[str, Optional[str]] = {
3319
+ '200': "AIExcelTemplateRead",
3320
+ '422': "HTTPValidationError",
3321
+ }
3322
+ response_data = self.api_client.call_api(
3323
+ *_param,
3324
+ _request_timeout=_request_timeout
3325
+ )
3326
+ return response_data.response
3327
+
3328
+
3329
+ def _update_ai_excel_template_serialize(
3330
+ self,
3331
+ conversation_id,
3332
+ ai_excel_template_update,
3333
+ q_answer_api_key,
3334
+ _request_auth,
3335
+ _content_type,
3336
+ _headers,
3337
+ _host_index,
3338
+ ) -> RequestSerialized:
3339
+
3340
+ _host = None
3341
+
3342
+ _collection_formats: Dict[str, str] = {
3343
+ }
3344
+
3345
+ _path_params: Dict[str, str] = {}
3346
+ _query_params: List[Tuple[str, str]] = []
3347
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3348
+ _form_params: List[Tuple[str, str]] = []
3349
+ _files: Dict[
3350
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3351
+ ] = {}
3352
+ _body_params: Optional[bytes] = None
3353
+
3354
+ # process the path parameters
3355
+ if conversation_id is not None:
3356
+ _path_params['conversation_id'] = conversation_id
3357
+ # process the query parameters
3358
+ # process the header parameters
3359
+ if q_answer_api_key is not None:
3360
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
3361
+ # process the form parameters
3362
+ # process the body parameter
3363
+ if ai_excel_template_update is not None:
3364
+ _body_params = ai_excel_template_update
3365
+
3366
+
3367
+ # set the HTTP header `Accept`
3368
+ if 'Accept' not in _header_params:
3369
+ _header_params['Accept'] = self.api_client.select_header_accept(
3370
+ [
3371
+ 'application/json'
3372
+ ]
3373
+ )
3374
+
3375
+ # set the HTTP header `Content-Type`
3376
+ if _content_type:
3377
+ _header_params['Content-Type'] = _content_type
3378
+ else:
3379
+ _default_content_type = (
3380
+ self.api_client.select_header_content_type(
3381
+ [
3382
+ 'application/json'
3383
+ ]
3384
+ )
3385
+ )
3386
+ if _default_content_type is not None:
3387
+ _header_params['Content-Type'] = _default_content_type
3388
+
3389
+ # authentication setting
3390
+ _auth_settings: List[str] = [
3391
+ 'QAnswer-Api-Key',
3392
+ 'Bearer token'
3393
+ ]
3394
+
3395
+ return self.api_client.param_serialize(
3396
+ method='PUT',
3397
+ resource_path='/api/tasks/ai-excel/templates/{conversation_id}',
3398
+ path_params=_path_params,
3399
+ query_params=_query_params,
3400
+ header_params=_header_params,
3401
+ body=_body_params,
3402
+ post_params=_form_params,
3403
+ files=_files,
3404
+ auth_settings=_auth_settings,
3405
+ collection_formats=_collection_formats,
3406
+ _host=_host,
3407
+ _request_auth=_request_auth
3408
+ )
3409
+
3410
+
3411
+
3412
+
3413
+ @validate_call
3414
+ def update_ai_excel_template_task_settings(
3415
+ self,
3416
+ conversation_id: StrictStr,
3417
+ username: StrictStr,
3418
+ dataset: StrictStr,
3419
+ ai_excel_template_settings_request: AIExcelTemplateSettingsRequest,
3420
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
3421
+ _request_timeout: Union[
3422
+ None,
3423
+ Annotated[StrictFloat, Field(gt=0)],
3424
+ Tuple[
3425
+ Annotated[StrictFloat, Field(gt=0)],
3426
+ Annotated[StrictFloat, Field(gt=0)]
3427
+ ]
3428
+ ] = None,
3429
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3430
+ _content_type: Optional[StrictStr] = None,
3431
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3432
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3433
+ ) -> AIExcelTaskSettings:
3434
+ """Update Ai Excel Template Task Settings
3435
+
3436
+
3437
+ :param conversation_id: (required)
3438
+ :type conversation_id: str
3439
+ :param username: (required)
3440
+ :type username: str
3441
+ :param dataset: (required)
3442
+ :type dataset: str
3443
+ :param ai_excel_template_settings_request: (required)
3444
+ :type ai_excel_template_settings_request: AIExcelTemplateSettingsRequest
3445
+ :param q_answer_api_key: Optional QAnswer API key
3446
+ :type q_answer_api_key: str
3447
+ :param _request_timeout: timeout setting for this request. If one
3448
+ number provided, it will be total request
3449
+ timeout. It can also be a pair (tuple) of
3450
+ (connection, read) timeouts.
3451
+ :type _request_timeout: int, tuple(int, int), optional
3452
+ :param _request_auth: set to override the auth_settings for an a single
3453
+ request; this effectively ignores the
3454
+ authentication in the spec for a single request.
3455
+ :type _request_auth: dict, optional
3456
+ :param _content_type: force content-type for the request.
3457
+ :type _content_type: str, Optional
3458
+ :param _headers: set to override the headers for a single
3459
+ request; this effectively ignores the headers
3460
+ in the spec for a single request.
3461
+ :type _headers: dict, optional
3462
+ :param _host_index: set to override the host_index for a single
3463
+ request; this effectively ignores the host_index
3464
+ in the spec for a single request.
3465
+ :type _host_index: int, optional
3466
+ :return: Returns the result object.
3467
+ """ # noqa: E501
3468
+
3469
+ _param = self._update_ai_excel_template_task_settings_serialize(
3470
+ conversation_id=conversation_id,
3471
+ username=username,
3472
+ dataset=dataset,
3473
+ ai_excel_template_settings_request=ai_excel_template_settings_request,
3474
+ q_answer_api_key=q_answer_api_key,
3475
+ _request_auth=_request_auth,
3476
+ _content_type=_content_type,
3477
+ _headers=_headers,
3478
+ _host_index=_host_index
3479
+ )
3480
+
3481
+ _response_types_map: Dict[str, Optional[str]] = {
3482
+ '200': "AIExcelTaskSettings",
3483
+ '422': "HTTPValidationError",
3484
+ }
3485
+ response_data = self.api_client.call_api(
3486
+ *_param,
3487
+ _request_timeout=_request_timeout
3488
+ )
3489
+ response_data.read()
3490
+ return self.api_client.response_deserialize(
3491
+ response_data=response_data,
3492
+ response_types_map=_response_types_map,
3493
+ ).data
3494
+
3495
+
3496
+ @validate_call
3497
+ def update_ai_excel_template_task_settings_with_http_info(
3498
+ self,
3499
+ conversation_id: StrictStr,
3500
+ username: StrictStr,
3501
+ dataset: StrictStr,
3502
+ ai_excel_template_settings_request: AIExcelTemplateSettingsRequest,
3503
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
3504
+ _request_timeout: Union[
3505
+ None,
3506
+ Annotated[StrictFloat, Field(gt=0)],
3507
+ Tuple[
3508
+ Annotated[StrictFloat, Field(gt=0)],
3509
+ Annotated[StrictFloat, Field(gt=0)]
3510
+ ]
3511
+ ] = None,
3512
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3513
+ _content_type: Optional[StrictStr] = None,
3514
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3515
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3516
+ ) -> ApiResponse[AIExcelTaskSettings]:
3517
+ """Update Ai Excel Template Task Settings
3518
+
3519
+
3520
+ :param conversation_id: (required)
3521
+ :type conversation_id: str
3522
+ :param username: (required)
3523
+ :type username: str
3524
+ :param dataset: (required)
3525
+ :type dataset: str
3526
+ :param ai_excel_template_settings_request: (required)
3527
+ :type ai_excel_template_settings_request: AIExcelTemplateSettingsRequest
3528
+ :param q_answer_api_key: Optional QAnswer API key
3529
+ :type q_answer_api_key: str
3530
+ :param _request_timeout: timeout setting for this request. If one
3531
+ number provided, it will be total request
3532
+ timeout. It can also be a pair (tuple) of
3533
+ (connection, read) timeouts.
3534
+ :type _request_timeout: int, tuple(int, int), optional
3535
+ :param _request_auth: set to override the auth_settings for an a single
3536
+ request; this effectively ignores the
3537
+ authentication in the spec for a single request.
3538
+ :type _request_auth: dict, optional
3539
+ :param _content_type: force content-type for the request.
3540
+ :type _content_type: str, Optional
3541
+ :param _headers: set to override the headers for a single
3542
+ request; this effectively ignores the headers
3543
+ in the spec for a single request.
3544
+ :type _headers: dict, optional
3545
+ :param _host_index: set to override the host_index for a single
3546
+ request; this effectively ignores the host_index
3547
+ in the spec for a single request.
3548
+ :type _host_index: int, optional
3549
+ :return: Returns the result object.
3550
+ """ # noqa: E501
3551
+
3552
+ _param = self._update_ai_excel_template_task_settings_serialize(
3553
+ conversation_id=conversation_id,
3554
+ username=username,
3555
+ dataset=dataset,
3556
+ ai_excel_template_settings_request=ai_excel_template_settings_request,
3557
+ q_answer_api_key=q_answer_api_key,
3558
+ _request_auth=_request_auth,
3559
+ _content_type=_content_type,
3560
+ _headers=_headers,
3561
+ _host_index=_host_index
3562
+ )
3563
+
3564
+ _response_types_map: Dict[str, Optional[str]] = {
3565
+ '200': "AIExcelTaskSettings",
3566
+ '422': "HTTPValidationError",
3567
+ }
3568
+ response_data = self.api_client.call_api(
3569
+ *_param,
3570
+ _request_timeout=_request_timeout
3571
+ )
3572
+ response_data.read()
3573
+ return self.api_client.response_deserialize(
3574
+ response_data=response_data,
3575
+ response_types_map=_response_types_map,
3576
+ )
3577
+
3578
+
3579
+ @validate_call
3580
+ def update_ai_excel_template_task_settings_without_preload_content(
3581
+ self,
3582
+ conversation_id: StrictStr,
3583
+ username: StrictStr,
3584
+ dataset: StrictStr,
3585
+ ai_excel_template_settings_request: AIExcelTemplateSettingsRequest,
3586
+ q_answer_api_key: Annotated[Optional[StrictStr], Field(description="Optional QAnswer API key")] = None,
3587
+ _request_timeout: Union[
3588
+ None,
3589
+ Annotated[StrictFloat, Field(gt=0)],
3590
+ Tuple[
3591
+ Annotated[StrictFloat, Field(gt=0)],
3592
+ Annotated[StrictFloat, Field(gt=0)]
3593
+ ]
3594
+ ] = None,
3595
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3596
+ _content_type: Optional[StrictStr] = None,
3597
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3598
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3599
+ ) -> RESTResponseType:
3600
+ """Update Ai Excel Template Task Settings
3601
+
3602
+
3603
+ :param conversation_id: (required)
3604
+ :type conversation_id: str
3605
+ :param username: (required)
3606
+ :type username: str
3607
+ :param dataset: (required)
3608
+ :type dataset: str
3609
+ :param ai_excel_template_settings_request: (required)
3610
+ :type ai_excel_template_settings_request: AIExcelTemplateSettingsRequest
3611
+ :param q_answer_api_key: Optional QAnswer API key
3612
+ :type q_answer_api_key: str
3613
+ :param _request_timeout: timeout setting for this request. If one
3614
+ number provided, it will be total request
3615
+ timeout. It can also be a pair (tuple) of
3616
+ (connection, read) timeouts.
3617
+ :type _request_timeout: int, tuple(int, int), optional
3618
+ :param _request_auth: set to override the auth_settings for an a single
3619
+ request; this effectively ignores the
3620
+ authentication in the spec for a single request.
3621
+ :type _request_auth: dict, optional
3622
+ :param _content_type: force content-type for the request.
3623
+ :type _content_type: str, Optional
3624
+ :param _headers: set to override the headers for a single
3625
+ request; this effectively ignores the headers
3626
+ in the spec for a single request.
3627
+ :type _headers: dict, optional
3628
+ :param _host_index: set to override the host_index for a single
3629
+ request; this effectively ignores the host_index
3630
+ in the spec for a single request.
3631
+ :type _host_index: int, optional
3632
+ :return: Returns the result object.
3633
+ """ # noqa: E501
3634
+
3635
+ _param = self._update_ai_excel_template_task_settings_serialize(
3636
+ conversation_id=conversation_id,
3637
+ username=username,
3638
+ dataset=dataset,
3639
+ ai_excel_template_settings_request=ai_excel_template_settings_request,
3640
+ q_answer_api_key=q_answer_api_key,
3641
+ _request_auth=_request_auth,
3642
+ _content_type=_content_type,
3643
+ _headers=_headers,
3644
+ _host_index=_host_index
3645
+ )
3646
+
3647
+ _response_types_map: Dict[str, Optional[str]] = {
3648
+ '200': "AIExcelTaskSettings",
3649
+ '422': "HTTPValidationError",
3650
+ }
3651
+ response_data = self.api_client.call_api(
3652
+ *_param,
3653
+ _request_timeout=_request_timeout
3654
+ )
3655
+ return response_data.response
3656
+
3657
+
3658
+ def _update_ai_excel_template_task_settings_serialize(
3659
+ self,
3660
+ conversation_id,
3661
+ username,
3662
+ dataset,
3663
+ ai_excel_template_settings_request,
3664
+ q_answer_api_key,
3665
+ _request_auth,
3666
+ _content_type,
3667
+ _headers,
3668
+ _host_index,
3669
+ ) -> RequestSerialized:
3670
+
3671
+ _host = None
3672
+
3673
+ _collection_formats: Dict[str, str] = {
3674
+ }
3675
+
3676
+ _path_params: Dict[str, str] = {}
3677
+ _query_params: List[Tuple[str, str]] = []
3678
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3679
+ _form_params: List[Tuple[str, str]] = []
3680
+ _files: Dict[
3681
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3682
+ ] = {}
3683
+ _body_params: Optional[bytes] = None
3684
+
3685
+ # process the path parameters
3686
+ if conversation_id is not None:
3687
+ _path_params['conversation_id'] = conversation_id
3688
+ # process the query parameters
3689
+ if username is not None:
3690
+
3691
+ _query_params.append(('username', username))
3692
+
3693
+ if dataset is not None:
3694
+
3695
+ _query_params.append(('dataset', dataset))
3696
+
3697
+ # process the header parameters
3698
+ if q_answer_api_key is not None:
3699
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
3700
+ # process the form parameters
3701
+ # process the body parameter
3702
+ if ai_excel_template_settings_request is not None:
3703
+ _body_params = ai_excel_template_settings_request
3704
+
3705
+
3706
+ # set the HTTP header `Accept`
3707
+ if 'Accept' not in _header_params:
3708
+ _header_params['Accept'] = self.api_client.select_header_accept(
3709
+ [
3710
+ 'application/json'
3711
+ ]
3712
+ )
3713
+
3714
+ # set the HTTP header `Content-Type`
3715
+ if _content_type:
3716
+ _header_params['Content-Type'] = _content_type
3717
+ else:
3718
+ _default_content_type = (
3719
+ self.api_client.select_header_content_type(
3720
+ [
3721
+ 'application/json'
3722
+ ]
3723
+ )
3724
+ )
3725
+ if _default_content_type is not None:
3726
+ _header_params['Content-Type'] = _default_content_type
3727
+
3728
+ # authentication setting
3729
+ _auth_settings: List[str] = [
3730
+ 'QAnswer-Api-Key',
3731
+ 'Bearer token'
3732
+ ]
3733
+
3734
+ return self.api_client.param_serialize(
3735
+ method='PUT',
3736
+ resource_path='/api/tasks/ai-excel/templates/{conversation_id}/settings',
3737
+ path_params=_path_params,
3738
+ query_params=_query_params,
3739
+ header_params=_header_params,
3740
+ body=_body_params,
3741
+ post_params=_form_params,
3742
+ files=_files,
3743
+ auth_settings=_auth_settings,
3744
+ collection_formats=_collection_formats,
3745
+ _host=_host,
3746
+ _request_auth=_request_auth
3747
+ )
3748
+
3749
+