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