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