qanswer_sdk 3.1193.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. qanswer_sdk/__init__.py +366 -0
  2. qanswer_sdk/api/__init__.py +47 -0
  3. qanswer_sdk/api/admin_api.py +11207 -0
  4. qanswer_sdk/api/ai_assistant_access_rights_api.py +5331 -0
  5. qanswer_sdk/api/ai_assistant_api.py +4377 -0
  6. qanswer_sdk/api/bot_slack_api.py +814 -0
  7. qanswer_sdk/api/chat_completion_api.py +309 -0
  8. qanswer_sdk/api/chatbot_api.py +1091 -0
  9. qanswer_sdk/api/connector_document_api.py +1406 -0
  10. qanswer_sdk/api/connector_e_consilium_api.py +326 -0
  11. qanswer_sdk/api/connector_e_consilium_search_index_connector_api.py +1215 -0
  12. qanswer_sdk/api/connector_google_drive_api.py +1870 -0
  13. qanswer_sdk/api/connector_one_drive_api.py +1559 -0
  14. qanswer_sdk/api/connector_onenote_api.py +1576 -0
  15. qanswer_sdk/api/connector_pinecone_api.py +892 -0
  16. qanswer_sdk/api/connector_publication_office_controller_api.py +1215 -0
  17. qanswer_sdk/api/connector_qn_a_api.py +1538 -0
  18. qanswer_sdk/api/connector_rdf_answer_api.py +1445 -0
  19. qanswer_sdk/api/connector_rdf_api.py +5318 -0
  20. qanswer_sdk/api/connector_sharepoint_api.py +2584 -0
  21. qanswer_sdk/api/connector_websearch_api.py +326 -0
  22. qanswer_sdk/api/connector_website_api.py +2068 -0
  23. qanswer_sdk/api/connectors_api.py +1497 -0
  24. qanswer_sdk/api/connectors_data_api.py +3697 -0
  25. qanswer_sdk/api/conversation_logs_api.py +6668 -0
  26. qanswer_sdk/api/dataset_config_api.py +2178 -0
  27. qanswer_sdk/api/debug_api.py +282 -0
  28. qanswer_sdk/api/llm_api.py +563 -0
  29. qanswer_sdk/api/llm_consumption_controller_api.py +310 -0
  30. qanswer_sdk/api/organizations_teams_api.py +8465 -0
  31. qanswer_sdk/api/payment_api.py +1546 -0
  32. qanswer_sdk/api/socket_api.py +2975 -0
  33. qanswer_sdk/api/speech_to_text_api.py +734 -0
  34. qanswer_sdk/api/tag_api.py +2396 -0
  35. qanswer_sdk/api/task_chat_api.py +2064 -0
  36. qanswer_sdk/api/task_rdf_linker_api.py +4382 -0
  37. qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3522 -0
  38. qanswer_sdk/api/task_rdf_text_linker_api.py +1346 -0
  39. qanswer_sdk/api/task_relation_extraction_api.py +2977 -0
  40. qanswer_sdk/api/task_report_copilot_api.py +2980 -0
  41. qanswer_sdk/api/task_search_api.py +1784 -0
  42. qanswer_sdk/api/task_sparql2text_api.py +326 -0
  43. qanswer_sdk/api/task_text2sparql_api.py +908 -0
  44. qanswer_sdk/api/task_text_classification_api.py +914 -0
  45. qanswer_sdk/api/user_api.py +7098 -0
  46. qanswer_sdk/api_client.py +797 -0
  47. qanswer_sdk/api_response.py +21 -0
  48. qanswer_sdk/configuration.py +487 -0
  49. qanswer_sdk/exceptions.py +199 -0
  50. qanswer_sdk/models/__init__.py +307 -0
  51. qanswer_sdk/models/access_pdf_payload_model.py +109 -0
  52. qanswer_sdk/models/add_qn_a_request.py +103 -0
  53. qanswer_sdk/models/add_synonyms.py +91 -0
  54. qanswer_sdk/models/add_synonyms_resp.py +89 -0
  55. qanswer_sdk/models/aggregate.py +97 -0
  56. qanswer_sdk/models/aggregation.py +112 -0
  57. qanswer_sdk/models/aggregations_group.py +102 -0
  58. qanswer_sdk/models/ai_assistant_dto.py +103 -0
  59. qanswer_sdk/models/ai_assistant_shared_access.py +113 -0
  60. qanswer_sdk/models/allowed_file_extensions.py +98 -0
  61. qanswer_sdk/models/api_response.py +87 -0
  62. qanswer_sdk/models/applied_metadata_filter.py +98 -0
  63. qanswer_sdk/models/assistant_message_stop.py +93 -0
  64. qanswer_sdk/models/auth_link_response.py +91 -0
  65. qanswer_sdk/models/autocompletion_config.py +93 -0
  66. qanswer_sdk/models/available_connectors_response.py +99 -0
  67. qanswer_sdk/models/available_embedding_models_response.py +95 -0
  68. qanswer_sdk/models/available_endpoints_response.py +95 -0
  69. qanswer_sdk/models/available_logs_visibility_policy.py +103 -0
  70. qanswer_sdk/models/available_space_quota_for_dataset.py +91 -0
  71. qanswer_sdk/models/available_storage_preference.py +103 -0
  72. qanswer_sdk/models/base_connectors_response.py +89 -0
  73. qanswer_sdk/models/base_conversation_response.py +89 -0
  74. qanswer_sdk/models/base_feedback_response.py +89 -0
  75. qanswer_sdk/models/branding_data.py +87 -0
  76. qanswer_sdk/models/cell.py +89 -0
  77. qanswer_sdk/models/change_password.py +89 -0
  78. qanswer_sdk/models/change_password_admin.py +89 -0
  79. qanswer_sdk/models/change_role.py +96 -0
  80. qanswer_sdk/models/chat_task_settings.py +135 -0
  81. qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
  82. qanswer_sdk/models/chat_task_update.py +129 -0
  83. qanswer_sdk/models/chatbot_chat_payload.py +115 -0
  84. qanswer_sdk/models/chatbot_conversation_model.py +141 -0
  85. qanswer_sdk/models/chatbot_response.py +119 -0
  86. qanswer_sdk/models/check_mode_response.py +100 -0
  87. qanswer_sdk/models/class_info.py +89 -0
  88. qanswer_sdk/models/connector_model.py +112 -0
  89. qanswer_sdk/models/content_item.py +130 -0
  90. qanswer_sdk/models/conversation_message.py +186 -0
  91. qanswer_sdk/models/conversation_model.py +131 -0
  92. qanswer_sdk/models/conversation_statistics.py +95 -0
  93. qanswer_sdk/models/conversation_update.py +93 -0
  94. qanswer_sdk/models/conversation_users_stats.py +99 -0
  95. qanswer_sdk/models/conversation_users_stats_response.py +99 -0
  96. qanswer_sdk/models/coordinates.py +89 -0
  97. qanswer_sdk/models/cost_summary.py +99 -0
  98. qanswer_sdk/models/create_connector_request.py +93 -0
  99. qanswer_sdk/models/create_connector_response.py +95 -0
  100. qanswer_sdk/models/create_pinecone_connector_request.py +95 -0
  101. qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +103 -0
  102. qanswer_sdk/models/create_sharepoint_connector_request.py +101 -0
  103. qanswer_sdk/models/dataset_config_request.py +187 -0
  104. qanswer_sdk/models/dataset_default_values_model.py +141 -0
  105. qanswer_sdk/models/dataset_description.py +91 -0
  106. qanswer_sdk/models/dataset_detail.py +133 -0
  107. qanswer_sdk/models/dataset_detail_kg.py +158 -0
  108. qanswer_sdk/models/dataset_schema.py +207 -0
  109. qanswer_sdk/models/dataset_update_object.py +195 -0
  110. qanswer_sdk/models/dataset_users_response.py +87 -0
  111. qanswer_sdk/models/default_prompt.py +106 -0
  112. qanswer_sdk/models/delete_connector_model.py +96 -0
  113. qanswer_sdk/models/delete_connector_request.py +99 -0
  114. qanswer_sdk/models/delete_connectors_response.py +91 -0
  115. qanswer_sdk/models/delete_qn_a_pair_request.py +95 -0
  116. qanswer_sdk/models/delete_qn_a_pair_response.py +89 -0
  117. qanswer_sdk/models/delete_synonym.py +91 -0
  118. qanswer_sdk/models/delete_synonym_resp.py +89 -0
  119. qanswer_sdk/models/diarization_segment.py +93 -0
  120. qanswer_sdk/models/document_content_response.py +91 -0
  121. qanswer_sdk/models/document_content_update_model.py +95 -0
  122. qanswer_sdk/models/document_file_delete_by_connector_model.py +99 -0
  123. qanswer_sdk/models/document_metadata.py +107 -0
  124. qanswer_sdk/models/document_metadata_list_wrapper.py +95 -0
  125. qanswer_sdk/models/document_status_response.py +89 -0
  126. qanswer_sdk/models/e_consilium_search_index_search_response.py +113 -0
  127. qanswer_sdk/models/econsilium_file_metadata.py +105 -0
  128. qanswer_sdk/models/econsilium_search_index_add_payload.py +105 -0
  129. qanswer_sdk/models/econsilium_search_index_additional_fields.py +101 -0
  130. qanswer_sdk/models/email_request.py +87 -0
  131. qanswer_sdk/models/embedding_endpoint.py +139 -0
  132. qanswer_sdk/models/embedding_endpoint_create.py +137 -0
  133. qanswer_sdk/models/embedding_endpoint_update.py +131 -0
  134. qanswer_sdk/models/embedding_endpoint_validation_response.py +96 -0
  135. qanswer_sdk/models/embedding_model.py +96 -0
  136. qanswer_sdk/models/entity.py +97 -0
  137. qanswer_sdk/models/entity_linker_response.py +99 -0
  138. qanswer_sdk/models/entity_model.py +99 -0
  139. qanswer_sdk/models/extra_body.py +91 -0
  140. qanswer_sdk/models/extract_hyper_links_payload.py +102 -0
  141. qanswer_sdk/models/extract_robot_links_payload.py +88 -0
  142. qanswer_sdk/models/extract_robot_links_response.py +88 -0
  143. qanswer_sdk/models/fact.py +96 -0
  144. qanswer_sdk/models/feedback_model.py +107 -0
  145. qanswer_sdk/models/feedback_update.py +103 -0
  146. qanswer_sdk/models/file_es_meta_data.py +89 -0
  147. qanswer_sdk/models/file_folder_model.py +113 -0
  148. qanswer_sdk/models/file_model.py +134 -0
  149. qanswer_sdk/models/files_by_connector_model.py +89 -0
  150. qanswer_sdk/models/format_return.py +87 -0
  151. qanswer_sdk/models/g_drive_connector_info.py +95 -0
  152. qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
  153. qanswer_sdk/models/g_drive_download_request.py +101 -0
  154. qanswer_sdk/models/generation_params.py +89 -0
  155. qanswer_sdk/models/get_connector_by_id_response.py +91 -0
  156. qanswer_sdk/models/get_conversation_response.py +95 -0
  157. qanswer_sdk/models/guardrail_endpoint.py +121 -0
  158. qanswer_sdk/models/has_lucene_index_result.py +87 -0
  159. qanswer_sdk/models/index_config.py +95 -0
  160. qanswer_sdk/models/install_response.py +89 -0
  161. qanswer_sdk/models/is_enabled_response.py +87 -0
  162. qanswer_sdk/models/is_merging_result.py +87 -0
  163. qanswer_sdk/models/json_nullable_file_failure_reason.py +87 -0
  164. qanswer_sdk/models/json_nullable_source_metadata.py +87 -0
  165. qanswer_sdk/models/jwt_authentication_response.py +93 -0
  166. qanswer_sdk/models/label.py +89 -0
  167. qanswer_sdk/models/labeled_node.py +89 -0
  168. qanswer_sdk/models/link.py +103 -0
  169. qanswer_sdk/models/link_extraction_response.py +97 -0
  170. qanswer_sdk/models/link_result_paginated.py +97 -0
  171. qanswer_sdk/models/linker.py +103 -0
  172. qanswer_sdk/models/linking_result.py +95 -0
  173. qanswer_sdk/models/links.py +99 -0
  174. qanswer_sdk/models/list_chatbot_conversation_response.py +105 -0
  175. qanswer_sdk/models/list_connectors_response.py +95 -0
  176. qanswer_sdk/models/list_conversation_response.py +105 -0
  177. qanswer_sdk/models/list_feedback_response.py +105 -0
  178. qanswer_sdk/models/list_files_connector_response.py +101 -0
  179. qanswer_sdk/models/list_socket_events.py +95 -0
  180. qanswer_sdk/models/list_synonyms_model.py +89 -0
  181. qanswer_sdk/models/llm_context_ranges_response.py +93 -0
  182. qanswer_sdk/models/llm_cost.py +108 -0
  183. qanswer_sdk/models/llm_details.py +111 -0
  184. qanswer_sdk/models/llm_endpoint.py +167 -0
  185. qanswer_sdk/models/llm_endpoint_create.py +165 -0
  186. qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
  187. qanswer_sdk/models/llm_endpoint_update.py +163 -0
  188. qanswer_sdk/models/llm_endpoint_validation_response.py +96 -0
  189. qanswer_sdk/models/login_request.py +89 -0
  190. qanswer_sdk/models/logo.py +89 -0
  191. qanswer_sdk/models/lucene_index_request_result.py +87 -0
  192. qanswer_sdk/models/merge_request_result.py +87 -0
  193. qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
  194. qanswer_sdk/models/modify_connector_request.py +111 -0
  195. qanswer_sdk/models/o_auth_service.py +89 -0
  196. qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
  197. qanswer_sdk/models/one_drive_download_request.py +101 -0
  198. qanswer_sdk/models/one_note_download_by_ids.py +91 -0
  199. qanswer_sdk/models/one_note_download_request.py +101 -0
  200. qanswer_sdk/models/organization.py +93 -0
  201. qanswer_sdk/models/organization_creation.py +91 -0
  202. qanswer_sdk/models/organization_filter.py +87 -0
  203. qanswer_sdk/models/organization_shared.py +105 -0
  204. qanswer_sdk/models/page_organization.py +123 -0
  205. qanswer_sdk/models/page_team_with_count.py +123 -0
  206. qanswer_sdk/models/pageable.py +92 -0
  207. qanswer_sdk/models/pageable_object.py +101 -0
  208. qanswer_sdk/models/password.py +89 -0
  209. qanswer_sdk/models/pinecone_index_model.py +91 -0
  210. qanswer_sdk/models/plan.py +123 -0
  211. qanswer_sdk/models/predicted_class.py +89 -0
  212. qanswer_sdk/models/prompt_token_count_details.py +99 -0
  213. qanswer_sdk/models/provider.py +87 -0
  214. qanswer_sdk/models/publication_add_payload.py +103 -0
  215. qanswer_sdk/models/publication_file_metadata.py +105 -0
  216. qanswer_sdk/models/publication_office_additional_fields.py +111 -0
  217. qanswer_sdk/models/publication_search_index_search_response.py +113 -0
  218. qanswer_sdk/models/qa_context.py +129 -0
  219. qanswer_sdk/models/qa_contexts.py +116 -0
  220. qanswer_sdk/models/qa_metadata_payload.py +123 -0
  221. qanswer_sdk/models/qa_table.py +102 -0
  222. qanswer_sdk/models/qn_a_pair_model.py +103 -0
  223. qanswer_sdk/models/qn_a_pair_response.py +95 -0
  224. qanswer_sdk/models/question_completion.py +89 -0
  225. qanswer_sdk/models/rag_params.py +89 -0
  226. qanswer_sdk/models/rag_payload.py +154 -0
  227. qanswer_sdk/models/rag_response.py +150 -0
  228. qanswer_sdk/models/ranker_config.py +93 -0
  229. qanswer_sdk/models/reference_model.py +95 -0
  230. qanswer_sdk/models/refresh_token_request.py +87 -0
  231. qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
  232. qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
  233. qanswer_sdk/models/relation_extraction_configuration.py +105 -0
  234. qanswer_sdk/models/relation_extraction_payload.py +111 -0
  235. qanswer_sdk/models/relation_extraction_result.py +101 -0
  236. qanswer_sdk/models/relation_extraction_schema.py +101 -0
  237. qanswer_sdk/models/relation_extraction_task_settings.py +123 -0
  238. qanswer_sdk/models/relation_extraction_task_settings_update_payload.py +95 -0
  239. qanswer_sdk/models/relation_extraction_task_update.py +117 -0
  240. qanswer_sdk/models/relation_extraction_template_payload.py +97 -0
  241. qanswer_sdk/models/relation_extraction_template_update_payload.py +95 -0
  242. qanswer_sdk/models/relation_model.py +89 -0
  243. qanswer_sdk/models/report_copilot_create_payload.py +103 -0
  244. qanswer_sdk/models/report_copilot_export_template_as_docx_payload_simplified.py +91 -0
  245. qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
  246. qanswer_sdk/models/report_copilot_generation_from_slots_response.py +95 -0
  247. qanswer_sdk/models/report_copilot_refinement_payload.py +104 -0
  248. qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
  249. qanswer_sdk/models/report_copilot_slot_task_settings.py +125 -0
  250. qanswer_sdk/models/report_copilot_slot_task_update.py +119 -0
  251. qanswer_sdk/models/report_copilot_task_settings.py +123 -0
  252. qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
  253. qanswer_sdk/models/report_copilot_task_update.py +117 -0
  254. qanswer_sdk/models/report_copilot_template.py +107 -0
  255. qanswer_sdk/models/report_copilot_template_simplified.py +95 -0
  256. qanswer_sdk/models/report_copilot_update_payload.py +101 -0
  257. qanswer_sdk/models/reset_password.py +87 -0
  258. qanswer_sdk/models/response_audit_model.py +99 -0
  259. qanswer_sdk/models/response_audit_stats_response.py +101 -0
  260. qanswer_sdk/models/retreive_all_synonyms_resp.py +99 -0
  261. qanswer_sdk/models/retry_params.py +89 -0
  262. qanswer_sdk/models/role.py +99 -0
  263. qanswer_sdk/models/search_document_response.py +105 -0
  264. qanswer_sdk/models/search_index_payload.py +114 -0
  265. qanswer_sdk/models/search_metadata_filter.py +89 -0
  266. qanswer_sdk/models/search_payload.py +124 -0
  267. qanswer_sdk/models/search_response.py +113 -0
  268. qanswer_sdk/models/search_task_settings.py +131 -0
  269. qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
  270. qanswer_sdk/models/search_task_update.py +123 -0
  271. qanswer_sdk/models/set_logo1_request.py +87 -0
  272. qanswer_sdk/models/share_point_download_by_ids.py +99 -0
  273. qanswer_sdk/models/share_point_download_request.py +101 -0
  274. qanswer_sdk/models/shared_organization_access.py +109 -0
  275. qanswer_sdk/models/shared_team_access.py +107 -0
  276. qanswer_sdk/models/shared_user.py +99 -0
  277. qanswer_sdk/models/sign_up_request.py +96 -0
  278. qanswer_sdk/models/signout_request.py +87 -0
  279. qanswer_sdk/models/slot.py +138 -0
  280. qanswer_sdk/models/slot_in_prompt.py +91 -0
  281. qanswer_sdk/models/slot_update.py +138 -0
  282. qanswer_sdk/models/socket_conversation_message.py +207 -0
  283. qanswer_sdk/models/socket_data_extraction.py +109 -0
  284. qanswer_sdk/models/socket_file_metadata.py +172 -0
  285. qanswer_sdk/models/socket_join_conversation.py +97 -0
  286. qanswer_sdk/models/socket_join_dataset.py +93 -0
  287. qanswer_sdk/models/socket_report_continuation_response.py +106 -0
  288. qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +120 -0
  289. qanswer_sdk/models/socket_report_copilot_refinement_response.py +108 -0
  290. qanswer_sdk/models/socket_speech2_text_response.py +99 -0
  291. qanswer_sdk/models/socket_stop_conversation.py +97 -0
  292. qanswer_sdk/models/sort_object.py +91 -0
  293. qanswer_sdk/models/source.py +125 -0
  294. qanswer_sdk/models/sparql2_text_payload.py +97 -0
  295. qanswer_sdk/models/speech2_text_response.py +87 -0
  296. qanswer_sdk/models/speech2_text_with_diarization_response.py +106 -0
  297. qanswer_sdk/models/stat_per_date.py +89 -0
  298. qanswer_sdk/models/status_response.py +89 -0
  299. qanswer_sdk/models/subject_model.py +91 -0
  300. qanswer_sdk/models/suggestion_list_response.py +87 -0
  301. qanswer_sdk/models/summa_server.py +101 -0
  302. qanswer_sdk/models/tag_payload.py +87 -0
  303. qanswer_sdk/models/tag_qa_list_payload.py +100 -0
  304. qanswer_sdk/models/tag_qa_payload.py +91 -0
  305. qanswer_sdk/models/team.py +93 -0
  306. qanswer_sdk/models/team_creation.py +89 -0
  307. qanswer_sdk/models/team_filter.py +91 -0
  308. qanswer_sdk/models/team_shared.py +105 -0
  309. qanswer_sdk/models/team_with_count.py +95 -0
  310. qanswer_sdk/models/terms_bucket.py +89 -0
  311. qanswer_sdk/models/text2_sparql_payload.py +156 -0
  312. qanswer_sdk/models/text2_sparql_task_settings.py +123 -0
  313. qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
  314. qanswer_sdk/models/text2_sparql_task_update.py +117 -0
  315. qanswer_sdk/models/text_classification_payload.py +99 -0
  316. qanswer_sdk/models/text_classification_response.py +87 -0
  317. qanswer_sdk/models/text_classification_v2_payload.py +99 -0
  318. qanswer_sdk/models/text_classification_v2_response.py +95 -0
  319. qanswer_sdk/models/total_stat.py +96 -0
  320. qanswer_sdk/models/ui_mappings.py +141 -0
  321. qanswer_sdk/models/update_metadata_model.py +95 -0
  322. qanswer_sdk/models/update_qn_a_pair_request.py +101 -0
  323. qanswer_sdk/models/update_qn_a_pair_response.py +89 -0
  324. qanswer_sdk/models/update_synonyms.py +93 -0
  325. qanswer_sdk/models/update_synonyms_resp.py +89 -0
  326. qanswer_sdk/models/uri_mapping.py +89 -0
  327. qanswer_sdk/models/user.py +91 -0
  328. qanswer_sdk/models/user_chatbot_setting_payload.py +106 -0
  329. qanswer_sdk/models/user_chatbot_setting_response.py +105 -0
  330. qanswer_sdk/models/user_dataset.py +144 -0
  331. qanswer_sdk/models/user_dataset_api_key.py +116 -0
  332. qanswer_sdk/models/user_filter.py +101 -0
  333. qanswer_sdk/models/user_identity_availability.py +87 -0
  334. qanswer_sdk/models/user_list_dto.py +101 -0
  335. qanswer_sdk/models/user_oauth_token.py +96 -0
  336. qanswer_sdk/models/user_profile.py +184 -0
  337. qanswer_sdk/models/user_profile_list_dto.py +101 -0
  338. qanswer_sdk/models/user_profile_paginated.py +101 -0
  339. qanswer_sdk/models/website_add_payload.py +98 -0
  340. qanswer_sdk/models/website_connector_settings.py +160 -0
  341. qanswer_sdk/models/widget_configs.py +105 -0
  342. qanswer_sdk/py.typed +0 -0
  343. qanswer_sdk/rest.py +257 -0
  344. qanswer_sdk-3.1193.0.dist-info/METADATA +125 -0
  345. qanswer_sdk-3.1193.0.dist-info/RECORD +346 -0
  346. qanswer_sdk-3.1193.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,4377 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ QAnswer: Api Documentation
5
+
6
+ APIs provided by QAnswer
7
+
8
+ The version of the OpenAPI document: 1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBool, StrictBytes, StrictFloat, StrictInt, StrictStr
20
+ from typing import List, Optional, Tuple, Union
21
+ from typing_extensions import Annotated
22
+ from qanswer_sdk.models.ai_assistant_dto import AiAssistantDto
23
+ from qanswer_sdk.models.api_response import ApiResponse
24
+ from qanswer_sdk.models.available_space_quota_for_dataset import AvailableSpaceQuotaForDataset
25
+ from qanswer_sdk.models.dataset_description import DatasetDescription
26
+ from qanswer_sdk.models.dataset_detail import DatasetDetail
27
+ from qanswer_sdk.models.dataset_schema import DatasetSchema
28
+ from qanswer_sdk.models.dataset_update_object import DatasetUpdateObject
29
+ from qanswer_sdk.models.dataset_users_response import DatasetUsersResponse
30
+ from qanswer_sdk.models.default_prompt import DefaultPrompt
31
+
32
+ from qanswer_sdk.api_client import ApiClient, RequestSerialized
33
+ from qanswer_sdk.api_response import ApiResponse
34
+ from qanswer_sdk.rest import RESTResponseType
35
+
36
+
37
+ class AiAssistantApi:
38
+ """NOTE: This class is auto generated by OpenAPI Generator
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+ """
43
+
44
+ def __init__(self, api_client=None) -> None:
45
+ if api_client is None:
46
+ api_client = ApiClient.get_default()
47
+ self.api_client = api_client
48
+
49
+
50
+ @validate_call
51
+ def available_quota_for_dataset(
52
+ self,
53
+ username: StrictStr,
54
+ dataset: StrictStr,
55
+ q_answer_api_key: Optional[StrictStr] = None,
56
+ _request_timeout: Union[
57
+ None,
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Tuple[
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Annotated[StrictFloat, Field(gt=0)]
62
+ ]
63
+ ] = None,
64
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
65
+ _content_type: Optional[StrictStr] = None,
66
+ _headers: Optional[Dict[StrictStr, Any]] = None,
67
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
68
+ ) -> AvailableSpaceQuotaForDataset:
69
+ """How much quota is still available for a dataset
70
+
71
+
72
+ :param username: (required)
73
+ :type username: str
74
+ :param dataset: (required)
75
+ :type dataset: str
76
+ :param q_answer_api_key:
77
+ :type q_answer_api_key: str
78
+ :param _request_timeout: timeout setting for this request. If one
79
+ number provided, it will be total request
80
+ timeout. It can also be a pair (tuple) of
81
+ (connection, read) timeouts.
82
+ :type _request_timeout: int, tuple(int, int), optional
83
+ :param _request_auth: set to override the auth_settings for an a single
84
+ request; this effectively ignores the
85
+ authentication in the spec for a single request.
86
+ :type _request_auth: dict, optional
87
+ :param _content_type: force content-type for the request.
88
+ :type _content_type: str, Optional
89
+ :param _headers: set to override the headers for a single
90
+ request; this effectively ignores the headers
91
+ in the spec for a single request.
92
+ :type _headers: dict, optional
93
+ :param _host_index: set to override the host_index for a single
94
+ request; this effectively ignores the host_index
95
+ in the spec for a single request.
96
+ :type _host_index: int, optional
97
+ :return: Returns the result object.
98
+ """ # noqa: E501
99
+
100
+ _param = self._available_quota_for_dataset_serialize(
101
+ username=username,
102
+ dataset=dataset,
103
+ q_answer_api_key=q_answer_api_key,
104
+ _request_auth=_request_auth,
105
+ _content_type=_content_type,
106
+ _headers=_headers,
107
+ _host_index=_host_index
108
+ )
109
+
110
+ _response_types_map: Dict[str, Optional[str]] = {
111
+ '200': "AvailableSpaceQuotaForDataset",
112
+ }
113
+ response_data = self.api_client.call_api(
114
+ *_param,
115
+ _request_timeout=_request_timeout
116
+ )
117
+ response_data.read()
118
+ return self.api_client.response_deserialize(
119
+ response_data=response_data,
120
+ response_types_map=_response_types_map,
121
+ ).data
122
+
123
+
124
+ @validate_call
125
+ def available_quota_for_dataset_with_http_info(
126
+ self,
127
+ username: StrictStr,
128
+ dataset: StrictStr,
129
+ q_answer_api_key: Optional[StrictStr] = None,
130
+ _request_timeout: Union[
131
+ None,
132
+ Annotated[StrictFloat, Field(gt=0)],
133
+ Tuple[
134
+ Annotated[StrictFloat, Field(gt=0)],
135
+ Annotated[StrictFloat, Field(gt=0)]
136
+ ]
137
+ ] = None,
138
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
139
+ _content_type: Optional[StrictStr] = None,
140
+ _headers: Optional[Dict[StrictStr, Any]] = None,
141
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
142
+ ) -> ApiResponse[AvailableSpaceQuotaForDataset]:
143
+ """How much quota is still available for a dataset
144
+
145
+
146
+ :param username: (required)
147
+ :type username: str
148
+ :param dataset: (required)
149
+ :type dataset: str
150
+ :param q_answer_api_key:
151
+ :type q_answer_api_key: str
152
+ :param _request_timeout: timeout setting for this request. If one
153
+ number provided, it will be total request
154
+ timeout. It can also be a pair (tuple) of
155
+ (connection, read) timeouts.
156
+ :type _request_timeout: int, tuple(int, int), optional
157
+ :param _request_auth: set to override the auth_settings for an a single
158
+ request; this effectively ignores the
159
+ authentication in the spec for a single request.
160
+ :type _request_auth: dict, optional
161
+ :param _content_type: force content-type for the request.
162
+ :type _content_type: str, Optional
163
+ :param _headers: set to override the headers for a single
164
+ request; this effectively ignores the headers
165
+ in the spec for a single request.
166
+ :type _headers: dict, optional
167
+ :param _host_index: set to override the host_index for a single
168
+ request; this effectively ignores the host_index
169
+ in the spec for a single request.
170
+ :type _host_index: int, optional
171
+ :return: Returns the result object.
172
+ """ # noqa: E501
173
+
174
+ _param = self._available_quota_for_dataset_serialize(
175
+ username=username,
176
+ dataset=dataset,
177
+ q_answer_api_key=q_answer_api_key,
178
+ _request_auth=_request_auth,
179
+ _content_type=_content_type,
180
+ _headers=_headers,
181
+ _host_index=_host_index
182
+ )
183
+
184
+ _response_types_map: Dict[str, Optional[str]] = {
185
+ '200': "AvailableSpaceQuotaForDataset",
186
+ }
187
+ response_data = self.api_client.call_api(
188
+ *_param,
189
+ _request_timeout=_request_timeout
190
+ )
191
+ response_data.read()
192
+ return self.api_client.response_deserialize(
193
+ response_data=response_data,
194
+ response_types_map=_response_types_map,
195
+ )
196
+
197
+
198
+ @validate_call
199
+ def available_quota_for_dataset_without_preload_content(
200
+ self,
201
+ username: StrictStr,
202
+ dataset: StrictStr,
203
+ q_answer_api_key: Optional[StrictStr] = None,
204
+ _request_timeout: Union[
205
+ None,
206
+ Annotated[StrictFloat, Field(gt=0)],
207
+ Tuple[
208
+ Annotated[StrictFloat, Field(gt=0)],
209
+ Annotated[StrictFloat, Field(gt=0)]
210
+ ]
211
+ ] = None,
212
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
213
+ _content_type: Optional[StrictStr] = None,
214
+ _headers: Optional[Dict[StrictStr, Any]] = None,
215
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
216
+ ) -> RESTResponseType:
217
+ """How much quota is still available for a dataset
218
+
219
+
220
+ :param username: (required)
221
+ :type username: str
222
+ :param dataset: (required)
223
+ :type dataset: str
224
+ :param q_answer_api_key:
225
+ :type q_answer_api_key: str
226
+ :param _request_timeout: timeout setting for this request. If one
227
+ number provided, it will be total request
228
+ timeout. It can also be a pair (tuple) of
229
+ (connection, read) timeouts.
230
+ :type _request_timeout: int, tuple(int, int), optional
231
+ :param _request_auth: set to override the auth_settings for an a single
232
+ request; this effectively ignores the
233
+ authentication in the spec for a single request.
234
+ :type _request_auth: dict, optional
235
+ :param _content_type: force content-type for the request.
236
+ :type _content_type: str, Optional
237
+ :param _headers: set to override the headers for a single
238
+ request; this effectively ignores the headers
239
+ in the spec for a single request.
240
+ :type _headers: dict, optional
241
+ :param _host_index: set to override the host_index for a single
242
+ request; this effectively ignores the host_index
243
+ in the spec for a single request.
244
+ :type _host_index: int, optional
245
+ :return: Returns the result object.
246
+ """ # noqa: E501
247
+
248
+ _param = self._available_quota_for_dataset_serialize(
249
+ username=username,
250
+ dataset=dataset,
251
+ q_answer_api_key=q_answer_api_key,
252
+ _request_auth=_request_auth,
253
+ _content_type=_content_type,
254
+ _headers=_headers,
255
+ _host_index=_host_index
256
+ )
257
+
258
+ _response_types_map: Dict[str, Optional[str]] = {
259
+ '200': "AvailableSpaceQuotaForDataset",
260
+ }
261
+ response_data = self.api_client.call_api(
262
+ *_param,
263
+ _request_timeout=_request_timeout
264
+ )
265
+ return response_data.response
266
+
267
+
268
+ def _available_quota_for_dataset_serialize(
269
+ self,
270
+ username,
271
+ dataset,
272
+ q_answer_api_key,
273
+ _request_auth,
274
+ _content_type,
275
+ _headers,
276
+ _host_index,
277
+ ) -> RequestSerialized:
278
+
279
+ _host = None
280
+
281
+ _collection_formats: Dict[str, str] = {
282
+ }
283
+
284
+ _path_params: Dict[str, str] = {}
285
+ _query_params: List[Tuple[str, str]] = []
286
+ _header_params: Dict[str, Optional[str]] = _headers or {}
287
+ _form_params: List[Tuple[str, str]] = []
288
+ _files: Dict[
289
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
290
+ ] = {}
291
+ _body_params: Optional[bytes] = None
292
+
293
+ # process the path parameters
294
+ # process the query parameters
295
+ if username is not None:
296
+
297
+ _query_params.append(('username', username))
298
+
299
+ if dataset is not None:
300
+
301
+ _query_params.append(('dataset', dataset))
302
+
303
+ # process the header parameters
304
+ if q_answer_api_key is not None:
305
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
306
+ # process the form parameters
307
+ # process the body parameter
308
+
309
+
310
+ # set the HTTP header `Accept`
311
+ if 'Accept' not in _header_params:
312
+ _header_params['Accept'] = self.api_client.select_header_accept(
313
+ [
314
+ '*/*'
315
+ ]
316
+ )
317
+
318
+
319
+ # authentication setting
320
+ _auth_settings: List[str] = [
321
+ 'QAnswer-Api-Key',
322
+ 'Bearer'
323
+ ]
324
+
325
+ return self.api_client.param_serialize(
326
+ method='GET',
327
+ resource_path='/api/ai-assistant/available-space-quota-for-dataset',
328
+ path_params=_path_params,
329
+ query_params=_query_params,
330
+ header_params=_header_params,
331
+ body=_body_params,
332
+ post_params=_form_params,
333
+ files=_files,
334
+ auth_settings=_auth_settings,
335
+ collection_formats=_collection_formats,
336
+ _host=_host,
337
+ _request_auth=_request_auth
338
+ )
339
+
340
+
341
+
342
+
343
+ @validate_call
344
+ def create_dataset(
345
+ self,
346
+ name: StrictStr,
347
+ language: Annotated[StrictStr, Field(description="Example : English or Français")],
348
+ dataset_type: Optional[StrictStr] = None,
349
+ embedding_model: Optional[StrictStr] = None,
350
+ description: Optional[StrictStr] = None,
351
+ _request_timeout: Union[
352
+ None,
353
+ Annotated[StrictFloat, Field(gt=0)],
354
+ Tuple[
355
+ Annotated[StrictFloat, Field(gt=0)],
356
+ Annotated[StrictFloat, Field(gt=0)]
357
+ ]
358
+ ] = None,
359
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
360
+ _content_type: Optional[StrictStr] = None,
361
+ _headers: Optional[Dict[StrictStr, Any]] = None,
362
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
363
+ ) -> None:
364
+ """Create a new dataset
365
+
366
+
367
+ :param name: (required)
368
+ :type name: str
369
+ :param language: Example : English or Français (required)
370
+ :type language: str
371
+ :param dataset_type:
372
+ :type dataset_type: str
373
+ :param embedding_model:
374
+ :type embedding_model: str
375
+ :param description:
376
+ :type description: str
377
+ :param _request_timeout: timeout setting for this request. If one
378
+ number provided, it will be total request
379
+ timeout. It can also be a pair (tuple) of
380
+ (connection, read) timeouts.
381
+ :type _request_timeout: int, tuple(int, int), optional
382
+ :param _request_auth: set to override the auth_settings for an a single
383
+ request; this effectively ignores the
384
+ authentication in the spec for a single request.
385
+ :type _request_auth: dict, optional
386
+ :param _content_type: force content-type for the request.
387
+ :type _content_type: str, Optional
388
+ :param _headers: set to override the headers for a single
389
+ request; this effectively ignores the headers
390
+ in the spec for a single request.
391
+ :type _headers: dict, optional
392
+ :param _host_index: set to override the host_index for a single
393
+ request; this effectively ignores the host_index
394
+ in the spec for a single request.
395
+ :type _host_index: int, optional
396
+ :return: Returns the result object.
397
+ """ # noqa: E501
398
+
399
+ _param = self._create_dataset_serialize(
400
+ name=name,
401
+ language=language,
402
+ dataset_type=dataset_type,
403
+ embedding_model=embedding_model,
404
+ description=description,
405
+ _request_auth=_request_auth,
406
+ _content_type=_content_type,
407
+ _headers=_headers,
408
+ _host_index=_host_index
409
+ )
410
+
411
+ _response_types_map: Dict[str, Optional[str]] = {
412
+ '200': None,
413
+ }
414
+ response_data = self.api_client.call_api(
415
+ *_param,
416
+ _request_timeout=_request_timeout
417
+ )
418
+ response_data.read()
419
+ return self.api_client.response_deserialize(
420
+ response_data=response_data,
421
+ response_types_map=_response_types_map,
422
+ ).data
423
+
424
+
425
+ @validate_call
426
+ def create_dataset_with_http_info(
427
+ self,
428
+ name: StrictStr,
429
+ language: Annotated[StrictStr, Field(description="Example : English or Français")],
430
+ dataset_type: Optional[StrictStr] = None,
431
+ embedding_model: Optional[StrictStr] = None,
432
+ description: Optional[StrictStr] = None,
433
+ _request_timeout: Union[
434
+ None,
435
+ Annotated[StrictFloat, Field(gt=0)],
436
+ Tuple[
437
+ Annotated[StrictFloat, Field(gt=0)],
438
+ Annotated[StrictFloat, Field(gt=0)]
439
+ ]
440
+ ] = None,
441
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
442
+ _content_type: Optional[StrictStr] = None,
443
+ _headers: Optional[Dict[StrictStr, Any]] = None,
444
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
445
+ ) -> ApiResponse[None]:
446
+ """Create a new dataset
447
+
448
+
449
+ :param name: (required)
450
+ :type name: str
451
+ :param language: Example : English or Français (required)
452
+ :type language: str
453
+ :param dataset_type:
454
+ :type dataset_type: str
455
+ :param embedding_model:
456
+ :type embedding_model: str
457
+ :param description:
458
+ :type description: str
459
+ :param _request_timeout: timeout setting for this request. If one
460
+ number provided, it will be total request
461
+ timeout. It can also be a pair (tuple) of
462
+ (connection, read) timeouts.
463
+ :type _request_timeout: int, tuple(int, int), optional
464
+ :param _request_auth: set to override the auth_settings for an a single
465
+ request; this effectively ignores the
466
+ authentication in the spec for a single request.
467
+ :type _request_auth: dict, optional
468
+ :param _content_type: force content-type for the request.
469
+ :type _content_type: str, Optional
470
+ :param _headers: set to override the headers for a single
471
+ request; this effectively ignores the headers
472
+ in the spec for a single request.
473
+ :type _headers: dict, optional
474
+ :param _host_index: set to override the host_index for a single
475
+ request; this effectively ignores the host_index
476
+ in the spec for a single request.
477
+ :type _host_index: int, optional
478
+ :return: Returns the result object.
479
+ """ # noqa: E501
480
+
481
+ _param = self._create_dataset_serialize(
482
+ name=name,
483
+ language=language,
484
+ dataset_type=dataset_type,
485
+ embedding_model=embedding_model,
486
+ description=description,
487
+ _request_auth=_request_auth,
488
+ _content_type=_content_type,
489
+ _headers=_headers,
490
+ _host_index=_host_index
491
+ )
492
+
493
+ _response_types_map: Dict[str, Optional[str]] = {
494
+ '200': None,
495
+ }
496
+ response_data = self.api_client.call_api(
497
+ *_param,
498
+ _request_timeout=_request_timeout
499
+ )
500
+ response_data.read()
501
+ return self.api_client.response_deserialize(
502
+ response_data=response_data,
503
+ response_types_map=_response_types_map,
504
+ )
505
+
506
+
507
+ @validate_call
508
+ def create_dataset_without_preload_content(
509
+ self,
510
+ name: StrictStr,
511
+ language: Annotated[StrictStr, Field(description="Example : English or Français")],
512
+ dataset_type: Optional[StrictStr] = None,
513
+ embedding_model: Optional[StrictStr] = None,
514
+ description: Optional[StrictStr] = None,
515
+ _request_timeout: Union[
516
+ None,
517
+ Annotated[StrictFloat, Field(gt=0)],
518
+ Tuple[
519
+ Annotated[StrictFloat, Field(gt=0)],
520
+ Annotated[StrictFloat, Field(gt=0)]
521
+ ]
522
+ ] = None,
523
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
524
+ _content_type: Optional[StrictStr] = None,
525
+ _headers: Optional[Dict[StrictStr, Any]] = None,
526
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
527
+ ) -> RESTResponseType:
528
+ """Create a new dataset
529
+
530
+
531
+ :param name: (required)
532
+ :type name: str
533
+ :param language: Example : English or Français (required)
534
+ :type language: str
535
+ :param dataset_type:
536
+ :type dataset_type: str
537
+ :param embedding_model:
538
+ :type embedding_model: str
539
+ :param description:
540
+ :type description: str
541
+ :param _request_timeout: timeout setting for this request. If one
542
+ number provided, it will be total request
543
+ timeout. It can also be a pair (tuple) of
544
+ (connection, read) timeouts.
545
+ :type _request_timeout: int, tuple(int, int), optional
546
+ :param _request_auth: set to override the auth_settings for an a single
547
+ request; this effectively ignores the
548
+ authentication in the spec for a single request.
549
+ :type _request_auth: dict, optional
550
+ :param _content_type: force content-type for the request.
551
+ :type _content_type: str, Optional
552
+ :param _headers: set to override the headers for a single
553
+ request; this effectively ignores the headers
554
+ in the spec for a single request.
555
+ :type _headers: dict, optional
556
+ :param _host_index: set to override the host_index for a single
557
+ request; this effectively ignores the host_index
558
+ in the spec for a single request.
559
+ :type _host_index: int, optional
560
+ :return: Returns the result object.
561
+ """ # noqa: E501
562
+
563
+ _param = self._create_dataset_serialize(
564
+ name=name,
565
+ language=language,
566
+ dataset_type=dataset_type,
567
+ embedding_model=embedding_model,
568
+ description=description,
569
+ _request_auth=_request_auth,
570
+ _content_type=_content_type,
571
+ _headers=_headers,
572
+ _host_index=_host_index
573
+ )
574
+
575
+ _response_types_map: Dict[str, Optional[str]] = {
576
+ '200': None,
577
+ }
578
+ response_data = self.api_client.call_api(
579
+ *_param,
580
+ _request_timeout=_request_timeout
581
+ )
582
+ return response_data.response
583
+
584
+
585
+ def _create_dataset_serialize(
586
+ self,
587
+ name,
588
+ language,
589
+ dataset_type,
590
+ embedding_model,
591
+ description,
592
+ _request_auth,
593
+ _content_type,
594
+ _headers,
595
+ _host_index,
596
+ ) -> RequestSerialized:
597
+
598
+ _host = None
599
+
600
+ _collection_formats: Dict[str, str] = {
601
+ }
602
+
603
+ _path_params: Dict[str, str] = {}
604
+ _query_params: List[Tuple[str, str]] = []
605
+ _header_params: Dict[str, Optional[str]] = _headers or {}
606
+ _form_params: List[Tuple[str, str]] = []
607
+ _files: Dict[
608
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
609
+ ] = {}
610
+ _body_params: Optional[bytes] = None
611
+
612
+ # process the path parameters
613
+ # process the query parameters
614
+ if name is not None:
615
+
616
+ _query_params.append(('name', name))
617
+
618
+ if language is not None:
619
+
620
+ _query_params.append(('language', language))
621
+
622
+ if dataset_type is not None:
623
+
624
+ _query_params.append(('datasetType', dataset_type))
625
+
626
+ if embedding_model is not None:
627
+
628
+ _query_params.append(('embeddingModel', embedding_model))
629
+
630
+ if description is not None:
631
+
632
+ _query_params.append(('description', description))
633
+
634
+ # process the header parameters
635
+ # process the form parameters
636
+ # process the body parameter
637
+
638
+
639
+
640
+
641
+ # authentication setting
642
+ _auth_settings: List[str] = [
643
+ 'QAnswer-Api-Key',
644
+ 'Bearer'
645
+ ]
646
+
647
+ return self.api_client.param_serialize(
648
+ method='POST',
649
+ resource_path='/api/ai-assistant/create',
650
+ path_params=_path_params,
651
+ query_params=_query_params,
652
+ header_params=_header_params,
653
+ body=_body_params,
654
+ post_params=_form_params,
655
+ files=_files,
656
+ auth_settings=_auth_settings,
657
+ collection_formats=_collection_formats,
658
+ _host=_host,
659
+ _request_auth=_request_auth
660
+ )
661
+
662
+
663
+
664
+
665
+ @validate_call
666
+ def dataset_users_list(
667
+ self,
668
+ username: StrictStr,
669
+ dataset: StrictStr,
670
+ q_answer_api_key: Optional[StrictStr] = None,
671
+ _request_timeout: Union[
672
+ None,
673
+ Annotated[StrictFloat, Field(gt=0)],
674
+ Tuple[
675
+ Annotated[StrictFloat, Field(gt=0)],
676
+ Annotated[StrictFloat, Field(gt=0)]
677
+ ]
678
+ ] = None,
679
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
680
+ _content_type: Optional[StrictStr] = None,
681
+ _headers: Optional[Dict[StrictStr, Any]] = None,
682
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
683
+ ) -> DatasetUsersResponse:
684
+ """list all users that have access and accessed to the dataset
685
+
686
+
687
+ :param username: (required)
688
+ :type username: str
689
+ :param dataset: (required)
690
+ :type dataset: str
691
+ :param q_answer_api_key:
692
+ :type q_answer_api_key: str
693
+ :param _request_timeout: timeout setting for this request. If one
694
+ number provided, it will be total request
695
+ timeout. It can also be a pair (tuple) of
696
+ (connection, read) timeouts.
697
+ :type _request_timeout: int, tuple(int, int), optional
698
+ :param _request_auth: set to override the auth_settings for an a single
699
+ request; this effectively ignores the
700
+ authentication in the spec for a single request.
701
+ :type _request_auth: dict, optional
702
+ :param _content_type: force content-type for the request.
703
+ :type _content_type: str, Optional
704
+ :param _headers: set to override the headers for a single
705
+ request; this effectively ignores the headers
706
+ in the spec for a single request.
707
+ :type _headers: dict, optional
708
+ :param _host_index: set to override the host_index for a single
709
+ request; this effectively ignores the host_index
710
+ in the spec for a single request.
711
+ :type _host_index: int, optional
712
+ :return: Returns the result object.
713
+ """ # noqa: E501
714
+
715
+ _param = self._dataset_users_list_serialize(
716
+ username=username,
717
+ dataset=dataset,
718
+ q_answer_api_key=q_answer_api_key,
719
+ _request_auth=_request_auth,
720
+ _content_type=_content_type,
721
+ _headers=_headers,
722
+ _host_index=_host_index
723
+ )
724
+
725
+ _response_types_map: Dict[str, Optional[str]] = {
726
+ '200': "DatasetUsersResponse",
727
+ }
728
+ response_data = self.api_client.call_api(
729
+ *_param,
730
+ _request_timeout=_request_timeout
731
+ )
732
+ response_data.read()
733
+ return self.api_client.response_deserialize(
734
+ response_data=response_data,
735
+ response_types_map=_response_types_map,
736
+ ).data
737
+
738
+
739
+ @validate_call
740
+ def dataset_users_list_with_http_info(
741
+ self,
742
+ username: StrictStr,
743
+ dataset: StrictStr,
744
+ q_answer_api_key: Optional[StrictStr] = None,
745
+ _request_timeout: Union[
746
+ None,
747
+ Annotated[StrictFloat, Field(gt=0)],
748
+ Tuple[
749
+ Annotated[StrictFloat, Field(gt=0)],
750
+ Annotated[StrictFloat, Field(gt=0)]
751
+ ]
752
+ ] = None,
753
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
754
+ _content_type: Optional[StrictStr] = None,
755
+ _headers: Optional[Dict[StrictStr, Any]] = None,
756
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
757
+ ) -> ApiResponse[DatasetUsersResponse]:
758
+ """list all users that have access and accessed to the dataset
759
+
760
+
761
+ :param username: (required)
762
+ :type username: str
763
+ :param dataset: (required)
764
+ :type dataset: str
765
+ :param q_answer_api_key:
766
+ :type q_answer_api_key: str
767
+ :param _request_timeout: timeout setting for this request. If one
768
+ number provided, it will be total request
769
+ timeout. It can also be a pair (tuple) of
770
+ (connection, read) timeouts.
771
+ :type _request_timeout: int, tuple(int, int), optional
772
+ :param _request_auth: set to override the auth_settings for an a single
773
+ request; this effectively ignores the
774
+ authentication in the spec for a single request.
775
+ :type _request_auth: dict, optional
776
+ :param _content_type: force content-type for the request.
777
+ :type _content_type: str, Optional
778
+ :param _headers: set to override the headers for a single
779
+ request; this effectively ignores the headers
780
+ in the spec for a single request.
781
+ :type _headers: dict, optional
782
+ :param _host_index: set to override the host_index for a single
783
+ request; this effectively ignores the host_index
784
+ in the spec for a single request.
785
+ :type _host_index: int, optional
786
+ :return: Returns the result object.
787
+ """ # noqa: E501
788
+
789
+ _param = self._dataset_users_list_serialize(
790
+ username=username,
791
+ dataset=dataset,
792
+ q_answer_api_key=q_answer_api_key,
793
+ _request_auth=_request_auth,
794
+ _content_type=_content_type,
795
+ _headers=_headers,
796
+ _host_index=_host_index
797
+ )
798
+
799
+ _response_types_map: Dict[str, Optional[str]] = {
800
+ '200': "DatasetUsersResponse",
801
+ }
802
+ response_data = self.api_client.call_api(
803
+ *_param,
804
+ _request_timeout=_request_timeout
805
+ )
806
+ response_data.read()
807
+ return self.api_client.response_deserialize(
808
+ response_data=response_data,
809
+ response_types_map=_response_types_map,
810
+ )
811
+
812
+
813
+ @validate_call
814
+ def dataset_users_list_without_preload_content(
815
+ self,
816
+ username: StrictStr,
817
+ dataset: StrictStr,
818
+ q_answer_api_key: Optional[StrictStr] = None,
819
+ _request_timeout: Union[
820
+ None,
821
+ Annotated[StrictFloat, Field(gt=0)],
822
+ Tuple[
823
+ Annotated[StrictFloat, Field(gt=0)],
824
+ Annotated[StrictFloat, Field(gt=0)]
825
+ ]
826
+ ] = None,
827
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
828
+ _content_type: Optional[StrictStr] = None,
829
+ _headers: Optional[Dict[StrictStr, Any]] = None,
830
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
831
+ ) -> RESTResponseType:
832
+ """list all users that have access and accessed to the dataset
833
+
834
+
835
+ :param username: (required)
836
+ :type username: str
837
+ :param dataset: (required)
838
+ :type dataset: str
839
+ :param q_answer_api_key:
840
+ :type q_answer_api_key: str
841
+ :param _request_timeout: timeout setting for this request. If one
842
+ number provided, it will be total request
843
+ timeout. It can also be a pair (tuple) of
844
+ (connection, read) timeouts.
845
+ :type _request_timeout: int, tuple(int, int), optional
846
+ :param _request_auth: set to override the auth_settings for an a single
847
+ request; this effectively ignores the
848
+ authentication in the spec for a single request.
849
+ :type _request_auth: dict, optional
850
+ :param _content_type: force content-type for the request.
851
+ :type _content_type: str, Optional
852
+ :param _headers: set to override the headers for a single
853
+ request; this effectively ignores the headers
854
+ in the spec for a single request.
855
+ :type _headers: dict, optional
856
+ :param _host_index: set to override the host_index for a single
857
+ request; this effectively ignores the host_index
858
+ in the spec for a single request.
859
+ :type _host_index: int, optional
860
+ :return: Returns the result object.
861
+ """ # noqa: E501
862
+
863
+ _param = self._dataset_users_list_serialize(
864
+ username=username,
865
+ dataset=dataset,
866
+ q_answer_api_key=q_answer_api_key,
867
+ _request_auth=_request_auth,
868
+ _content_type=_content_type,
869
+ _headers=_headers,
870
+ _host_index=_host_index
871
+ )
872
+
873
+ _response_types_map: Dict[str, Optional[str]] = {
874
+ '200': "DatasetUsersResponse",
875
+ }
876
+ response_data = self.api_client.call_api(
877
+ *_param,
878
+ _request_timeout=_request_timeout
879
+ )
880
+ return response_data.response
881
+
882
+
883
+ def _dataset_users_list_serialize(
884
+ self,
885
+ username,
886
+ dataset,
887
+ q_answer_api_key,
888
+ _request_auth,
889
+ _content_type,
890
+ _headers,
891
+ _host_index,
892
+ ) -> RequestSerialized:
893
+
894
+ _host = None
895
+
896
+ _collection_formats: Dict[str, str] = {
897
+ }
898
+
899
+ _path_params: Dict[str, str] = {}
900
+ _query_params: List[Tuple[str, str]] = []
901
+ _header_params: Dict[str, Optional[str]] = _headers or {}
902
+ _form_params: List[Tuple[str, str]] = []
903
+ _files: Dict[
904
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
905
+ ] = {}
906
+ _body_params: Optional[bytes] = None
907
+
908
+ # process the path parameters
909
+ # process the query parameters
910
+ if username is not None:
911
+
912
+ _query_params.append(('username', username))
913
+
914
+ if dataset is not None:
915
+
916
+ _query_params.append(('dataset', dataset))
917
+
918
+ # process the header parameters
919
+ if q_answer_api_key is not None:
920
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
921
+ # process the form parameters
922
+ # process the body parameter
923
+
924
+
925
+ # set the HTTP header `Accept`
926
+ if 'Accept' not in _header_params:
927
+ _header_params['Accept'] = self.api_client.select_header_accept(
928
+ [
929
+ '*/*'
930
+ ]
931
+ )
932
+
933
+
934
+ # authentication setting
935
+ _auth_settings: List[str] = [
936
+ 'QAnswer-Api-Key',
937
+ 'Bearer'
938
+ ]
939
+
940
+ return self.api_client.param_serialize(
941
+ method='GET',
942
+ resource_path='/api/ai-assistant/users/list',
943
+ path_params=_path_params,
944
+ query_params=_query_params,
945
+ header_params=_header_params,
946
+ body=_body_params,
947
+ post_params=_form_params,
948
+ files=_files,
949
+ auth_settings=_auth_settings,
950
+ collection_formats=_collection_formats,
951
+ _host=_host,
952
+ _request_auth=_request_auth
953
+ )
954
+
955
+
956
+
957
+
958
+ @validate_call
959
+ def exists(
960
+ self,
961
+ username: StrictStr,
962
+ dataset: StrictStr,
963
+ q_answer_api_key: Optional[StrictStr] = None,
964
+ _request_timeout: Union[
965
+ None,
966
+ Annotated[StrictFloat, Field(gt=0)],
967
+ Tuple[
968
+ Annotated[StrictFloat, Field(gt=0)],
969
+ Annotated[StrictFloat, Field(gt=0)]
970
+ ]
971
+ ] = None,
972
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
973
+ _content_type: Optional[StrictStr] = None,
974
+ _headers: Optional[Dict[StrictStr, Any]] = None,
975
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
976
+ ) -> bool:
977
+ """Check if a dataset exists
978
+
979
+
980
+ :param username: (required)
981
+ :type username: str
982
+ :param dataset: (required)
983
+ :type dataset: str
984
+ :param q_answer_api_key:
985
+ :type q_answer_api_key: str
986
+ :param _request_timeout: timeout setting for this request. If one
987
+ number provided, it will be total request
988
+ timeout. It can also be a pair (tuple) of
989
+ (connection, read) timeouts.
990
+ :type _request_timeout: int, tuple(int, int), optional
991
+ :param _request_auth: set to override the auth_settings for an a single
992
+ request; this effectively ignores the
993
+ authentication in the spec for a single request.
994
+ :type _request_auth: dict, optional
995
+ :param _content_type: force content-type for the request.
996
+ :type _content_type: str, Optional
997
+ :param _headers: set to override the headers for a single
998
+ request; this effectively ignores the headers
999
+ in the spec for a single request.
1000
+ :type _headers: dict, optional
1001
+ :param _host_index: set to override the host_index for a single
1002
+ request; this effectively ignores the host_index
1003
+ in the spec for a single request.
1004
+ :type _host_index: int, optional
1005
+ :return: Returns the result object.
1006
+ """ # noqa: E501
1007
+
1008
+ _param = self._exists_serialize(
1009
+ username=username,
1010
+ dataset=dataset,
1011
+ q_answer_api_key=q_answer_api_key,
1012
+ _request_auth=_request_auth,
1013
+ _content_type=_content_type,
1014
+ _headers=_headers,
1015
+ _host_index=_host_index
1016
+ )
1017
+
1018
+ _response_types_map: Dict[str, Optional[str]] = {
1019
+ '200': "bool",
1020
+ }
1021
+ response_data = self.api_client.call_api(
1022
+ *_param,
1023
+ _request_timeout=_request_timeout
1024
+ )
1025
+ response_data.read()
1026
+ return self.api_client.response_deserialize(
1027
+ response_data=response_data,
1028
+ response_types_map=_response_types_map,
1029
+ ).data
1030
+
1031
+
1032
+ @validate_call
1033
+ def exists_with_http_info(
1034
+ self,
1035
+ username: StrictStr,
1036
+ dataset: StrictStr,
1037
+ q_answer_api_key: Optional[StrictStr] = None,
1038
+ _request_timeout: Union[
1039
+ None,
1040
+ Annotated[StrictFloat, Field(gt=0)],
1041
+ Tuple[
1042
+ Annotated[StrictFloat, Field(gt=0)],
1043
+ Annotated[StrictFloat, Field(gt=0)]
1044
+ ]
1045
+ ] = None,
1046
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1047
+ _content_type: Optional[StrictStr] = None,
1048
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1049
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1050
+ ) -> ApiResponse[bool]:
1051
+ """Check if a dataset exists
1052
+
1053
+
1054
+ :param username: (required)
1055
+ :type username: str
1056
+ :param dataset: (required)
1057
+ :type dataset: str
1058
+ :param q_answer_api_key:
1059
+ :type q_answer_api_key: str
1060
+ :param _request_timeout: timeout setting for this request. If one
1061
+ number provided, it will be total request
1062
+ timeout. It can also be a pair (tuple) of
1063
+ (connection, read) timeouts.
1064
+ :type _request_timeout: int, tuple(int, int), optional
1065
+ :param _request_auth: set to override the auth_settings for an a single
1066
+ request; this effectively ignores the
1067
+ authentication in the spec for a single request.
1068
+ :type _request_auth: dict, optional
1069
+ :param _content_type: force content-type for the request.
1070
+ :type _content_type: str, Optional
1071
+ :param _headers: set to override the headers for a single
1072
+ request; this effectively ignores the headers
1073
+ in the spec for a single request.
1074
+ :type _headers: dict, optional
1075
+ :param _host_index: set to override the host_index for a single
1076
+ request; this effectively ignores the host_index
1077
+ in the spec for a single request.
1078
+ :type _host_index: int, optional
1079
+ :return: Returns the result object.
1080
+ """ # noqa: E501
1081
+
1082
+ _param = self._exists_serialize(
1083
+ username=username,
1084
+ dataset=dataset,
1085
+ q_answer_api_key=q_answer_api_key,
1086
+ _request_auth=_request_auth,
1087
+ _content_type=_content_type,
1088
+ _headers=_headers,
1089
+ _host_index=_host_index
1090
+ )
1091
+
1092
+ _response_types_map: Dict[str, Optional[str]] = {
1093
+ '200': "bool",
1094
+ }
1095
+ response_data = self.api_client.call_api(
1096
+ *_param,
1097
+ _request_timeout=_request_timeout
1098
+ )
1099
+ response_data.read()
1100
+ return self.api_client.response_deserialize(
1101
+ response_data=response_data,
1102
+ response_types_map=_response_types_map,
1103
+ )
1104
+
1105
+
1106
+ @validate_call
1107
+ def exists_without_preload_content(
1108
+ self,
1109
+ username: StrictStr,
1110
+ dataset: StrictStr,
1111
+ q_answer_api_key: Optional[StrictStr] = None,
1112
+ _request_timeout: Union[
1113
+ None,
1114
+ Annotated[StrictFloat, Field(gt=0)],
1115
+ Tuple[
1116
+ Annotated[StrictFloat, Field(gt=0)],
1117
+ Annotated[StrictFloat, Field(gt=0)]
1118
+ ]
1119
+ ] = None,
1120
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1121
+ _content_type: Optional[StrictStr] = None,
1122
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1123
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1124
+ ) -> RESTResponseType:
1125
+ """Check if a dataset exists
1126
+
1127
+
1128
+ :param username: (required)
1129
+ :type username: str
1130
+ :param dataset: (required)
1131
+ :type dataset: str
1132
+ :param q_answer_api_key:
1133
+ :type q_answer_api_key: str
1134
+ :param _request_timeout: timeout setting for this request. If one
1135
+ number provided, it will be total request
1136
+ timeout. It can also be a pair (tuple) of
1137
+ (connection, read) timeouts.
1138
+ :type _request_timeout: int, tuple(int, int), optional
1139
+ :param _request_auth: set to override the auth_settings for an a single
1140
+ request; this effectively ignores the
1141
+ authentication in the spec for a single request.
1142
+ :type _request_auth: dict, optional
1143
+ :param _content_type: force content-type for the request.
1144
+ :type _content_type: str, Optional
1145
+ :param _headers: set to override the headers for a single
1146
+ request; this effectively ignores the headers
1147
+ in the spec for a single request.
1148
+ :type _headers: dict, optional
1149
+ :param _host_index: set to override the host_index for a single
1150
+ request; this effectively ignores the host_index
1151
+ in the spec for a single request.
1152
+ :type _host_index: int, optional
1153
+ :return: Returns the result object.
1154
+ """ # noqa: E501
1155
+
1156
+ _param = self._exists_serialize(
1157
+ username=username,
1158
+ dataset=dataset,
1159
+ q_answer_api_key=q_answer_api_key,
1160
+ _request_auth=_request_auth,
1161
+ _content_type=_content_type,
1162
+ _headers=_headers,
1163
+ _host_index=_host_index
1164
+ )
1165
+
1166
+ _response_types_map: Dict[str, Optional[str]] = {
1167
+ '200': "bool",
1168
+ }
1169
+ response_data = self.api_client.call_api(
1170
+ *_param,
1171
+ _request_timeout=_request_timeout
1172
+ )
1173
+ return response_data.response
1174
+
1175
+
1176
+ def _exists_serialize(
1177
+ self,
1178
+ username,
1179
+ dataset,
1180
+ q_answer_api_key,
1181
+ _request_auth,
1182
+ _content_type,
1183
+ _headers,
1184
+ _host_index,
1185
+ ) -> RequestSerialized:
1186
+
1187
+ _host = None
1188
+
1189
+ _collection_formats: Dict[str, str] = {
1190
+ }
1191
+
1192
+ _path_params: Dict[str, str] = {}
1193
+ _query_params: List[Tuple[str, str]] = []
1194
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1195
+ _form_params: List[Tuple[str, str]] = []
1196
+ _files: Dict[
1197
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1198
+ ] = {}
1199
+ _body_params: Optional[bytes] = None
1200
+
1201
+ # process the path parameters
1202
+ # process the query parameters
1203
+ if username is not None:
1204
+
1205
+ _query_params.append(('username', username))
1206
+
1207
+ if dataset is not None:
1208
+
1209
+ _query_params.append(('dataset', dataset))
1210
+
1211
+ # process the header parameters
1212
+ if q_answer_api_key is not None:
1213
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1214
+ # process the form parameters
1215
+ # process the body parameter
1216
+
1217
+
1218
+ # set the HTTP header `Accept`
1219
+ if 'Accept' not in _header_params:
1220
+ _header_params['Accept'] = self.api_client.select_header_accept(
1221
+ [
1222
+ '*/*'
1223
+ ]
1224
+ )
1225
+
1226
+
1227
+ # authentication setting
1228
+ _auth_settings: List[str] = [
1229
+ 'QAnswer-Api-Key',
1230
+ 'Bearer'
1231
+ ]
1232
+
1233
+ return self.api_client.param_serialize(
1234
+ method='GET',
1235
+ resource_path='/api/ai-assistant/exists',
1236
+ path_params=_path_params,
1237
+ query_params=_query_params,
1238
+ header_params=_header_params,
1239
+ body=_body_params,
1240
+ post_params=_form_params,
1241
+ files=_files,
1242
+ auth_settings=_auth_settings,
1243
+ collection_formats=_collection_formats,
1244
+ _host=_host,
1245
+ _request_auth=_request_auth
1246
+ )
1247
+
1248
+
1249
+
1250
+
1251
+ @validate_call
1252
+ def free_text_dataset_update(
1253
+ self,
1254
+ dataset_update_object: DatasetUpdateObject,
1255
+ q_answer_api_key: Optional[StrictStr] = None,
1256
+ _request_timeout: Union[
1257
+ None,
1258
+ Annotated[StrictFloat, Field(gt=0)],
1259
+ Tuple[
1260
+ Annotated[StrictFloat, Field(gt=0)],
1261
+ Annotated[StrictFloat, Field(gt=0)]
1262
+ ]
1263
+ ] = None,
1264
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1265
+ _content_type: Optional[StrictStr] = None,
1266
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1267
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1268
+ ) -> DatasetSchema:
1269
+ """Changes and existing dataset
1270
+
1271
+
1272
+ :param dataset_update_object: (required)
1273
+ :type dataset_update_object: DatasetUpdateObject
1274
+ :param q_answer_api_key:
1275
+ :type q_answer_api_key: str
1276
+ :param _request_timeout: timeout setting for this request. If one
1277
+ number provided, it will be total request
1278
+ timeout. It can also be a pair (tuple) of
1279
+ (connection, read) timeouts.
1280
+ :type _request_timeout: int, tuple(int, int), optional
1281
+ :param _request_auth: set to override the auth_settings for an a single
1282
+ request; this effectively ignores the
1283
+ authentication in the spec for a single request.
1284
+ :type _request_auth: dict, optional
1285
+ :param _content_type: force content-type for the request.
1286
+ :type _content_type: str, Optional
1287
+ :param _headers: set to override the headers for a single
1288
+ request; this effectively ignores the headers
1289
+ in the spec for a single request.
1290
+ :type _headers: dict, optional
1291
+ :param _host_index: set to override the host_index for a single
1292
+ request; this effectively ignores the host_index
1293
+ in the spec for a single request.
1294
+ :type _host_index: int, optional
1295
+ :return: Returns the result object.
1296
+ """ # noqa: E501
1297
+
1298
+ _param = self._free_text_dataset_update_serialize(
1299
+ dataset_update_object=dataset_update_object,
1300
+ q_answer_api_key=q_answer_api_key,
1301
+ _request_auth=_request_auth,
1302
+ _content_type=_content_type,
1303
+ _headers=_headers,
1304
+ _host_index=_host_index
1305
+ )
1306
+
1307
+ _response_types_map: Dict[str, Optional[str]] = {
1308
+ '200': "DatasetSchema",
1309
+ }
1310
+ response_data = self.api_client.call_api(
1311
+ *_param,
1312
+ _request_timeout=_request_timeout
1313
+ )
1314
+ response_data.read()
1315
+ return self.api_client.response_deserialize(
1316
+ response_data=response_data,
1317
+ response_types_map=_response_types_map,
1318
+ ).data
1319
+
1320
+
1321
+ @validate_call
1322
+ def free_text_dataset_update_with_http_info(
1323
+ self,
1324
+ dataset_update_object: DatasetUpdateObject,
1325
+ q_answer_api_key: Optional[StrictStr] = None,
1326
+ _request_timeout: Union[
1327
+ None,
1328
+ Annotated[StrictFloat, Field(gt=0)],
1329
+ Tuple[
1330
+ Annotated[StrictFloat, Field(gt=0)],
1331
+ Annotated[StrictFloat, Field(gt=0)]
1332
+ ]
1333
+ ] = None,
1334
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1335
+ _content_type: Optional[StrictStr] = None,
1336
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1337
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1338
+ ) -> ApiResponse[DatasetSchema]:
1339
+ """Changes and existing dataset
1340
+
1341
+
1342
+ :param dataset_update_object: (required)
1343
+ :type dataset_update_object: DatasetUpdateObject
1344
+ :param q_answer_api_key:
1345
+ :type q_answer_api_key: str
1346
+ :param _request_timeout: timeout setting for this request. If one
1347
+ number provided, it will be total request
1348
+ timeout. It can also be a pair (tuple) of
1349
+ (connection, read) timeouts.
1350
+ :type _request_timeout: int, tuple(int, int), optional
1351
+ :param _request_auth: set to override the auth_settings for an a single
1352
+ request; this effectively ignores the
1353
+ authentication in the spec for a single request.
1354
+ :type _request_auth: dict, optional
1355
+ :param _content_type: force content-type for the request.
1356
+ :type _content_type: str, Optional
1357
+ :param _headers: set to override the headers for a single
1358
+ request; this effectively ignores the headers
1359
+ in the spec for a single request.
1360
+ :type _headers: dict, optional
1361
+ :param _host_index: set to override the host_index for a single
1362
+ request; this effectively ignores the host_index
1363
+ in the spec for a single request.
1364
+ :type _host_index: int, optional
1365
+ :return: Returns the result object.
1366
+ """ # noqa: E501
1367
+
1368
+ _param = self._free_text_dataset_update_serialize(
1369
+ dataset_update_object=dataset_update_object,
1370
+ q_answer_api_key=q_answer_api_key,
1371
+ _request_auth=_request_auth,
1372
+ _content_type=_content_type,
1373
+ _headers=_headers,
1374
+ _host_index=_host_index
1375
+ )
1376
+
1377
+ _response_types_map: Dict[str, Optional[str]] = {
1378
+ '200': "DatasetSchema",
1379
+ }
1380
+ response_data = self.api_client.call_api(
1381
+ *_param,
1382
+ _request_timeout=_request_timeout
1383
+ )
1384
+ response_data.read()
1385
+ return self.api_client.response_deserialize(
1386
+ response_data=response_data,
1387
+ response_types_map=_response_types_map,
1388
+ )
1389
+
1390
+
1391
+ @validate_call
1392
+ def free_text_dataset_update_without_preload_content(
1393
+ self,
1394
+ dataset_update_object: DatasetUpdateObject,
1395
+ q_answer_api_key: Optional[StrictStr] = None,
1396
+ _request_timeout: Union[
1397
+ None,
1398
+ Annotated[StrictFloat, Field(gt=0)],
1399
+ Tuple[
1400
+ Annotated[StrictFloat, Field(gt=0)],
1401
+ Annotated[StrictFloat, Field(gt=0)]
1402
+ ]
1403
+ ] = None,
1404
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1405
+ _content_type: Optional[StrictStr] = None,
1406
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1407
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1408
+ ) -> RESTResponseType:
1409
+ """Changes and existing dataset
1410
+
1411
+
1412
+ :param dataset_update_object: (required)
1413
+ :type dataset_update_object: DatasetUpdateObject
1414
+ :param q_answer_api_key:
1415
+ :type q_answer_api_key: str
1416
+ :param _request_timeout: timeout setting for this request. If one
1417
+ number provided, it will be total request
1418
+ timeout. It can also be a pair (tuple) of
1419
+ (connection, read) timeouts.
1420
+ :type _request_timeout: int, tuple(int, int), optional
1421
+ :param _request_auth: set to override the auth_settings for an a single
1422
+ request; this effectively ignores the
1423
+ authentication in the spec for a single request.
1424
+ :type _request_auth: dict, optional
1425
+ :param _content_type: force content-type for the request.
1426
+ :type _content_type: str, Optional
1427
+ :param _headers: set to override the headers for a single
1428
+ request; this effectively ignores the headers
1429
+ in the spec for a single request.
1430
+ :type _headers: dict, optional
1431
+ :param _host_index: set to override the host_index for a single
1432
+ request; this effectively ignores the host_index
1433
+ in the spec for a single request.
1434
+ :type _host_index: int, optional
1435
+ :return: Returns the result object.
1436
+ """ # noqa: E501
1437
+
1438
+ _param = self._free_text_dataset_update_serialize(
1439
+ dataset_update_object=dataset_update_object,
1440
+ q_answer_api_key=q_answer_api_key,
1441
+ _request_auth=_request_auth,
1442
+ _content_type=_content_type,
1443
+ _headers=_headers,
1444
+ _host_index=_host_index
1445
+ )
1446
+
1447
+ _response_types_map: Dict[str, Optional[str]] = {
1448
+ '200': "DatasetSchema",
1449
+ }
1450
+ response_data = self.api_client.call_api(
1451
+ *_param,
1452
+ _request_timeout=_request_timeout
1453
+ )
1454
+ return response_data.response
1455
+
1456
+
1457
+ def _free_text_dataset_update_serialize(
1458
+ self,
1459
+ dataset_update_object,
1460
+ q_answer_api_key,
1461
+ _request_auth,
1462
+ _content_type,
1463
+ _headers,
1464
+ _host_index,
1465
+ ) -> RequestSerialized:
1466
+
1467
+ _host = None
1468
+
1469
+ _collection_formats: Dict[str, str] = {
1470
+ }
1471
+
1472
+ _path_params: Dict[str, str] = {}
1473
+ _query_params: List[Tuple[str, str]] = []
1474
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1475
+ _form_params: List[Tuple[str, str]] = []
1476
+ _files: Dict[
1477
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1478
+ ] = {}
1479
+ _body_params: Optional[bytes] = None
1480
+
1481
+ # process the path parameters
1482
+ # process the query parameters
1483
+ # process the header parameters
1484
+ if q_answer_api_key is not None:
1485
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1486
+ # process the form parameters
1487
+ # process the body parameter
1488
+ if dataset_update_object is not None:
1489
+ _body_params = dataset_update_object
1490
+
1491
+
1492
+ # set the HTTP header `Accept`
1493
+ if 'Accept' not in _header_params:
1494
+ _header_params['Accept'] = self.api_client.select_header_accept(
1495
+ [
1496
+ '*/*'
1497
+ ]
1498
+ )
1499
+
1500
+ # set the HTTP header `Content-Type`
1501
+ if _content_type:
1502
+ _header_params['Content-Type'] = _content_type
1503
+ else:
1504
+ _default_content_type = (
1505
+ self.api_client.select_header_content_type(
1506
+ [
1507
+ 'application/json'
1508
+ ]
1509
+ )
1510
+ )
1511
+ if _default_content_type is not None:
1512
+ _header_params['Content-Type'] = _default_content_type
1513
+
1514
+ # authentication setting
1515
+ _auth_settings: List[str] = [
1516
+ 'QAnswer-Api-Key',
1517
+ 'Bearer'
1518
+ ]
1519
+
1520
+ return self.api_client.param_serialize(
1521
+ method='PUT',
1522
+ resource_path='/api/ai-assistant/update',
1523
+ path_params=_path_params,
1524
+ query_params=_query_params,
1525
+ header_params=_header_params,
1526
+ body=_body_params,
1527
+ post_params=_form_params,
1528
+ files=_files,
1529
+ auth_settings=_auth_settings,
1530
+ collection_formats=_collection_formats,
1531
+ _host=_host,
1532
+ _request_auth=_request_auth
1533
+ )
1534
+
1535
+
1536
+
1537
+
1538
+ @validate_call
1539
+ def get_default_ai_assistant_prompts(
1540
+ self,
1541
+ username: StrictStr,
1542
+ dataset: StrictStr,
1543
+ q_answer_api_key: Optional[StrictStr] = None,
1544
+ _request_timeout: Union[
1545
+ None,
1546
+ Annotated[StrictFloat, Field(gt=0)],
1547
+ Tuple[
1548
+ Annotated[StrictFloat, Field(gt=0)],
1549
+ Annotated[StrictFloat, Field(gt=0)]
1550
+ ]
1551
+ ] = None,
1552
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1553
+ _content_type: Optional[StrictStr] = None,
1554
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1555
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1556
+ ) -> List[DefaultPrompt]:
1557
+ """list all the default prompt for all the tasks of the ai assitant
1558
+
1559
+
1560
+ :param username: (required)
1561
+ :type username: str
1562
+ :param dataset: (required)
1563
+ :type dataset: str
1564
+ :param q_answer_api_key:
1565
+ :type q_answer_api_key: str
1566
+ :param _request_timeout: timeout setting for this request. If one
1567
+ number provided, it will be total request
1568
+ timeout. It can also be a pair (tuple) of
1569
+ (connection, read) timeouts.
1570
+ :type _request_timeout: int, tuple(int, int), optional
1571
+ :param _request_auth: set to override the auth_settings for an a single
1572
+ request; this effectively ignores the
1573
+ authentication in the spec for a single request.
1574
+ :type _request_auth: dict, optional
1575
+ :param _content_type: force content-type for the request.
1576
+ :type _content_type: str, Optional
1577
+ :param _headers: set to override the headers for a single
1578
+ request; this effectively ignores the headers
1579
+ in the spec for a single request.
1580
+ :type _headers: dict, optional
1581
+ :param _host_index: set to override the host_index for a single
1582
+ request; this effectively ignores the host_index
1583
+ in the spec for a single request.
1584
+ :type _host_index: int, optional
1585
+ :return: Returns the result object.
1586
+ """ # noqa: E501
1587
+
1588
+ _param = self._get_default_ai_assistant_prompts_serialize(
1589
+ username=username,
1590
+ dataset=dataset,
1591
+ q_answer_api_key=q_answer_api_key,
1592
+ _request_auth=_request_auth,
1593
+ _content_type=_content_type,
1594
+ _headers=_headers,
1595
+ _host_index=_host_index
1596
+ )
1597
+
1598
+ _response_types_map: Dict[str, Optional[str]] = {
1599
+ '200': "List[DefaultPrompt]",
1600
+ }
1601
+ response_data = self.api_client.call_api(
1602
+ *_param,
1603
+ _request_timeout=_request_timeout
1604
+ )
1605
+ response_data.read()
1606
+ return self.api_client.response_deserialize(
1607
+ response_data=response_data,
1608
+ response_types_map=_response_types_map,
1609
+ ).data
1610
+
1611
+
1612
+ @validate_call
1613
+ def get_default_ai_assistant_prompts_with_http_info(
1614
+ self,
1615
+ username: StrictStr,
1616
+ dataset: StrictStr,
1617
+ q_answer_api_key: Optional[StrictStr] = None,
1618
+ _request_timeout: Union[
1619
+ None,
1620
+ Annotated[StrictFloat, Field(gt=0)],
1621
+ Tuple[
1622
+ Annotated[StrictFloat, Field(gt=0)],
1623
+ Annotated[StrictFloat, Field(gt=0)]
1624
+ ]
1625
+ ] = None,
1626
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1627
+ _content_type: Optional[StrictStr] = None,
1628
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1629
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1630
+ ) -> ApiResponse[List[DefaultPrompt]]:
1631
+ """list all the default prompt for all the tasks of the ai assitant
1632
+
1633
+
1634
+ :param username: (required)
1635
+ :type username: str
1636
+ :param dataset: (required)
1637
+ :type dataset: str
1638
+ :param q_answer_api_key:
1639
+ :type q_answer_api_key: str
1640
+ :param _request_timeout: timeout setting for this request. If one
1641
+ number provided, it will be total request
1642
+ timeout. It can also be a pair (tuple) of
1643
+ (connection, read) timeouts.
1644
+ :type _request_timeout: int, tuple(int, int), optional
1645
+ :param _request_auth: set to override the auth_settings for an a single
1646
+ request; this effectively ignores the
1647
+ authentication in the spec for a single request.
1648
+ :type _request_auth: dict, optional
1649
+ :param _content_type: force content-type for the request.
1650
+ :type _content_type: str, Optional
1651
+ :param _headers: set to override the headers for a single
1652
+ request; this effectively ignores the headers
1653
+ in the spec for a single request.
1654
+ :type _headers: dict, optional
1655
+ :param _host_index: set to override the host_index for a single
1656
+ request; this effectively ignores the host_index
1657
+ in the spec for a single request.
1658
+ :type _host_index: int, optional
1659
+ :return: Returns the result object.
1660
+ """ # noqa: E501
1661
+
1662
+ _param = self._get_default_ai_assistant_prompts_serialize(
1663
+ username=username,
1664
+ dataset=dataset,
1665
+ q_answer_api_key=q_answer_api_key,
1666
+ _request_auth=_request_auth,
1667
+ _content_type=_content_type,
1668
+ _headers=_headers,
1669
+ _host_index=_host_index
1670
+ )
1671
+
1672
+ _response_types_map: Dict[str, Optional[str]] = {
1673
+ '200': "List[DefaultPrompt]",
1674
+ }
1675
+ response_data = self.api_client.call_api(
1676
+ *_param,
1677
+ _request_timeout=_request_timeout
1678
+ )
1679
+ response_data.read()
1680
+ return self.api_client.response_deserialize(
1681
+ response_data=response_data,
1682
+ response_types_map=_response_types_map,
1683
+ )
1684
+
1685
+
1686
+ @validate_call
1687
+ def get_default_ai_assistant_prompts_without_preload_content(
1688
+ self,
1689
+ username: StrictStr,
1690
+ dataset: StrictStr,
1691
+ q_answer_api_key: Optional[StrictStr] = None,
1692
+ _request_timeout: Union[
1693
+ None,
1694
+ Annotated[StrictFloat, Field(gt=0)],
1695
+ Tuple[
1696
+ Annotated[StrictFloat, Field(gt=0)],
1697
+ Annotated[StrictFloat, Field(gt=0)]
1698
+ ]
1699
+ ] = None,
1700
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1701
+ _content_type: Optional[StrictStr] = None,
1702
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1703
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1704
+ ) -> RESTResponseType:
1705
+ """list all the default prompt for all the tasks of the ai assitant
1706
+
1707
+
1708
+ :param username: (required)
1709
+ :type username: str
1710
+ :param dataset: (required)
1711
+ :type dataset: str
1712
+ :param q_answer_api_key:
1713
+ :type q_answer_api_key: str
1714
+ :param _request_timeout: timeout setting for this request. If one
1715
+ number provided, it will be total request
1716
+ timeout. It can also be a pair (tuple) of
1717
+ (connection, read) timeouts.
1718
+ :type _request_timeout: int, tuple(int, int), optional
1719
+ :param _request_auth: set to override the auth_settings for an a single
1720
+ request; this effectively ignores the
1721
+ authentication in the spec for a single request.
1722
+ :type _request_auth: dict, optional
1723
+ :param _content_type: force content-type for the request.
1724
+ :type _content_type: str, Optional
1725
+ :param _headers: set to override the headers for a single
1726
+ request; this effectively ignores the headers
1727
+ in the spec for a single request.
1728
+ :type _headers: dict, optional
1729
+ :param _host_index: set to override the host_index for a single
1730
+ request; this effectively ignores the host_index
1731
+ in the spec for a single request.
1732
+ :type _host_index: int, optional
1733
+ :return: Returns the result object.
1734
+ """ # noqa: E501
1735
+
1736
+ _param = self._get_default_ai_assistant_prompts_serialize(
1737
+ username=username,
1738
+ dataset=dataset,
1739
+ q_answer_api_key=q_answer_api_key,
1740
+ _request_auth=_request_auth,
1741
+ _content_type=_content_type,
1742
+ _headers=_headers,
1743
+ _host_index=_host_index
1744
+ )
1745
+
1746
+ _response_types_map: Dict[str, Optional[str]] = {
1747
+ '200': "List[DefaultPrompt]",
1748
+ }
1749
+ response_data = self.api_client.call_api(
1750
+ *_param,
1751
+ _request_timeout=_request_timeout
1752
+ )
1753
+ return response_data.response
1754
+
1755
+
1756
+ def _get_default_ai_assistant_prompts_serialize(
1757
+ self,
1758
+ username,
1759
+ dataset,
1760
+ q_answer_api_key,
1761
+ _request_auth,
1762
+ _content_type,
1763
+ _headers,
1764
+ _host_index,
1765
+ ) -> RequestSerialized:
1766
+
1767
+ _host = None
1768
+
1769
+ _collection_formats: Dict[str, str] = {
1770
+ }
1771
+
1772
+ _path_params: Dict[str, str] = {}
1773
+ _query_params: List[Tuple[str, str]] = []
1774
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1775
+ _form_params: List[Tuple[str, str]] = []
1776
+ _files: Dict[
1777
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1778
+ ] = {}
1779
+ _body_params: Optional[bytes] = None
1780
+
1781
+ # process the path parameters
1782
+ # process the query parameters
1783
+ if username is not None:
1784
+
1785
+ _query_params.append(('username', username))
1786
+
1787
+ if dataset is not None:
1788
+
1789
+ _query_params.append(('dataset', dataset))
1790
+
1791
+ # process the header parameters
1792
+ if q_answer_api_key is not None:
1793
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
1794
+ # process the form parameters
1795
+ # process the body parameter
1796
+
1797
+
1798
+ # set the HTTP header `Accept`
1799
+ if 'Accept' not in _header_params:
1800
+ _header_params['Accept'] = self.api_client.select_header_accept(
1801
+ [
1802
+ '*/*'
1803
+ ]
1804
+ )
1805
+
1806
+
1807
+ # authentication setting
1808
+ _auth_settings: List[str] = [
1809
+ 'QAnswer-Api-Key',
1810
+ 'Bearer'
1811
+ ]
1812
+
1813
+ return self.api_client.param_serialize(
1814
+ method='GET',
1815
+ resource_path='/api/ai-assistant/default-prompts',
1816
+ path_params=_path_params,
1817
+ query_params=_query_params,
1818
+ header_params=_header_params,
1819
+ body=_body_params,
1820
+ post_params=_form_params,
1821
+ files=_files,
1822
+ auth_settings=_auth_settings,
1823
+ collection_formats=_collection_formats,
1824
+ _host=_host,
1825
+ _request_auth=_request_auth
1826
+ )
1827
+
1828
+
1829
+
1830
+
1831
+ @validate_call
1832
+ def get_description(
1833
+ self,
1834
+ username: StrictStr,
1835
+ dataset: StrictStr,
1836
+ q_answer_api_key: Optional[StrictStr] = None,
1837
+ _request_timeout: Union[
1838
+ None,
1839
+ Annotated[StrictFloat, Field(gt=0)],
1840
+ Tuple[
1841
+ Annotated[StrictFloat, Field(gt=0)],
1842
+ Annotated[StrictFloat, Field(gt=0)]
1843
+ ]
1844
+ ] = None,
1845
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1846
+ _content_type: Optional[StrictStr] = None,
1847
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1848
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1849
+ ) -> DatasetDescription:
1850
+ """To store the description of a dataset
1851
+
1852
+
1853
+ :param username: (required)
1854
+ :type username: str
1855
+ :param dataset: (required)
1856
+ :type dataset: str
1857
+ :param q_answer_api_key:
1858
+ :type q_answer_api_key: str
1859
+ :param _request_timeout: timeout setting for this request. If one
1860
+ number provided, it will be total request
1861
+ timeout. It can also be a pair (tuple) of
1862
+ (connection, read) timeouts.
1863
+ :type _request_timeout: int, tuple(int, int), optional
1864
+ :param _request_auth: set to override the auth_settings for an a single
1865
+ request; this effectively ignores the
1866
+ authentication in the spec for a single request.
1867
+ :type _request_auth: dict, optional
1868
+ :param _content_type: force content-type for the request.
1869
+ :type _content_type: str, Optional
1870
+ :param _headers: set to override the headers for a single
1871
+ request; this effectively ignores the headers
1872
+ in the spec for a single request.
1873
+ :type _headers: dict, optional
1874
+ :param _host_index: set to override the host_index for a single
1875
+ request; this effectively ignores the host_index
1876
+ in the spec for a single request.
1877
+ :type _host_index: int, optional
1878
+ :return: Returns the result object.
1879
+ """ # noqa: E501
1880
+
1881
+ _param = self._get_description_serialize(
1882
+ username=username,
1883
+ dataset=dataset,
1884
+ q_answer_api_key=q_answer_api_key,
1885
+ _request_auth=_request_auth,
1886
+ _content_type=_content_type,
1887
+ _headers=_headers,
1888
+ _host_index=_host_index
1889
+ )
1890
+
1891
+ _response_types_map: Dict[str, Optional[str]] = {
1892
+ '200': "DatasetDescription",
1893
+ }
1894
+ response_data = self.api_client.call_api(
1895
+ *_param,
1896
+ _request_timeout=_request_timeout
1897
+ )
1898
+ response_data.read()
1899
+ return self.api_client.response_deserialize(
1900
+ response_data=response_data,
1901
+ response_types_map=_response_types_map,
1902
+ ).data
1903
+
1904
+
1905
+ @validate_call
1906
+ def get_description_with_http_info(
1907
+ self,
1908
+ username: StrictStr,
1909
+ dataset: StrictStr,
1910
+ q_answer_api_key: Optional[StrictStr] = None,
1911
+ _request_timeout: Union[
1912
+ None,
1913
+ Annotated[StrictFloat, Field(gt=0)],
1914
+ Tuple[
1915
+ Annotated[StrictFloat, Field(gt=0)],
1916
+ Annotated[StrictFloat, Field(gt=0)]
1917
+ ]
1918
+ ] = None,
1919
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1920
+ _content_type: Optional[StrictStr] = None,
1921
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1922
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1923
+ ) -> ApiResponse[DatasetDescription]:
1924
+ """To store the description of a dataset
1925
+
1926
+
1927
+ :param username: (required)
1928
+ :type username: str
1929
+ :param dataset: (required)
1930
+ :type dataset: str
1931
+ :param q_answer_api_key:
1932
+ :type q_answer_api_key: str
1933
+ :param _request_timeout: timeout setting for this request. If one
1934
+ number provided, it will be total request
1935
+ timeout. It can also be a pair (tuple) of
1936
+ (connection, read) timeouts.
1937
+ :type _request_timeout: int, tuple(int, int), optional
1938
+ :param _request_auth: set to override the auth_settings for an a single
1939
+ request; this effectively ignores the
1940
+ authentication in the spec for a single request.
1941
+ :type _request_auth: dict, optional
1942
+ :param _content_type: force content-type for the request.
1943
+ :type _content_type: str, Optional
1944
+ :param _headers: set to override the headers for a single
1945
+ request; this effectively ignores the headers
1946
+ in the spec for a single request.
1947
+ :type _headers: dict, optional
1948
+ :param _host_index: set to override the host_index for a single
1949
+ request; this effectively ignores the host_index
1950
+ in the spec for a single request.
1951
+ :type _host_index: int, optional
1952
+ :return: Returns the result object.
1953
+ """ # noqa: E501
1954
+
1955
+ _param = self._get_description_serialize(
1956
+ username=username,
1957
+ dataset=dataset,
1958
+ q_answer_api_key=q_answer_api_key,
1959
+ _request_auth=_request_auth,
1960
+ _content_type=_content_type,
1961
+ _headers=_headers,
1962
+ _host_index=_host_index
1963
+ )
1964
+
1965
+ _response_types_map: Dict[str, Optional[str]] = {
1966
+ '200': "DatasetDescription",
1967
+ }
1968
+ response_data = self.api_client.call_api(
1969
+ *_param,
1970
+ _request_timeout=_request_timeout
1971
+ )
1972
+ response_data.read()
1973
+ return self.api_client.response_deserialize(
1974
+ response_data=response_data,
1975
+ response_types_map=_response_types_map,
1976
+ )
1977
+
1978
+
1979
+ @validate_call
1980
+ def get_description_without_preload_content(
1981
+ self,
1982
+ username: StrictStr,
1983
+ dataset: StrictStr,
1984
+ q_answer_api_key: Optional[StrictStr] = None,
1985
+ _request_timeout: Union[
1986
+ None,
1987
+ Annotated[StrictFloat, Field(gt=0)],
1988
+ Tuple[
1989
+ Annotated[StrictFloat, Field(gt=0)],
1990
+ Annotated[StrictFloat, Field(gt=0)]
1991
+ ]
1992
+ ] = None,
1993
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1994
+ _content_type: Optional[StrictStr] = None,
1995
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1996
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1997
+ ) -> RESTResponseType:
1998
+ """To store the description of a dataset
1999
+
2000
+
2001
+ :param username: (required)
2002
+ :type username: str
2003
+ :param dataset: (required)
2004
+ :type dataset: str
2005
+ :param q_answer_api_key:
2006
+ :type q_answer_api_key: str
2007
+ :param _request_timeout: timeout setting for this request. If one
2008
+ number provided, it will be total request
2009
+ timeout. It can also be a pair (tuple) of
2010
+ (connection, read) timeouts.
2011
+ :type _request_timeout: int, tuple(int, int), optional
2012
+ :param _request_auth: set to override the auth_settings for an a single
2013
+ request; this effectively ignores the
2014
+ authentication in the spec for a single request.
2015
+ :type _request_auth: dict, optional
2016
+ :param _content_type: force content-type for the request.
2017
+ :type _content_type: str, Optional
2018
+ :param _headers: set to override the headers for a single
2019
+ request; this effectively ignores the headers
2020
+ in the spec for a single request.
2021
+ :type _headers: dict, optional
2022
+ :param _host_index: set to override the host_index for a single
2023
+ request; this effectively ignores the host_index
2024
+ in the spec for a single request.
2025
+ :type _host_index: int, optional
2026
+ :return: Returns the result object.
2027
+ """ # noqa: E501
2028
+
2029
+ _param = self._get_description_serialize(
2030
+ username=username,
2031
+ dataset=dataset,
2032
+ q_answer_api_key=q_answer_api_key,
2033
+ _request_auth=_request_auth,
2034
+ _content_type=_content_type,
2035
+ _headers=_headers,
2036
+ _host_index=_host_index
2037
+ )
2038
+
2039
+ _response_types_map: Dict[str, Optional[str]] = {
2040
+ '200': "DatasetDescription",
2041
+ }
2042
+ response_data = self.api_client.call_api(
2043
+ *_param,
2044
+ _request_timeout=_request_timeout
2045
+ )
2046
+ return response_data.response
2047
+
2048
+
2049
+ def _get_description_serialize(
2050
+ self,
2051
+ username,
2052
+ dataset,
2053
+ q_answer_api_key,
2054
+ _request_auth,
2055
+ _content_type,
2056
+ _headers,
2057
+ _host_index,
2058
+ ) -> RequestSerialized:
2059
+
2060
+ _host = None
2061
+
2062
+ _collection_formats: Dict[str, str] = {
2063
+ }
2064
+
2065
+ _path_params: Dict[str, str] = {}
2066
+ _query_params: List[Tuple[str, str]] = []
2067
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2068
+ _form_params: List[Tuple[str, str]] = []
2069
+ _files: Dict[
2070
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2071
+ ] = {}
2072
+ _body_params: Optional[bytes] = None
2073
+
2074
+ # process the path parameters
2075
+ # process the query parameters
2076
+ if username is not None:
2077
+
2078
+ _query_params.append(('username', username))
2079
+
2080
+ if dataset is not None:
2081
+
2082
+ _query_params.append(('dataset', dataset))
2083
+
2084
+ # process the header parameters
2085
+ if q_answer_api_key is not None:
2086
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2087
+ # process the form parameters
2088
+ # process the body parameter
2089
+
2090
+
2091
+ # set the HTTP header `Accept`
2092
+ if 'Accept' not in _header_params:
2093
+ _header_params['Accept'] = self.api_client.select_header_accept(
2094
+ [
2095
+ '*/*'
2096
+ ]
2097
+ )
2098
+
2099
+
2100
+ # authentication setting
2101
+ _auth_settings: List[str] = [
2102
+ 'QAnswer-Api-Key',
2103
+ 'Bearer'
2104
+ ]
2105
+
2106
+ return self.api_client.param_serialize(
2107
+ method='GET',
2108
+ resource_path='/api/ai-assistant/description',
2109
+ path_params=_path_params,
2110
+ query_params=_query_params,
2111
+ header_params=_header_params,
2112
+ body=_body_params,
2113
+ post_params=_form_params,
2114
+ files=_files,
2115
+ auth_settings=_auth_settings,
2116
+ collection_formats=_collection_formats,
2117
+ _host=_host,
2118
+ _request_auth=_request_auth
2119
+ )
2120
+
2121
+
2122
+
2123
+
2124
+ @validate_call
2125
+ def get_detail(
2126
+ self,
2127
+ username: StrictStr,
2128
+ dataset: StrictStr,
2129
+ q_answer_api_key: Optional[StrictStr] = None,
2130
+ _request_timeout: Union[
2131
+ None,
2132
+ Annotated[StrictFloat, Field(gt=0)],
2133
+ Tuple[
2134
+ Annotated[StrictFloat, Field(gt=0)],
2135
+ Annotated[StrictFloat, Field(gt=0)]
2136
+ ]
2137
+ ] = None,
2138
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2139
+ _content_type: Optional[StrictStr] = None,
2140
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2141
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2142
+ ) -> DatasetDetail:
2143
+ """Dataset detail for one specific dataset
2144
+
2145
+
2146
+ :param username: (required)
2147
+ :type username: str
2148
+ :param dataset: (required)
2149
+ :type dataset: str
2150
+ :param q_answer_api_key:
2151
+ :type q_answer_api_key: str
2152
+ :param _request_timeout: timeout setting for this request. If one
2153
+ number provided, it will be total request
2154
+ timeout. It can also be a pair (tuple) of
2155
+ (connection, read) timeouts.
2156
+ :type _request_timeout: int, tuple(int, int), optional
2157
+ :param _request_auth: set to override the auth_settings for an a single
2158
+ request; this effectively ignores the
2159
+ authentication in the spec for a single request.
2160
+ :type _request_auth: dict, optional
2161
+ :param _content_type: force content-type for the request.
2162
+ :type _content_type: str, Optional
2163
+ :param _headers: set to override the headers for a single
2164
+ request; this effectively ignores the headers
2165
+ in the spec for a single request.
2166
+ :type _headers: dict, optional
2167
+ :param _host_index: set to override the host_index for a single
2168
+ request; this effectively ignores the host_index
2169
+ in the spec for a single request.
2170
+ :type _host_index: int, optional
2171
+ :return: Returns the result object.
2172
+ """ # noqa: E501
2173
+
2174
+ _param = self._get_detail_serialize(
2175
+ username=username,
2176
+ dataset=dataset,
2177
+ q_answer_api_key=q_answer_api_key,
2178
+ _request_auth=_request_auth,
2179
+ _content_type=_content_type,
2180
+ _headers=_headers,
2181
+ _host_index=_host_index
2182
+ )
2183
+
2184
+ _response_types_map: Dict[str, Optional[str]] = {
2185
+ '200': "DatasetDetail",
2186
+ }
2187
+ response_data = self.api_client.call_api(
2188
+ *_param,
2189
+ _request_timeout=_request_timeout
2190
+ )
2191
+ response_data.read()
2192
+ return self.api_client.response_deserialize(
2193
+ response_data=response_data,
2194
+ response_types_map=_response_types_map,
2195
+ ).data
2196
+
2197
+
2198
+ @validate_call
2199
+ def get_detail_with_http_info(
2200
+ self,
2201
+ username: StrictStr,
2202
+ dataset: StrictStr,
2203
+ q_answer_api_key: Optional[StrictStr] = None,
2204
+ _request_timeout: Union[
2205
+ None,
2206
+ Annotated[StrictFloat, Field(gt=0)],
2207
+ Tuple[
2208
+ Annotated[StrictFloat, Field(gt=0)],
2209
+ Annotated[StrictFloat, Field(gt=0)]
2210
+ ]
2211
+ ] = None,
2212
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2213
+ _content_type: Optional[StrictStr] = None,
2214
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2215
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2216
+ ) -> ApiResponse[DatasetDetail]:
2217
+ """Dataset detail for one specific dataset
2218
+
2219
+
2220
+ :param username: (required)
2221
+ :type username: str
2222
+ :param dataset: (required)
2223
+ :type dataset: str
2224
+ :param q_answer_api_key:
2225
+ :type q_answer_api_key: str
2226
+ :param _request_timeout: timeout setting for this request. If one
2227
+ number provided, it will be total request
2228
+ timeout. It can also be a pair (tuple) of
2229
+ (connection, read) timeouts.
2230
+ :type _request_timeout: int, tuple(int, int), optional
2231
+ :param _request_auth: set to override the auth_settings for an a single
2232
+ request; this effectively ignores the
2233
+ authentication in the spec for a single request.
2234
+ :type _request_auth: dict, optional
2235
+ :param _content_type: force content-type for the request.
2236
+ :type _content_type: str, Optional
2237
+ :param _headers: set to override the headers for a single
2238
+ request; this effectively ignores the headers
2239
+ in the spec for a single request.
2240
+ :type _headers: dict, optional
2241
+ :param _host_index: set to override the host_index for a single
2242
+ request; this effectively ignores the host_index
2243
+ in the spec for a single request.
2244
+ :type _host_index: int, optional
2245
+ :return: Returns the result object.
2246
+ """ # noqa: E501
2247
+
2248
+ _param = self._get_detail_serialize(
2249
+ username=username,
2250
+ dataset=dataset,
2251
+ q_answer_api_key=q_answer_api_key,
2252
+ _request_auth=_request_auth,
2253
+ _content_type=_content_type,
2254
+ _headers=_headers,
2255
+ _host_index=_host_index
2256
+ )
2257
+
2258
+ _response_types_map: Dict[str, Optional[str]] = {
2259
+ '200': "DatasetDetail",
2260
+ }
2261
+ response_data = self.api_client.call_api(
2262
+ *_param,
2263
+ _request_timeout=_request_timeout
2264
+ )
2265
+ response_data.read()
2266
+ return self.api_client.response_deserialize(
2267
+ response_data=response_data,
2268
+ response_types_map=_response_types_map,
2269
+ )
2270
+
2271
+
2272
+ @validate_call
2273
+ def get_detail_without_preload_content(
2274
+ self,
2275
+ username: StrictStr,
2276
+ dataset: StrictStr,
2277
+ q_answer_api_key: Optional[StrictStr] = None,
2278
+ _request_timeout: Union[
2279
+ None,
2280
+ Annotated[StrictFloat, Field(gt=0)],
2281
+ Tuple[
2282
+ Annotated[StrictFloat, Field(gt=0)],
2283
+ Annotated[StrictFloat, Field(gt=0)]
2284
+ ]
2285
+ ] = None,
2286
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2287
+ _content_type: Optional[StrictStr] = None,
2288
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2289
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2290
+ ) -> RESTResponseType:
2291
+ """Dataset detail for one specific dataset
2292
+
2293
+
2294
+ :param username: (required)
2295
+ :type username: str
2296
+ :param dataset: (required)
2297
+ :type dataset: str
2298
+ :param q_answer_api_key:
2299
+ :type q_answer_api_key: str
2300
+ :param _request_timeout: timeout setting for this request. If one
2301
+ number provided, it will be total request
2302
+ timeout. It can also be a pair (tuple) of
2303
+ (connection, read) timeouts.
2304
+ :type _request_timeout: int, tuple(int, int), optional
2305
+ :param _request_auth: set to override the auth_settings for an a single
2306
+ request; this effectively ignores the
2307
+ authentication in the spec for a single request.
2308
+ :type _request_auth: dict, optional
2309
+ :param _content_type: force content-type for the request.
2310
+ :type _content_type: str, Optional
2311
+ :param _headers: set to override the headers for a single
2312
+ request; this effectively ignores the headers
2313
+ in the spec for a single request.
2314
+ :type _headers: dict, optional
2315
+ :param _host_index: set to override the host_index for a single
2316
+ request; this effectively ignores the host_index
2317
+ in the spec for a single request.
2318
+ :type _host_index: int, optional
2319
+ :return: Returns the result object.
2320
+ """ # noqa: E501
2321
+
2322
+ _param = self._get_detail_serialize(
2323
+ username=username,
2324
+ dataset=dataset,
2325
+ q_answer_api_key=q_answer_api_key,
2326
+ _request_auth=_request_auth,
2327
+ _content_type=_content_type,
2328
+ _headers=_headers,
2329
+ _host_index=_host_index
2330
+ )
2331
+
2332
+ _response_types_map: Dict[str, Optional[str]] = {
2333
+ '200': "DatasetDetail",
2334
+ }
2335
+ response_data = self.api_client.call_api(
2336
+ *_param,
2337
+ _request_timeout=_request_timeout
2338
+ )
2339
+ return response_data.response
2340
+
2341
+
2342
+ def _get_detail_serialize(
2343
+ self,
2344
+ username,
2345
+ dataset,
2346
+ q_answer_api_key,
2347
+ _request_auth,
2348
+ _content_type,
2349
+ _headers,
2350
+ _host_index,
2351
+ ) -> RequestSerialized:
2352
+
2353
+ _host = None
2354
+
2355
+ _collection_formats: Dict[str, str] = {
2356
+ }
2357
+
2358
+ _path_params: Dict[str, str] = {}
2359
+ _query_params: List[Tuple[str, str]] = []
2360
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2361
+ _form_params: List[Tuple[str, str]] = []
2362
+ _files: Dict[
2363
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2364
+ ] = {}
2365
+ _body_params: Optional[bytes] = None
2366
+
2367
+ # process the path parameters
2368
+ # process the query parameters
2369
+ if username is not None:
2370
+
2371
+ _query_params.append(('username', username))
2372
+
2373
+ if dataset is not None:
2374
+
2375
+ _query_params.append(('dataset', dataset))
2376
+
2377
+ # process the header parameters
2378
+ if q_answer_api_key is not None:
2379
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2380
+ # process the form parameters
2381
+ # process the body parameter
2382
+
2383
+
2384
+ # set the HTTP header `Accept`
2385
+ if 'Accept' not in _header_params:
2386
+ _header_params['Accept'] = self.api_client.select_header_accept(
2387
+ [
2388
+ '*/*'
2389
+ ]
2390
+ )
2391
+
2392
+
2393
+ # authentication setting
2394
+ _auth_settings: List[str] = [
2395
+ 'QAnswer-Api-Key',
2396
+ 'Bearer'
2397
+ ]
2398
+
2399
+ return self.api_client.param_serialize(
2400
+ method='GET',
2401
+ resource_path='/api/ai-assistant/detail',
2402
+ path_params=_path_params,
2403
+ query_params=_query_params,
2404
+ header_params=_header_params,
2405
+ body=_body_params,
2406
+ post_params=_form_params,
2407
+ files=_files,
2408
+ auth_settings=_auth_settings,
2409
+ collection_formats=_collection_formats,
2410
+ _host=_host,
2411
+ _request_auth=_request_auth
2412
+ )
2413
+
2414
+
2415
+
2416
+
2417
+ @validate_call
2418
+ def get_list_all_datasets(
2419
+ self,
2420
+ _request_timeout: Union[
2421
+ None,
2422
+ Annotated[StrictFloat, Field(gt=0)],
2423
+ Tuple[
2424
+ Annotated[StrictFloat, Field(gt=0)],
2425
+ Annotated[StrictFloat, Field(gt=0)]
2426
+ ]
2427
+ ] = None,
2428
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2429
+ _content_type: Optional[StrictStr] = None,
2430
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2431
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2432
+ ) -> List[AiAssistantDto]:
2433
+ """Lists all ai assistants accessible by a user
2434
+
2435
+
2436
+ :param _request_timeout: timeout setting for this request. If one
2437
+ number provided, it will be total request
2438
+ timeout. It can also be a pair (tuple) of
2439
+ (connection, read) timeouts.
2440
+ :type _request_timeout: int, tuple(int, int), optional
2441
+ :param _request_auth: set to override the auth_settings for an a single
2442
+ request; this effectively ignores the
2443
+ authentication in the spec for a single request.
2444
+ :type _request_auth: dict, optional
2445
+ :param _content_type: force content-type for the request.
2446
+ :type _content_type: str, Optional
2447
+ :param _headers: set to override the headers for a single
2448
+ request; this effectively ignores the headers
2449
+ in the spec for a single request.
2450
+ :type _headers: dict, optional
2451
+ :param _host_index: set to override the host_index for a single
2452
+ request; this effectively ignores the host_index
2453
+ in the spec for a single request.
2454
+ :type _host_index: int, optional
2455
+ :return: Returns the result object.
2456
+ """ # noqa: E501
2457
+
2458
+ _param = self._get_list_all_datasets_serialize(
2459
+ _request_auth=_request_auth,
2460
+ _content_type=_content_type,
2461
+ _headers=_headers,
2462
+ _host_index=_host_index
2463
+ )
2464
+
2465
+ _response_types_map: Dict[str, Optional[str]] = {
2466
+ '200': "List[AiAssistantDto]",
2467
+ }
2468
+ response_data = self.api_client.call_api(
2469
+ *_param,
2470
+ _request_timeout=_request_timeout
2471
+ )
2472
+ response_data.read()
2473
+ return self.api_client.response_deserialize(
2474
+ response_data=response_data,
2475
+ response_types_map=_response_types_map,
2476
+ ).data
2477
+
2478
+
2479
+ @validate_call
2480
+ def get_list_all_datasets_with_http_info(
2481
+ self,
2482
+ _request_timeout: Union[
2483
+ None,
2484
+ Annotated[StrictFloat, Field(gt=0)],
2485
+ Tuple[
2486
+ Annotated[StrictFloat, Field(gt=0)],
2487
+ Annotated[StrictFloat, Field(gt=0)]
2488
+ ]
2489
+ ] = None,
2490
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2491
+ _content_type: Optional[StrictStr] = None,
2492
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2493
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2494
+ ) -> ApiResponse[List[AiAssistantDto]]:
2495
+ """Lists all ai assistants accessible by a user
2496
+
2497
+
2498
+ :param _request_timeout: timeout setting for this request. If one
2499
+ number provided, it will be total request
2500
+ timeout. It can also be a pair (tuple) of
2501
+ (connection, read) timeouts.
2502
+ :type _request_timeout: int, tuple(int, int), optional
2503
+ :param _request_auth: set to override the auth_settings for an a single
2504
+ request; this effectively ignores the
2505
+ authentication in the spec for a single request.
2506
+ :type _request_auth: dict, optional
2507
+ :param _content_type: force content-type for the request.
2508
+ :type _content_type: str, Optional
2509
+ :param _headers: set to override the headers for a single
2510
+ request; this effectively ignores the headers
2511
+ in the spec for a single request.
2512
+ :type _headers: dict, optional
2513
+ :param _host_index: set to override the host_index for a single
2514
+ request; this effectively ignores the host_index
2515
+ in the spec for a single request.
2516
+ :type _host_index: int, optional
2517
+ :return: Returns the result object.
2518
+ """ # noqa: E501
2519
+
2520
+ _param = self._get_list_all_datasets_serialize(
2521
+ _request_auth=_request_auth,
2522
+ _content_type=_content_type,
2523
+ _headers=_headers,
2524
+ _host_index=_host_index
2525
+ )
2526
+
2527
+ _response_types_map: Dict[str, Optional[str]] = {
2528
+ '200': "List[AiAssistantDto]",
2529
+ }
2530
+ response_data = self.api_client.call_api(
2531
+ *_param,
2532
+ _request_timeout=_request_timeout
2533
+ )
2534
+ response_data.read()
2535
+ return self.api_client.response_deserialize(
2536
+ response_data=response_data,
2537
+ response_types_map=_response_types_map,
2538
+ )
2539
+
2540
+
2541
+ @validate_call
2542
+ def get_list_all_datasets_without_preload_content(
2543
+ self,
2544
+ _request_timeout: Union[
2545
+ None,
2546
+ Annotated[StrictFloat, Field(gt=0)],
2547
+ Tuple[
2548
+ Annotated[StrictFloat, Field(gt=0)],
2549
+ Annotated[StrictFloat, Field(gt=0)]
2550
+ ]
2551
+ ] = None,
2552
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2553
+ _content_type: Optional[StrictStr] = None,
2554
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2555
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2556
+ ) -> RESTResponseType:
2557
+ """Lists all ai assistants accessible by a user
2558
+
2559
+
2560
+ :param _request_timeout: timeout setting for this request. If one
2561
+ number provided, it will be total request
2562
+ timeout. It can also be a pair (tuple) of
2563
+ (connection, read) timeouts.
2564
+ :type _request_timeout: int, tuple(int, int), optional
2565
+ :param _request_auth: set to override the auth_settings for an a single
2566
+ request; this effectively ignores the
2567
+ authentication in the spec for a single request.
2568
+ :type _request_auth: dict, optional
2569
+ :param _content_type: force content-type for the request.
2570
+ :type _content_type: str, Optional
2571
+ :param _headers: set to override the headers for a single
2572
+ request; this effectively ignores the headers
2573
+ in the spec for a single request.
2574
+ :type _headers: dict, optional
2575
+ :param _host_index: set to override the host_index for a single
2576
+ request; this effectively ignores the host_index
2577
+ in the spec for a single request.
2578
+ :type _host_index: int, optional
2579
+ :return: Returns the result object.
2580
+ """ # noqa: E501
2581
+
2582
+ _param = self._get_list_all_datasets_serialize(
2583
+ _request_auth=_request_auth,
2584
+ _content_type=_content_type,
2585
+ _headers=_headers,
2586
+ _host_index=_host_index
2587
+ )
2588
+
2589
+ _response_types_map: Dict[str, Optional[str]] = {
2590
+ '200': "List[AiAssistantDto]",
2591
+ }
2592
+ response_data = self.api_client.call_api(
2593
+ *_param,
2594
+ _request_timeout=_request_timeout
2595
+ )
2596
+ return response_data.response
2597
+
2598
+
2599
+ def _get_list_all_datasets_serialize(
2600
+ self,
2601
+ _request_auth,
2602
+ _content_type,
2603
+ _headers,
2604
+ _host_index,
2605
+ ) -> RequestSerialized:
2606
+
2607
+ _host = None
2608
+
2609
+ _collection_formats: Dict[str, str] = {
2610
+ }
2611
+
2612
+ _path_params: Dict[str, str] = {}
2613
+ _query_params: List[Tuple[str, str]] = []
2614
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2615
+ _form_params: List[Tuple[str, str]] = []
2616
+ _files: Dict[
2617
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2618
+ ] = {}
2619
+ _body_params: Optional[bytes] = None
2620
+
2621
+ # process the path parameters
2622
+ # process the query parameters
2623
+ # process the header parameters
2624
+ # process the form parameters
2625
+ # process the body parameter
2626
+
2627
+
2628
+ # set the HTTP header `Accept`
2629
+ if 'Accept' not in _header_params:
2630
+ _header_params['Accept'] = self.api_client.select_header_accept(
2631
+ [
2632
+ '*/*'
2633
+ ]
2634
+ )
2635
+
2636
+
2637
+ # authentication setting
2638
+ _auth_settings: List[str] = [
2639
+ 'QAnswer-Api-Key',
2640
+ 'Bearer'
2641
+ ]
2642
+
2643
+ return self.api_client.param_serialize(
2644
+ method='GET',
2645
+ resource_path='/api/ai-assistant/list',
2646
+ path_params=_path_params,
2647
+ query_params=_query_params,
2648
+ header_params=_header_params,
2649
+ body=_body_params,
2650
+ post_params=_form_params,
2651
+ files=_files,
2652
+ auth_settings=_auth_settings,
2653
+ collection_formats=_collection_formats,
2654
+ _host=_host,
2655
+ _request_auth=_request_auth
2656
+ )
2657
+
2658
+
2659
+
2660
+
2661
+ @validate_call
2662
+ def get_logo1(
2663
+ self,
2664
+ username: StrictStr,
2665
+ dataset: StrictStr,
2666
+ q_answer_api_key: Optional[StrictStr] = None,
2667
+ _request_timeout: Union[
2668
+ None,
2669
+ Annotated[StrictFloat, Field(gt=0)],
2670
+ Tuple[
2671
+ Annotated[StrictFloat, Field(gt=0)],
2672
+ Annotated[StrictFloat, Field(gt=0)]
2673
+ ]
2674
+ ] = None,
2675
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2676
+ _content_type: Optional[StrictStr] = None,
2677
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2678
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2679
+ ) -> bytearray:
2680
+ """Get the logo of the ai assistant
2681
+
2682
+
2683
+ :param username: (required)
2684
+ :type username: str
2685
+ :param dataset: (required)
2686
+ :type dataset: str
2687
+ :param q_answer_api_key:
2688
+ :type q_answer_api_key: str
2689
+ :param _request_timeout: timeout setting for this request. If one
2690
+ number provided, it will be total request
2691
+ timeout. It can also be a pair (tuple) of
2692
+ (connection, read) timeouts.
2693
+ :type _request_timeout: int, tuple(int, int), optional
2694
+ :param _request_auth: set to override the auth_settings for an a single
2695
+ request; this effectively ignores the
2696
+ authentication in the spec for a single request.
2697
+ :type _request_auth: dict, optional
2698
+ :param _content_type: force content-type for the request.
2699
+ :type _content_type: str, Optional
2700
+ :param _headers: set to override the headers for a single
2701
+ request; this effectively ignores the headers
2702
+ in the spec for a single request.
2703
+ :type _headers: dict, optional
2704
+ :param _host_index: set to override the host_index for a single
2705
+ request; this effectively ignores the host_index
2706
+ in the spec for a single request.
2707
+ :type _host_index: int, optional
2708
+ :return: Returns the result object.
2709
+ """ # noqa: E501
2710
+
2711
+ _param = self._get_logo1_serialize(
2712
+ username=username,
2713
+ dataset=dataset,
2714
+ q_answer_api_key=q_answer_api_key,
2715
+ _request_auth=_request_auth,
2716
+ _content_type=_content_type,
2717
+ _headers=_headers,
2718
+ _host_index=_host_index
2719
+ )
2720
+
2721
+ _response_types_map: Dict[str, Optional[str]] = {
2722
+ '200': "bytearray",
2723
+ }
2724
+ response_data = self.api_client.call_api(
2725
+ *_param,
2726
+ _request_timeout=_request_timeout
2727
+ )
2728
+ response_data.read()
2729
+ return self.api_client.response_deserialize(
2730
+ response_data=response_data,
2731
+ response_types_map=_response_types_map,
2732
+ ).data
2733
+
2734
+
2735
+ @validate_call
2736
+ def get_logo1_with_http_info(
2737
+ self,
2738
+ username: StrictStr,
2739
+ dataset: StrictStr,
2740
+ q_answer_api_key: Optional[StrictStr] = None,
2741
+ _request_timeout: Union[
2742
+ None,
2743
+ Annotated[StrictFloat, Field(gt=0)],
2744
+ Tuple[
2745
+ Annotated[StrictFloat, Field(gt=0)],
2746
+ Annotated[StrictFloat, Field(gt=0)]
2747
+ ]
2748
+ ] = None,
2749
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2750
+ _content_type: Optional[StrictStr] = None,
2751
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2752
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2753
+ ) -> ApiResponse[bytearray]:
2754
+ """Get the logo of the ai assistant
2755
+
2756
+
2757
+ :param username: (required)
2758
+ :type username: str
2759
+ :param dataset: (required)
2760
+ :type dataset: str
2761
+ :param q_answer_api_key:
2762
+ :type q_answer_api_key: str
2763
+ :param _request_timeout: timeout setting for this request. If one
2764
+ number provided, it will be total request
2765
+ timeout. It can also be a pair (tuple) of
2766
+ (connection, read) timeouts.
2767
+ :type _request_timeout: int, tuple(int, int), optional
2768
+ :param _request_auth: set to override the auth_settings for an a single
2769
+ request; this effectively ignores the
2770
+ authentication in the spec for a single request.
2771
+ :type _request_auth: dict, optional
2772
+ :param _content_type: force content-type for the request.
2773
+ :type _content_type: str, Optional
2774
+ :param _headers: set to override the headers for a single
2775
+ request; this effectively ignores the headers
2776
+ in the spec for a single request.
2777
+ :type _headers: dict, optional
2778
+ :param _host_index: set to override the host_index for a single
2779
+ request; this effectively ignores the host_index
2780
+ in the spec for a single request.
2781
+ :type _host_index: int, optional
2782
+ :return: Returns the result object.
2783
+ """ # noqa: E501
2784
+
2785
+ _param = self._get_logo1_serialize(
2786
+ username=username,
2787
+ dataset=dataset,
2788
+ q_answer_api_key=q_answer_api_key,
2789
+ _request_auth=_request_auth,
2790
+ _content_type=_content_type,
2791
+ _headers=_headers,
2792
+ _host_index=_host_index
2793
+ )
2794
+
2795
+ _response_types_map: Dict[str, Optional[str]] = {
2796
+ '200': "bytearray",
2797
+ }
2798
+ response_data = self.api_client.call_api(
2799
+ *_param,
2800
+ _request_timeout=_request_timeout
2801
+ )
2802
+ response_data.read()
2803
+ return self.api_client.response_deserialize(
2804
+ response_data=response_data,
2805
+ response_types_map=_response_types_map,
2806
+ )
2807
+
2808
+
2809
+ @validate_call
2810
+ def get_logo1_without_preload_content(
2811
+ self,
2812
+ username: StrictStr,
2813
+ dataset: StrictStr,
2814
+ q_answer_api_key: Optional[StrictStr] = None,
2815
+ _request_timeout: Union[
2816
+ None,
2817
+ Annotated[StrictFloat, Field(gt=0)],
2818
+ Tuple[
2819
+ Annotated[StrictFloat, Field(gt=0)],
2820
+ Annotated[StrictFloat, Field(gt=0)]
2821
+ ]
2822
+ ] = None,
2823
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2824
+ _content_type: Optional[StrictStr] = None,
2825
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2826
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2827
+ ) -> RESTResponseType:
2828
+ """Get the logo of the ai assistant
2829
+
2830
+
2831
+ :param username: (required)
2832
+ :type username: str
2833
+ :param dataset: (required)
2834
+ :type dataset: str
2835
+ :param q_answer_api_key:
2836
+ :type q_answer_api_key: str
2837
+ :param _request_timeout: timeout setting for this request. If one
2838
+ number provided, it will be total request
2839
+ timeout. It can also be a pair (tuple) of
2840
+ (connection, read) timeouts.
2841
+ :type _request_timeout: int, tuple(int, int), optional
2842
+ :param _request_auth: set to override the auth_settings for an a single
2843
+ request; this effectively ignores the
2844
+ authentication in the spec for a single request.
2845
+ :type _request_auth: dict, optional
2846
+ :param _content_type: force content-type for the request.
2847
+ :type _content_type: str, Optional
2848
+ :param _headers: set to override the headers for a single
2849
+ request; this effectively ignores the headers
2850
+ in the spec for a single request.
2851
+ :type _headers: dict, optional
2852
+ :param _host_index: set to override the host_index for a single
2853
+ request; this effectively ignores the host_index
2854
+ in the spec for a single request.
2855
+ :type _host_index: int, optional
2856
+ :return: Returns the result object.
2857
+ """ # noqa: E501
2858
+
2859
+ _param = self._get_logo1_serialize(
2860
+ username=username,
2861
+ dataset=dataset,
2862
+ q_answer_api_key=q_answer_api_key,
2863
+ _request_auth=_request_auth,
2864
+ _content_type=_content_type,
2865
+ _headers=_headers,
2866
+ _host_index=_host_index
2867
+ )
2868
+
2869
+ _response_types_map: Dict[str, Optional[str]] = {
2870
+ '200': "bytearray",
2871
+ }
2872
+ response_data = self.api_client.call_api(
2873
+ *_param,
2874
+ _request_timeout=_request_timeout
2875
+ )
2876
+ return response_data.response
2877
+
2878
+
2879
+ def _get_logo1_serialize(
2880
+ self,
2881
+ username,
2882
+ dataset,
2883
+ q_answer_api_key,
2884
+ _request_auth,
2885
+ _content_type,
2886
+ _headers,
2887
+ _host_index,
2888
+ ) -> RequestSerialized:
2889
+
2890
+ _host = None
2891
+
2892
+ _collection_formats: Dict[str, str] = {
2893
+ }
2894
+
2895
+ _path_params: Dict[str, str] = {}
2896
+ _query_params: List[Tuple[str, str]] = []
2897
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2898
+ _form_params: List[Tuple[str, str]] = []
2899
+ _files: Dict[
2900
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2901
+ ] = {}
2902
+ _body_params: Optional[bytes] = None
2903
+
2904
+ # process the path parameters
2905
+ # process the query parameters
2906
+ if username is not None:
2907
+
2908
+ _query_params.append(('username', username))
2909
+
2910
+ if dataset is not None:
2911
+
2912
+ _query_params.append(('dataset', dataset))
2913
+
2914
+ # process the header parameters
2915
+ if q_answer_api_key is not None:
2916
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
2917
+ # process the form parameters
2918
+ # process the body parameter
2919
+
2920
+
2921
+ # set the HTTP header `Accept`
2922
+ if 'Accept' not in _header_params:
2923
+ _header_params['Accept'] = self.api_client.select_header_accept(
2924
+ [
2925
+ 'image/png'
2926
+ ]
2927
+ )
2928
+
2929
+
2930
+ # authentication setting
2931
+ _auth_settings: List[str] = [
2932
+ 'QAnswer-Api-Key',
2933
+ 'Bearer'
2934
+ ]
2935
+
2936
+ return self.api_client.param_serialize(
2937
+ method='GET',
2938
+ resource_path='/api/ai-assistant/logo',
2939
+ path_params=_path_params,
2940
+ query_params=_query_params,
2941
+ header_params=_header_params,
2942
+ body=_body_params,
2943
+ post_params=_form_params,
2944
+ files=_files,
2945
+ auth_settings=_auth_settings,
2946
+ collection_formats=_collection_formats,
2947
+ _host=_host,
2948
+ _request_auth=_request_auth
2949
+ )
2950
+
2951
+
2952
+
2953
+
2954
+ @validate_call
2955
+ def remove2(
2956
+ self,
2957
+ dataset: StrictStr,
2958
+ _request_timeout: Union[
2959
+ None,
2960
+ Annotated[StrictFloat, Field(gt=0)],
2961
+ Tuple[
2962
+ Annotated[StrictFloat, Field(gt=0)],
2963
+ Annotated[StrictFloat, Field(gt=0)]
2964
+ ]
2965
+ ] = None,
2966
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2967
+ _content_type: Optional[StrictStr] = None,
2968
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2969
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2970
+ ) -> ApiResponse:
2971
+ """To remove a specific dataset
2972
+
2973
+
2974
+ :param dataset: (required)
2975
+ :type dataset: str
2976
+ :param _request_timeout: timeout setting for this request. If one
2977
+ number provided, it will be total request
2978
+ timeout. It can also be a pair (tuple) of
2979
+ (connection, read) timeouts.
2980
+ :type _request_timeout: int, tuple(int, int), optional
2981
+ :param _request_auth: set to override the auth_settings for an a single
2982
+ request; this effectively ignores the
2983
+ authentication in the spec for a single request.
2984
+ :type _request_auth: dict, optional
2985
+ :param _content_type: force content-type for the request.
2986
+ :type _content_type: str, Optional
2987
+ :param _headers: set to override the headers for a single
2988
+ request; this effectively ignores the headers
2989
+ in the spec for a single request.
2990
+ :type _headers: dict, optional
2991
+ :param _host_index: set to override the host_index for a single
2992
+ request; this effectively ignores the host_index
2993
+ in the spec for a single request.
2994
+ :type _host_index: int, optional
2995
+ :return: Returns the result object.
2996
+ """ # noqa: E501
2997
+
2998
+ _param = self._remove2_serialize(
2999
+ dataset=dataset,
3000
+ _request_auth=_request_auth,
3001
+ _content_type=_content_type,
3002
+ _headers=_headers,
3003
+ _host_index=_host_index
3004
+ )
3005
+
3006
+ _response_types_map: Dict[str, Optional[str]] = {
3007
+ '200': "ApiResponse",
3008
+ }
3009
+ response_data = self.api_client.call_api(
3010
+ *_param,
3011
+ _request_timeout=_request_timeout
3012
+ )
3013
+ response_data.read()
3014
+ return self.api_client.response_deserialize(
3015
+ response_data=response_data,
3016
+ response_types_map=_response_types_map,
3017
+ ).data
3018
+
3019
+
3020
+ @validate_call
3021
+ def remove2_with_http_info(
3022
+ self,
3023
+ dataset: StrictStr,
3024
+ _request_timeout: Union[
3025
+ None,
3026
+ Annotated[StrictFloat, Field(gt=0)],
3027
+ Tuple[
3028
+ Annotated[StrictFloat, Field(gt=0)],
3029
+ Annotated[StrictFloat, Field(gt=0)]
3030
+ ]
3031
+ ] = None,
3032
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3033
+ _content_type: Optional[StrictStr] = None,
3034
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3035
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3036
+ ) -> ApiResponse[ApiResponse]:
3037
+ """To remove a specific dataset
3038
+
3039
+
3040
+ :param dataset: (required)
3041
+ :type dataset: str
3042
+ :param _request_timeout: timeout setting for this request. If one
3043
+ number provided, it will be total request
3044
+ timeout. It can also be a pair (tuple) of
3045
+ (connection, read) timeouts.
3046
+ :type _request_timeout: int, tuple(int, int), optional
3047
+ :param _request_auth: set to override the auth_settings for an a single
3048
+ request; this effectively ignores the
3049
+ authentication in the spec for a single request.
3050
+ :type _request_auth: dict, optional
3051
+ :param _content_type: force content-type for the request.
3052
+ :type _content_type: str, Optional
3053
+ :param _headers: set to override the headers for a single
3054
+ request; this effectively ignores the headers
3055
+ in the spec for a single request.
3056
+ :type _headers: dict, optional
3057
+ :param _host_index: set to override the host_index for a single
3058
+ request; this effectively ignores the host_index
3059
+ in the spec for a single request.
3060
+ :type _host_index: int, optional
3061
+ :return: Returns the result object.
3062
+ """ # noqa: E501
3063
+
3064
+ _param = self._remove2_serialize(
3065
+ dataset=dataset,
3066
+ _request_auth=_request_auth,
3067
+ _content_type=_content_type,
3068
+ _headers=_headers,
3069
+ _host_index=_host_index
3070
+ )
3071
+
3072
+ _response_types_map: Dict[str, Optional[str]] = {
3073
+ '200': "ApiResponse",
3074
+ }
3075
+ response_data = self.api_client.call_api(
3076
+ *_param,
3077
+ _request_timeout=_request_timeout
3078
+ )
3079
+ response_data.read()
3080
+ return self.api_client.response_deserialize(
3081
+ response_data=response_data,
3082
+ response_types_map=_response_types_map,
3083
+ )
3084
+
3085
+
3086
+ @validate_call
3087
+ def remove2_without_preload_content(
3088
+ self,
3089
+ dataset: StrictStr,
3090
+ _request_timeout: Union[
3091
+ None,
3092
+ Annotated[StrictFloat, Field(gt=0)],
3093
+ Tuple[
3094
+ Annotated[StrictFloat, Field(gt=0)],
3095
+ Annotated[StrictFloat, Field(gt=0)]
3096
+ ]
3097
+ ] = None,
3098
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3099
+ _content_type: Optional[StrictStr] = None,
3100
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3101
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3102
+ ) -> RESTResponseType:
3103
+ """To remove a specific dataset
3104
+
3105
+
3106
+ :param dataset: (required)
3107
+ :type dataset: str
3108
+ :param _request_timeout: timeout setting for this request. If one
3109
+ number provided, it will be total request
3110
+ timeout. It can also be a pair (tuple) of
3111
+ (connection, read) timeouts.
3112
+ :type _request_timeout: int, tuple(int, int), optional
3113
+ :param _request_auth: set to override the auth_settings for an a single
3114
+ request; this effectively ignores the
3115
+ authentication in the spec for a single request.
3116
+ :type _request_auth: dict, optional
3117
+ :param _content_type: force content-type for the request.
3118
+ :type _content_type: str, Optional
3119
+ :param _headers: set to override the headers for a single
3120
+ request; this effectively ignores the headers
3121
+ in the spec for a single request.
3122
+ :type _headers: dict, optional
3123
+ :param _host_index: set to override the host_index for a single
3124
+ request; this effectively ignores the host_index
3125
+ in the spec for a single request.
3126
+ :type _host_index: int, optional
3127
+ :return: Returns the result object.
3128
+ """ # noqa: E501
3129
+
3130
+ _param = self._remove2_serialize(
3131
+ dataset=dataset,
3132
+ _request_auth=_request_auth,
3133
+ _content_type=_content_type,
3134
+ _headers=_headers,
3135
+ _host_index=_host_index
3136
+ )
3137
+
3138
+ _response_types_map: Dict[str, Optional[str]] = {
3139
+ '200': "ApiResponse",
3140
+ }
3141
+ response_data = self.api_client.call_api(
3142
+ *_param,
3143
+ _request_timeout=_request_timeout
3144
+ )
3145
+ return response_data.response
3146
+
3147
+
3148
+ def _remove2_serialize(
3149
+ self,
3150
+ dataset,
3151
+ _request_auth,
3152
+ _content_type,
3153
+ _headers,
3154
+ _host_index,
3155
+ ) -> RequestSerialized:
3156
+
3157
+ _host = None
3158
+
3159
+ _collection_formats: Dict[str, str] = {
3160
+ }
3161
+
3162
+ _path_params: Dict[str, str] = {}
3163
+ _query_params: List[Tuple[str, str]] = []
3164
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3165
+ _form_params: List[Tuple[str, str]] = []
3166
+ _files: Dict[
3167
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3168
+ ] = {}
3169
+ _body_params: Optional[bytes] = None
3170
+
3171
+ # process the path parameters
3172
+ # process the query parameters
3173
+ if dataset is not None:
3174
+
3175
+ _query_params.append(('dataset', dataset))
3176
+
3177
+ # process the header parameters
3178
+ # process the form parameters
3179
+ # process the body parameter
3180
+
3181
+
3182
+ # set the HTTP header `Accept`
3183
+ if 'Accept' not in _header_params:
3184
+ _header_params['Accept'] = self.api_client.select_header_accept(
3185
+ [
3186
+ 'application/json'
3187
+ ]
3188
+ )
3189
+
3190
+
3191
+ # authentication setting
3192
+ _auth_settings: List[str] = [
3193
+ 'QAnswer-Api-Key',
3194
+ 'Bearer'
3195
+ ]
3196
+
3197
+ return self.api_client.param_serialize(
3198
+ method='DELETE',
3199
+ resource_path='/api/ai-assistant/delete',
3200
+ path_params=_path_params,
3201
+ query_params=_query_params,
3202
+ header_params=_header_params,
3203
+ body=_body_params,
3204
+ post_params=_form_params,
3205
+ files=_files,
3206
+ auth_settings=_auth_settings,
3207
+ collection_formats=_collection_formats,
3208
+ _host=_host,
3209
+ _request_auth=_request_auth
3210
+ )
3211
+
3212
+
3213
+
3214
+
3215
+ @validate_call
3216
+ def reset_logo1(
3217
+ self,
3218
+ username: StrictStr,
3219
+ dataset: StrictStr,
3220
+ q_answer_api_key: Optional[StrictStr] = None,
3221
+ _request_timeout: Union[
3222
+ None,
3223
+ Annotated[StrictFloat, Field(gt=0)],
3224
+ Tuple[
3225
+ Annotated[StrictFloat, Field(gt=0)],
3226
+ Annotated[StrictFloat, Field(gt=0)]
3227
+ ]
3228
+ ] = None,
3229
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3230
+ _content_type: Optional[StrictStr] = None,
3231
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3232
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3233
+ ) -> None:
3234
+ """Resets the logo of the ai assistant.
3235
+
3236
+
3237
+ :param username: (required)
3238
+ :type username: str
3239
+ :param dataset: (required)
3240
+ :type dataset: str
3241
+ :param q_answer_api_key:
3242
+ :type q_answer_api_key: str
3243
+ :param _request_timeout: timeout setting for this request. If one
3244
+ number provided, it will be total request
3245
+ timeout. It can also be a pair (tuple) of
3246
+ (connection, read) timeouts.
3247
+ :type _request_timeout: int, tuple(int, int), optional
3248
+ :param _request_auth: set to override the auth_settings for an a single
3249
+ request; this effectively ignores the
3250
+ authentication in the spec for a single request.
3251
+ :type _request_auth: dict, optional
3252
+ :param _content_type: force content-type for the request.
3253
+ :type _content_type: str, Optional
3254
+ :param _headers: set to override the headers for a single
3255
+ request; this effectively ignores the headers
3256
+ in the spec for a single request.
3257
+ :type _headers: dict, optional
3258
+ :param _host_index: set to override the host_index for a single
3259
+ request; this effectively ignores the host_index
3260
+ in the spec for a single request.
3261
+ :type _host_index: int, optional
3262
+ :return: Returns the result object.
3263
+ """ # noqa: E501
3264
+
3265
+ _param = self._reset_logo1_serialize(
3266
+ username=username,
3267
+ dataset=dataset,
3268
+ q_answer_api_key=q_answer_api_key,
3269
+ _request_auth=_request_auth,
3270
+ _content_type=_content_type,
3271
+ _headers=_headers,
3272
+ _host_index=_host_index
3273
+ )
3274
+
3275
+ _response_types_map: Dict[str, Optional[str]] = {
3276
+ '200': None,
3277
+ }
3278
+ response_data = self.api_client.call_api(
3279
+ *_param,
3280
+ _request_timeout=_request_timeout
3281
+ )
3282
+ response_data.read()
3283
+ return self.api_client.response_deserialize(
3284
+ response_data=response_data,
3285
+ response_types_map=_response_types_map,
3286
+ ).data
3287
+
3288
+
3289
+ @validate_call
3290
+ def reset_logo1_with_http_info(
3291
+ self,
3292
+ username: StrictStr,
3293
+ dataset: StrictStr,
3294
+ q_answer_api_key: Optional[StrictStr] = None,
3295
+ _request_timeout: Union[
3296
+ None,
3297
+ Annotated[StrictFloat, Field(gt=0)],
3298
+ Tuple[
3299
+ Annotated[StrictFloat, Field(gt=0)],
3300
+ Annotated[StrictFloat, Field(gt=0)]
3301
+ ]
3302
+ ] = None,
3303
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3304
+ _content_type: Optional[StrictStr] = None,
3305
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3306
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3307
+ ) -> ApiResponse[None]:
3308
+ """Resets the logo of the ai assistant.
3309
+
3310
+
3311
+ :param username: (required)
3312
+ :type username: str
3313
+ :param dataset: (required)
3314
+ :type dataset: str
3315
+ :param q_answer_api_key:
3316
+ :type q_answer_api_key: str
3317
+ :param _request_timeout: timeout setting for this request. If one
3318
+ number provided, it will be total request
3319
+ timeout. It can also be a pair (tuple) of
3320
+ (connection, read) timeouts.
3321
+ :type _request_timeout: int, tuple(int, int), optional
3322
+ :param _request_auth: set to override the auth_settings for an a single
3323
+ request; this effectively ignores the
3324
+ authentication in the spec for a single request.
3325
+ :type _request_auth: dict, optional
3326
+ :param _content_type: force content-type for the request.
3327
+ :type _content_type: str, Optional
3328
+ :param _headers: set to override the headers for a single
3329
+ request; this effectively ignores the headers
3330
+ in the spec for a single request.
3331
+ :type _headers: dict, optional
3332
+ :param _host_index: set to override the host_index for a single
3333
+ request; this effectively ignores the host_index
3334
+ in the spec for a single request.
3335
+ :type _host_index: int, optional
3336
+ :return: Returns the result object.
3337
+ """ # noqa: E501
3338
+
3339
+ _param = self._reset_logo1_serialize(
3340
+ username=username,
3341
+ dataset=dataset,
3342
+ q_answer_api_key=q_answer_api_key,
3343
+ _request_auth=_request_auth,
3344
+ _content_type=_content_type,
3345
+ _headers=_headers,
3346
+ _host_index=_host_index
3347
+ )
3348
+
3349
+ _response_types_map: Dict[str, Optional[str]] = {
3350
+ '200': None,
3351
+ }
3352
+ response_data = self.api_client.call_api(
3353
+ *_param,
3354
+ _request_timeout=_request_timeout
3355
+ )
3356
+ response_data.read()
3357
+ return self.api_client.response_deserialize(
3358
+ response_data=response_data,
3359
+ response_types_map=_response_types_map,
3360
+ )
3361
+
3362
+
3363
+ @validate_call
3364
+ def reset_logo1_without_preload_content(
3365
+ self,
3366
+ username: StrictStr,
3367
+ dataset: StrictStr,
3368
+ q_answer_api_key: Optional[StrictStr] = None,
3369
+ _request_timeout: Union[
3370
+ None,
3371
+ Annotated[StrictFloat, Field(gt=0)],
3372
+ Tuple[
3373
+ Annotated[StrictFloat, Field(gt=0)],
3374
+ Annotated[StrictFloat, Field(gt=0)]
3375
+ ]
3376
+ ] = None,
3377
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3378
+ _content_type: Optional[StrictStr] = None,
3379
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3380
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3381
+ ) -> RESTResponseType:
3382
+ """Resets the logo of the ai assistant.
3383
+
3384
+
3385
+ :param username: (required)
3386
+ :type username: str
3387
+ :param dataset: (required)
3388
+ :type dataset: str
3389
+ :param q_answer_api_key:
3390
+ :type q_answer_api_key: str
3391
+ :param _request_timeout: timeout setting for this request. If one
3392
+ number provided, it will be total request
3393
+ timeout. It can also be a pair (tuple) of
3394
+ (connection, read) timeouts.
3395
+ :type _request_timeout: int, tuple(int, int), optional
3396
+ :param _request_auth: set to override the auth_settings for an a single
3397
+ request; this effectively ignores the
3398
+ authentication in the spec for a single request.
3399
+ :type _request_auth: dict, optional
3400
+ :param _content_type: force content-type for the request.
3401
+ :type _content_type: str, Optional
3402
+ :param _headers: set to override the headers for a single
3403
+ request; this effectively ignores the headers
3404
+ in the spec for a single request.
3405
+ :type _headers: dict, optional
3406
+ :param _host_index: set to override the host_index for a single
3407
+ request; this effectively ignores the host_index
3408
+ in the spec for a single request.
3409
+ :type _host_index: int, optional
3410
+ :return: Returns the result object.
3411
+ """ # noqa: E501
3412
+
3413
+ _param = self._reset_logo1_serialize(
3414
+ username=username,
3415
+ dataset=dataset,
3416
+ q_answer_api_key=q_answer_api_key,
3417
+ _request_auth=_request_auth,
3418
+ _content_type=_content_type,
3419
+ _headers=_headers,
3420
+ _host_index=_host_index
3421
+ )
3422
+
3423
+ _response_types_map: Dict[str, Optional[str]] = {
3424
+ '200': None,
3425
+ }
3426
+ response_data = self.api_client.call_api(
3427
+ *_param,
3428
+ _request_timeout=_request_timeout
3429
+ )
3430
+ return response_data.response
3431
+
3432
+
3433
+ def _reset_logo1_serialize(
3434
+ self,
3435
+ username,
3436
+ dataset,
3437
+ q_answer_api_key,
3438
+ _request_auth,
3439
+ _content_type,
3440
+ _headers,
3441
+ _host_index,
3442
+ ) -> RequestSerialized:
3443
+
3444
+ _host = None
3445
+
3446
+ _collection_formats: Dict[str, str] = {
3447
+ }
3448
+
3449
+ _path_params: Dict[str, str] = {}
3450
+ _query_params: List[Tuple[str, str]] = []
3451
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3452
+ _form_params: List[Tuple[str, str]] = []
3453
+ _files: Dict[
3454
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3455
+ ] = {}
3456
+ _body_params: Optional[bytes] = None
3457
+
3458
+ # process the path parameters
3459
+ # process the query parameters
3460
+ if username is not None:
3461
+
3462
+ _query_params.append(('username', username))
3463
+
3464
+ if dataset is not None:
3465
+
3466
+ _query_params.append(('dataset', dataset))
3467
+
3468
+ # process the header parameters
3469
+ if q_answer_api_key is not None:
3470
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
3471
+ # process the form parameters
3472
+ # process the body parameter
3473
+
3474
+
3475
+
3476
+
3477
+ # authentication setting
3478
+ _auth_settings: List[str] = [
3479
+ 'QAnswer-Api-Key',
3480
+ 'Bearer'
3481
+ ]
3482
+
3483
+ return self.api_client.param_serialize(
3484
+ method='PUT',
3485
+ resource_path='/api/ai-assistant/logo/reset',
3486
+ path_params=_path_params,
3487
+ query_params=_query_params,
3488
+ header_params=_header_params,
3489
+ body=_body_params,
3490
+ post_params=_form_params,
3491
+ files=_files,
3492
+ auth_settings=_auth_settings,
3493
+ collection_formats=_collection_formats,
3494
+ _host=_host,
3495
+ _request_auth=_request_auth
3496
+ )
3497
+
3498
+
3499
+
3500
+
3501
+ @validate_call
3502
+ def set_description(
3503
+ self,
3504
+ username: StrictStr,
3505
+ dataset: StrictStr,
3506
+ dataset_description: DatasetDescription,
3507
+ q_answer_api_key: Optional[StrictStr] = None,
3508
+ _request_timeout: Union[
3509
+ None,
3510
+ Annotated[StrictFloat, Field(gt=0)],
3511
+ Tuple[
3512
+ Annotated[StrictFloat, Field(gt=0)],
3513
+ Annotated[StrictFloat, Field(gt=0)]
3514
+ ]
3515
+ ] = None,
3516
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3517
+ _content_type: Optional[StrictStr] = None,
3518
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3519
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3520
+ ) -> ApiResponse:
3521
+ """To store the description of a dataset
3522
+
3523
+
3524
+ :param username: (required)
3525
+ :type username: str
3526
+ :param dataset: (required)
3527
+ :type dataset: str
3528
+ :param dataset_description: (required)
3529
+ :type dataset_description: DatasetDescription
3530
+ :param q_answer_api_key:
3531
+ :type q_answer_api_key: str
3532
+ :param _request_timeout: timeout setting for this request. If one
3533
+ number provided, it will be total request
3534
+ timeout. It can also be a pair (tuple) of
3535
+ (connection, read) timeouts.
3536
+ :type _request_timeout: int, tuple(int, int), optional
3537
+ :param _request_auth: set to override the auth_settings for an a single
3538
+ request; this effectively ignores the
3539
+ authentication in the spec for a single request.
3540
+ :type _request_auth: dict, optional
3541
+ :param _content_type: force content-type for the request.
3542
+ :type _content_type: str, Optional
3543
+ :param _headers: set to override the headers for a single
3544
+ request; this effectively ignores the headers
3545
+ in the spec for a single request.
3546
+ :type _headers: dict, optional
3547
+ :param _host_index: set to override the host_index for a single
3548
+ request; this effectively ignores the host_index
3549
+ in the spec for a single request.
3550
+ :type _host_index: int, optional
3551
+ :return: Returns the result object.
3552
+ """ # noqa: E501
3553
+
3554
+ _param = self._set_description_serialize(
3555
+ username=username,
3556
+ dataset=dataset,
3557
+ dataset_description=dataset_description,
3558
+ q_answer_api_key=q_answer_api_key,
3559
+ _request_auth=_request_auth,
3560
+ _content_type=_content_type,
3561
+ _headers=_headers,
3562
+ _host_index=_host_index
3563
+ )
3564
+
3565
+ _response_types_map: Dict[str, Optional[str]] = {
3566
+ '200': "ApiResponse",
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
+ ).data
3577
+
3578
+
3579
+ @validate_call
3580
+ def set_description_with_http_info(
3581
+ self,
3582
+ username: StrictStr,
3583
+ dataset: StrictStr,
3584
+ dataset_description: DatasetDescription,
3585
+ q_answer_api_key: Optional[StrictStr] = None,
3586
+ _request_timeout: Union[
3587
+ None,
3588
+ Annotated[StrictFloat, Field(gt=0)],
3589
+ Tuple[
3590
+ Annotated[StrictFloat, Field(gt=0)],
3591
+ Annotated[StrictFloat, Field(gt=0)]
3592
+ ]
3593
+ ] = None,
3594
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3595
+ _content_type: Optional[StrictStr] = None,
3596
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3597
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3598
+ ) -> ApiResponse[ApiResponse]:
3599
+ """To store the description of a dataset
3600
+
3601
+
3602
+ :param username: (required)
3603
+ :type username: str
3604
+ :param dataset: (required)
3605
+ :type dataset: str
3606
+ :param dataset_description: (required)
3607
+ :type dataset_description: DatasetDescription
3608
+ :param q_answer_api_key:
3609
+ :type q_answer_api_key: str
3610
+ :param _request_timeout: timeout setting for this request. If one
3611
+ number provided, it will be total request
3612
+ timeout. It can also be a pair (tuple) of
3613
+ (connection, read) timeouts.
3614
+ :type _request_timeout: int, tuple(int, int), optional
3615
+ :param _request_auth: set to override the auth_settings for an a single
3616
+ request; this effectively ignores the
3617
+ authentication in the spec for a single request.
3618
+ :type _request_auth: dict, optional
3619
+ :param _content_type: force content-type for the request.
3620
+ :type _content_type: str, Optional
3621
+ :param _headers: set to override the headers for a single
3622
+ request; this effectively ignores the headers
3623
+ in the spec for a single request.
3624
+ :type _headers: dict, optional
3625
+ :param _host_index: set to override the host_index for a single
3626
+ request; this effectively ignores the host_index
3627
+ in the spec for a single request.
3628
+ :type _host_index: int, optional
3629
+ :return: Returns the result object.
3630
+ """ # noqa: E501
3631
+
3632
+ _param = self._set_description_serialize(
3633
+ username=username,
3634
+ dataset=dataset,
3635
+ dataset_description=dataset_description,
3636
+ q_answer_api_key=q_answer_api_key,
3637
+ _request_auth=_request_auth,
3638
+ _content_type=_content_type,
3639
+ _headers=_headers,
3640
+ _host_index=_host_index
3641
+ )
3642
+
3643
+ _response_types_map: Dict[str, Optional[str]] = {
3644
+ '200': "ApiResponse",
3645
+ }
3646
+ response_data = self.api_client.call_api(
3647
+ *_param,
3648
+ _request_timeout=_request_timeout
3649
+ )
3650
+ response_data.read()
3651
+ return self.api_client.response_deserialize(
3652
+ response_data=response_data,
3653
+ response_types_map=_response_types_map,
3654
+ )
3655
+
3656
+
3657
+ @validate_call
3658
+ def set_description_without_preload_content(
3659
+ self,
3660
+ username: StrictStr,
3661
+ dataset: StrictStr,
3662
+ dataset_description: DatasetDescription,
3663
+ q_answer_api_key: Optional[StrictStr] = None,
3664
+ _request_timeout: Union[
3665
+ None,
3666
+ Annotated[StrictFloat, Field(gt=0)],
3667
+ Tuple[
3668
+ Annotated[StrictFloat, Field(gt=0)],
3669
+ Annotated[StrictFloat, Field(gt=0)]
3670
+ ]
3671
+ ] = None,
3672
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3673
+ _content_type: Optional[StrictStr] = None,
3674
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3675
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3676
+ ) -> RESTResponseType:
3677
+ """To store the description of a dataset
3678
+
3679
+
3680
+ :param username: (required)
3681
+ :type username: str
3682
+ :param dataset: (required)
3683
+ :type dataset: str
3684
+ :param dataset_description: (required)
3685
+ :type dataset_description: DatasetDescription
3686
+ :param q_answer_api_key:
3687
+ :type q_answer_api_key: str
3688
+ :param _request_timeout: timeout setting for this request. If one
3689
+ number provided, it will be total request
3690
+ timeout. It can also be a pair (tuple) of
3691
+ (connection, read) timeouts.
3692
+ :type _request_timeout: int, tuple(int, int), optional
3693
+ :param _request_auth: set to override the auth_settings for an a single
3694
+ request; this effectively ignores the
3695
+ authentication in the spec for a single request.
3696
+ :type _request_auth: dict, optional
3697
+ :param _content_type: force content-type for the request.
3698
+ :type _content_type: str, Optional
3699
+ :param _headers: set to override the headers for a single
3700
+ request; this effectively ignores the headers
3701
+ in the spec for a single request.
3702
+ :type _headers: dict, optional
3703
+ :param _host_index: set to override the host_index for a single
3704
+ request; this effectively ignores the host_index
3705
+ in the spec for a single request.
3706
+ :type _host_index: int, optional
3707
+ :return: Returns the result object.
3708
+ """ # noqa: E501
3709
+
3710
+ _param = self._set_description_serialize(
3711
+ username=username,
3712
+ dataset=dataset,
3713
+ dataset_description=dataset_description,
3714
+ q_answer_api_key=q_answer_api_key,
3715
+ _request_auth=_request_auth,
3716
+ _content_type=_content_type,
3717
+ _headers=_headers,
3718
+ _host_index=_host_index
3719
+ )
3720
+
3721
+ _response_types_map: Dict[str, Optional[str]] = {
3722
+ '200': "ApiResponse",
3723
+ }
3724
+ response_data = self.api_client.call_api(
3725
+ *_param,
3726
+ _request_timeout=_request_timeout
3727
+ )
3728
+ return response_data.response
3729
+
3730
+
3731
+ def _set_description_serialize(
3732
+ self,
3733
+ username,
3734
+ dataset,
3735
+ dataset_description,
3736
+ q_answer_api_key,
3737
+ _request_auth,
3738
+ _content_type,
3739
+ _headers,
3740
+ _host_index,
3741
+ ) -> RequestSerialized:
3742
+
3743
+ _host = None
3744
+
3745
+ _collection_formats: Dict[str, str] = {
3746
+ }
3747
+
3748
+ _path_params: Dict[str, str] = {}
3749
+ _query_params: List[Tuple[str, str]] = []
3750
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3751
+ _form_params: List[Tuple[str, str]] = []
3752
+ _files: Dict[
3753
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3754
+ ] = {}
3755
+ _body_params: Optional[bytes] = None
3756
+
3757
+ # process the path parameters
3758
+ # process the query parameters
3759
+ if username is not None:
3760
+
3761
+ _query_params.append(('username', username))
3762
+
3763
+ if dataset is not None:
3764
+
3765
+ _query_params.append(('dataset', dataset))
3766
+
3767
+ # process the header parameters
3768
+ if q_answer_api_key is not None:
3769
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
3770
+ # process the form parameters
3771
+ # process the body parameter
3772
+ if dataset_description is not None:
3773
+ _body_params = dataset_description
3774
+
3775
+
3776
+ # set the HTTP header `Accept`
3777
+ if 'Accept' not in _header_params:
3778
+ _header_params['Accept'] = self.api_client.select_header_accept(
3779
+ [
3780
+ '*/*'
3781
+ ]
3782
+ )
3783
+
3784
+ # set the HTTP header `Content-Type`
3785
+ if _content_type:
3786
+ _header_params['Content-Type'] = _content_type
3787
+ else:
3788
+ _default_content_type = (
3789
+ self.api_client.select_header_content_type(
3790
+ [
3791
+ 'application/json'
3792
+ ]
3793
+ )
3794
+ )
3795
+ if _default_content_type is not None:
3796
+ _header_params['Content-Type'] = _default_content_type
3797
+
3798
+ # authentication setting
3799
+ _auth_settings: List[str] = [
3800
+ 'QAnswer-Api-Key',
3801
+ 'Bearer'
3802
+ ]
3803
+
3804
+ return self.api_client.param_serialize(
3805
+ method='POST',
3806
+ resource_path='/api/ai-assistant/description',
3807
+ path_params=_path_params,
3808
+ query_params=_query_params,
3809
+ header_params=_header_params,
3810
+ body=_body_params,
3811
+ post_params=_form_params,
3812
+ files=_files,
3813
+ auth_settings=_auth_settings,
3814
+ collection_formats=_collection_formats,
3815
+ _host=_host,
3816
+ _request_auth=_request_auth
3817
+ )
3818
+
3819
+
3820
+
3821
+
3822
+ @validate_call
3823
+ def set_logo1(
3824
+ self,
3825
+ username: StrictStr,
3826
+ dataset: StrictStr,
3827
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3828
+ q_answer_api_key: Optional[StrictStr] = None,
3829
+ _request_timeout: Union[
3830
+ None,
3831
+ Annotated[StrictFloat, Field(gt=0)],
3832
+ Tuple[
3833
+ Annotated[StrictFloat, Field(gt=0)],
3834
+ Annotated[StrictFloat, Field(gt=0)]
3835
+ ]
3836
+ ] = None,
3837
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3838
+ _content_type: Optional[StrictStr] = None,
3839
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3840
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3841
+ ) -> None:
3842
+ """Set the logo of the ai assistant
3843
+
3844
+
3845
+ :param username: (required)
3846
+ :type username: str
3847
+ :param dataset: (required)
3848
+ :type dataset: str
3849
+ :param file: (required)
3850
+ :type file: bytearray
3851
+ :param q_answer_api_key:
3852
+ :type q_answer_api_key: str
3853
+ :param _request_timeout: timeout setting for this request. If one
3854
+ number provided, it will be total request
3855
+ timeout. It can also be a pair (tuple) of
3856
+ (connection, read) timeouts.
3857
+ :type _request_timeout: int, tuple(int, int), optional
3858
+ :param _request_auth: set to override the auth_settings for an a single
3859
+ request; this effectively ignores the
3860
+ authentication in the spec for a single request.
3861
+ :type _request_auth: dict, optional
3862
+ :param _content_type: force content-type for the request.
3863
+ :type _content_type: str, Optional
3864
+ :param _headers: set to override the headers for a single
3865
+ request; this effectively ignores the headers
3866
+ in the spec for a single request.
3867
+ :type _headers: dict, optional
3868
+ :param _host_index: set to override the host_index for a single
3869
+ request; this effectively ignores the host_index
3870
+ in the spec for a single request.
3871
+ :type _host_index: int, optional
3872
+ :return: Returns the result object.
3873
+ """ # noqa: E501
3874
+
3875
+ _param = self._set_logo1_serialize(
3876
+ username=username,
3877
+ dataset=dataset,
3878
+ file=file,
3879
+ q_answer_api_key=q_answer_api_key,
3880
+ _request_auth=_request_auth,
3881
+ _content_type=_content_type,
3882
+ _headers=_headers,
3883
+ _host_index=_host_index
3884
+ )
3885
+
3886
+ _response_types_map: Dict[str, Optional[str]] = {
3887
+ '200': None,
3888
+ }
3889
+ response_data = self.api_client.call_api(
3890
+ *_param,
3891
+ _request_timeout=_request_timeout
3892
+ )
3893
+ response_data.read()
3894
+ return self.api_client.response_deserialize(
3895
+ response_data=response_data,
3896
+ response_types_map=_response_types_map,
3897
+ ).data
3898
+
3899
+
3900
+ @validate_call
3901
+ def set_logo1_with_http_info(
3902
+ self,
3903
+ username: StrictStr,
3904
+ dataset: StrictStr,
3905
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3906
+ q_answer_api_key: Optional[StrictStr] = None,
3907
+ _request_timeout: Union[
3908
+ None,
3909
+ Annotated[StrictFloat, Field(gt=0)],
3910
+ Tuple[
3911
+ Annotated[StrictFloat, Field(gt=0)],
3912
+ Annotated[StrictFloat, Field(gt=0)]
3913
+ ]
3914
+ ] = None,
3915
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3916
+ _content_type: Optional[StrictStr] = None,
3917
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3918
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3919
+ ) -> ApiResponse[None]:
3920
+ """Set the logo of the ai assistant
3921
+
3922
+
3923
+ :param username: (required)
3924
+ :type username: str
3925
+ :param dataset: (required)
3926
+ :type dataset: str
3927
+ :param file: (required)
3928
+ :type file: bytearray
3929
+ :param q_answer_api_key:
3930
+ :type q_answer_api_key: str
3931
+ :param _request_timeout: timeout setting for this request. If one
3932
+ number provided, it will be total request
3933
+ timeout. It can also be a pair (tuple) of
3934
+ (connection, read) timeouts.
3935
+ :type _request_timeout: int, tuple(int, int), optional
3936
+ :param _request_auth: set to override the auth_settings for an a single
3937
+ request; this effectively ignores the
3938
+ authentication in the spec for a single request.
3939
+ :type _request_auth: dict, optional
3940
+ :param _content_type: force content-type for the request.
3941
+ :type _content_type: str, Optional
3942
+ :param _headers: set to override the headers for a single
3943
+ request; this effectively ignores the headers
3944
+ in the spec for a single request.
3945
+ :type _headers: dict, optional
3946
+ :param _host_index: set to override the host_index for a single
3947
+ request; this effectively ignores the host_index
3948
+ in the spec for a single request.
3949
+ :type _host_index: int, optional
3950
+ :return: Returns the result object.
3951
+ """ # noqa: E501
3952
+
3953
+ _param = self._set_logo1_serialize(
3954
+ username=username,
3955
+ dataset=dataset,
3956
+ file=file,
3957
+ q_answer_api_key=q_answer_api_key,
3958
+ _request_auth=_request_auth,
3959
+ _content_type=_content_type,
3960
+ _headers=_headers,
3961
+ _host_index=_host_index
3962
+ )
3963
+
3964
+ _response_types_map: Dict[str, Optional[str]] = {
3965
+ '200': None,
3966
+ }
3967
+ response_data = self.api_client.call_api(
3968
+ *_param,
3969
+ _request_timeout=_request_timeout
3970
+ )
3971
+ response_data.read()
3972
+ return self.api_client.response_deserialize(
3973
+ response_data=response_data,
3974
+ response_types_map=_response_types_map,
3975
+ )
3976
+
3977
+
3978
+ @validate_call
3979
+ def set_logo1_without_preload_content(
3980
+ self,
3981
+ username: StrictStr,
3982
+ dataset: StrictStr,
3983
+ file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]],
3984
+ q_answer_api_key: Optional[StrictStr] = None,
3985
+ _request_timeout: Union[
3986
+ None,
3987
+ Annotated[StrictFloat, Field(gt=0)],
3988
+ Tuple[
3989
+ Annotated[StrictFloat, Field(gt=0)],
3990
+ Annotated[StrictFloat, Field(gt=0)]
3991
+ ]
3992
+ ] = None,
3993
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3994
+ _content_type: Optional[StrictStr] = None,
3995
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3996
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3997
+ ) -> RESTResponseType:
3998
+ """Set the logo of the ai assistant
3999
+
4000
+
4001
+ :param username: (required)
4002
+ :type username: str
4003
+ :param dataset: (required)
4004
+ :type dataset: str
4005
+ :param file: (required)
4006
+ :type file: bytearray
4007
+ :param q_answer_api_key:
4008
+ :type q_answer_api_key: str
4009
+ :param _request_timeout: timeout setting for this request. If one
4010
+ number provided, it will be total request
4011
+ timeout. It can also be a pair (tuple) of
4012
+ (connection, read) timeouts.
4013
+ :type _request_timeout: int, tuple(int, int), optional
4014
+ :param _request_auth: set to override the auth_settings for an a single
4015
+ request; this effectively ignores the
4016
+ authentication in the spec for a single request.
4017
+ :type _request_auth: dict, optional
4018
+ :param _content_type: force content-type for the request.
4019
+ :type _content_type: str, Optional
4020
+ :param _headers: set to override the headers for a single
4021
+ request; this effectively ignores the headers
4022
+ in the spec for a single request.
4023
+ :type _headers: dict, optional
4024
+ :param _host_index: set to override the host_index for a single
4025
+ request; this effectively ignores the host_index
4026
+ in the spec for a single request.
4027
+ :type _host_index: int, optional
4028
+ :return: Returns the result object.
4029
+ """ # noqa: E501
4030
+
4031
+ _param = self._set_logo1_serialize(
4032
+ username=username,
4033
+ dataset=dataset,
4034
+ file=file,
4035
+ q_answer_api_key=q_answer_api_key,
4036
+ _request_auth=_request_auth,
4037
+ _content_type=_content_type,
4038
+ _headers=_headers,
4039
+ _host_index=_host_index
4040
+ )
4041
+
4042
+ _response_types_map: Dict[str, Optional[str]] = {
4043
+ '200': None,
4044
+ }
4045
+ response_data = self.api_client.call_api(
4046
+ *_param,
4047
+ _request_timeout=_request_timeout
4048
+ )
4049
+ return response_data.response
4050
+
4051
+
4052
+ def _set_logo1_serialize(
4053
+ self,
4054
+ username,
4055
+ dataset,
4056
+ file,
4057
+ q_answer_api_key,
4058
+ _request_auth,
4059
+ _content_type,
4060
+ _headers,
4061
+ _host_index,
4062
+ ) -> RequestSerialized:
4063
+
4064
+ _host = None
4065
+
4066
+ _collection_formats: Dict[str, str] = {
4067
+ }
4068
+
4069
+ _path_params: Dict[str, str] = {}
4070
+ _query_params: List[Tuple[str, str]] = []
4071
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4072
+ _form_params: List[Tuple[str, str]] = []
4073
+ _files: Dict[
4074
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4075
+ ] = {}
4076
+ _body_params: Optional[bytes] = None
4077
+
4078
+ # process the path parameters
4079
+ # process the query parameters
4080
+ if username is not None:
4081
+
4082
+ _query_params.append(('username', username))
4083
+
4084
+ if dataset is not None:
4085
+
4086
+ _query_params.append(('dataset', dataset))
4087
+
4088
+ # process the header parameters
4089
+ if q_answer_api_key is not None:
4090
+ _header_params['QAnswer-Api-Key'] = q_answer_api_key
4091
+ # process the form parameters
4092
+ if file is not None:
4093
+ _files['file'] = file
4094
+ # process the body parameter
4095
+
4096
+
4097
+
4098
+ # set the HTTP header `Content-Type`
4099
+ if _content_type:
4100
+ _header_params['Content-Type'] = _content_type
4101
+ else:
4102
+ _default_content_type = (
4103
+ self.api_client.select_header_content_type(
4104
+ [
4105
+ 'multipart/form-data'
4106
+ ]
4107
+ )
4108
+ )
4109
+ if _default_content_type is not None:
4110
+ _header_params['Content-Type'] = _default_content_type
4111
+
4112
+ # authentication setting
4113
+ _auth_settings: List[str] = [
4114
+ 'QAnswer-Api-Key',
4115
+ 'Bearer'
4116
+ ]
4117
+
4118
+ return self.api_client.param_serialize(
4119
+ method='POST',
4120
+ resource_path='/api/ai-assistant/logo',
4121
+ path_params=_path_params,
4122
+ query_params=_query_params,
4123
+ header_params=_header_params,
4124
+ body=_body_params,
4125
+ post_params=_form_params,
4126
+ files=_files,
4127
+ auth_settings=_auth_settings,
4128
+ collection_formats=_collection_formats,
4129
+ _host=_host,
4130
+ _request_auth=_request_auth
4131
+ )
4132
+
4133
+
4134
+
4135
+
4136
+ @validate_call
4137
+ def size_total(
4138
+ self,
4139
+ _request_timeout: Union[
4140
+ None,
4141
+ Annotated[StrictFloat, Field(gt=0)],
4142
+ Tuple[
4143
+ Annotated[StrictFloat, Field(gt=0)],
4144
+ Annotated[StrictFloat, Field(gt=0)]
4145
+ ]
4146
+ ] = None,
4147
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4148
+ _content_type: Optional[StrictStr] = None,
4149
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4150
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4151
+ ) -> float:
4152
+ """The size of the datasets
4153
+
4154
+
4155
+ :param _request_timeout: timeout setting for this request. If one
4156
+ number provided, it will be total request
4157
+ timeout. It can also be a pair (tuple) of
4158
+ (connection, read) timeouts.
4159
+ :type _request_timeout: int, tuple(int, int), optional
4160
+ :param _request_auth: set to override the auth_settings for an a single
4161
+ request; this effectively ignores the
4162
+ authentication in the spec for a single request.
4163
+ :type _request_auth: dict, optional
4164
+ :param _content_type: force content-type for the request.
4165
+ :type _content_type: str, Optional
4166
+ :param _headers: set to override the headers for a single
4167
+ request; this effectively ignores the headers
4168
+ in the spec for a single request.
4169
+ :type _headers: dict, optional
4170
+ :param _host_index: set to override the host_index for a single
4171
+ request; this effectively ignores the host_index
4172
+ in the spec for a single request.
4173
+ :type _host_index: int, optional
4174
+ :return: Returns the result object.
4175
+ """ # noqa: E501
4176
+
4177
+ _param = self._size_total_serialize(
4178
+ _request_auth=_request_auth,
4179
+ _content_type=_content_type,
4180
+ _headers=_headers,
4181
+ _host_index=_host_index
4182
+ )
4183
+
4184
+ _response_types_map: Dict[str, Optional[str]] = {
4185
+ '200': "float",
4186
+ }
4187
+ response_data = self.api_client.call_api(
4188
+ *_param,
4189
+ _request_timeout=_request_timeout
4190
+ )
4191
+ response_data.read()
4192
+ return self.api_client.response_deserialize(
4193
+ response_data=response_data,
4194
+ response_types_map=_response_types_map,
4195
+ ).data
4196
+
4197
+
4198
+ @validate_call
4199
+ def size_total_with_http_info(
4200
+ self,
4201
+ _request_timeout: Union[
4202
+ None,
4203
+ Annotated[StrictFloat, Field(gt=0)],
4204
+ Tuple[
4205
+ Annotated[StrictFloat, Field(gt=0)],
4206
+ Annotated[StrictFloat, Field(gt=0)]
4207
+ ]
4208
+ ] = None,
4209
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4210
+ _content_type: Optional[StrictStr] = None,
4211
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4212
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4213
+ ) -> ApiResponse[float]:
4214
+ """The size of the datasets
4215
+
4216
+
4217
+ :param _request_timeout: timeout setting for this request. If one
4218
+ number provided, it will be total request
4219
+ timeout. It can also be a pair (tuple) of
4220
+ (connection, read) timeouts.
4221
+ :type _request_timeout: int, tuple(int, int), optional
4222
+ :param _request_auth: set to override the auth_settings for an a single
4223
+ request; this effectively ignores the
4224
+ authentication in the spec for a single request.
4225
+ :type _request_auth: dict, optional
4226
+ :param _content_type: force content-type for the request.
4227
+ :type _content_type: str, Optional
4228
+ :param _headers: set to override the headers for a single
4229
+ request; this effectively ignores the headers
4230
+ in the spec for a single request.
4231
+ :type _headers: dict, optional
4232
+ :param _host_index: set to override the host_index for a single
4233
+ request; this effectively ignores the host_index
4234
+ in the spec for a single request.
4235
+ :type _host_index: int, optional
4236
+ :return: Returns the result object.
4237
+ """ # noqa: E501
4238
+
4239
+ _param = self._size_total_serialize(
4240
+ _request_auth=_request_auth,
4241
+ _content_type=_content_type,
4242
+ _headers=_headers,
4243
+ _host_index=_host_index
4244
+ )
4245
+
4246
+ _response_types_map: Dict[str, Optional[str]] = {
4247
+ '200': "float",
4248
+ }
4249
+ response_data = self.api_client.call_api(
4250
+ *_param,
4251
+ _request_timeout=_request_timeout
4252
+ )
4253
+ response_data.read()
4254
+ return self.api_client.response_deserialize(
4255
+ response_data=response_data,
4256
+ response_types_map=_response_types_map,
4257
+ )
4258
+
4259
+
4260
+ @validate_call
4261
+ def size_total_without_preload_content(
4262
+ self,
4263
+ _request_timeout: Union[
4264
+ None,
4265
+ Annotated[StrictFloat, Field(gt=0)],
4266
+ Tuple[
4267
+ Annotated[StrictFloat, Field(gt=0)],
4268
+ Annotated[StrictFloat, Field(gt=0)]
4269
+ ]
4270
+ ] = None,
4271
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
4272
+ _content_type: Optional[StrictStr] = None,
4273
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4274
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4275
+ ) -> RESTResponseType:
4276
+ """The size of the datasets
4277
+
4278
+
4279
+ :param _request_timeout: timeout setting for this request. If one
4280
+ number provided, it will be total request
4281
+ timeout. It can also be a pair (tuple) of
4282
+ (connection, read) timeouts.
4283
+ :type _request_timeout: int, tuple(int, int), optional
4284
+ :param _request_auth: set to override the auth_settings for an a single
4285
+ request; this effectively ignores the
4286
+ authentication in the spec for a single request.
4287
+ :type _request_auth: dict, optional
4288
+ :param _content_type: force content-type for the request.
4289
+ :type _content_type: str, Optional
4290
+ :param _headers: set to override the headers for a single
4291
+ request; this effectively ignores the headers
4292
+ in the spec for a single request.
4293
+ :type _headers: dict, optional
4294
+ :param _host_index: set to override the host_index for a single
4295
+ request; this effectively ignores the host_index
4296
+ in the spec for a single request.
4297
+ :type _host_index: int, optional
4298
+ :return: Returns the result object.
4299
+ """ # noqa: E501
4300
+
4301
+ _param = self._size_total_serialize(
4302
+ _request_auth=_request_auth,
4303
+ _content_type=_content_type,
4304
+ _headers=_headers,
4305
+ _host_index=_host_index
4306
+ )
4307
+
4308
+ _response_types_map: Dict[str, Optional[str]] = {
4309
+ '200': "float",
4310
+ }
4311
+ response_data = self.api_client.call_api(
4312
+ *_param,
4313
+ _request_timeout=_request_timeout
4314
+ )
4315
+ return response_data.response
4316
+
4317
+
4318
+ def _size_total_serialize(
4319
+ self,
4320
+ _request_auth,
4321
+ _content_type,
4322
+ _headers,
4323
+ _host_index,
4324
+ ) -> RequestSerialized:
4325
+
4326
+ _host = None
4327
+
4328
+ _collection_formats: Dict[str, str] = {
4329
+ }
4330
+
4331
+ _path_params: Dict[str, str] = {}
4332
+ _query_params: List[Tuple[str, str]] = []
4333
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4334
+ _form_params: List[Tuple[str, str]] = []
4335
+ _files: Dict[
4336
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4337
+ ] = {}
4338
+ _body_params: Optional[bytes] = None
4339
+
4340
+ # process the path parameters
4341
+ # process the query parameters
4342
+ # process the header parameters
4343
+ # process the form parameters
4344
+ # process the body parameter
4345
+
4346
+
4347
+ # set the HTTP header `Accept`
4348
+ if 'Accept' not in _header_params:
4349
+ _header_params['Accept'] = self.api_client.select_header_accept(
4350
+ [
4351
+ '*/*'
4352
+ ]
4353
+ )
4354
+
4355
+
4356
+ # authentication setting
4357
+ _auth_settings: List[str] = [
4358
+ 'QAnswer-Api-Key',
4359
+ 'Bearer'
4360
+ ]
4361
+
4362
+ return self.api_client.param_serialize(
4363
+ method='GET',
4364
+ resource_path='/api/ai-assistant/total-datasets-size',
4365
+ path_params=_path_params,
4366
+ query_params=_query_params,
4367
+ header_params=_header_params,
4368
+ body=_body_params,
4369
+ post_params=_form_params,
4370
+ files=_files,
4371
+ auth_settings=_auth_settings,
4372
+ collection_formats=_collection_formats,
4373
+ _host=_host,
4374
+ _request_auth=_request_auth
4375
+ )
4376
+
4377
+