qanswer_sdk 3.1193.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qanswer_sdk/__init__.py +366 -0
- qanswer_sdk/api/__init__.py +47 -0
- qanswer_sdk/api/admin_api.py +11207 -0
- qanswer_sdk/api/ai_assistant_access_rights_api.py +5331 -0
- qanswer_sdk/api/ai_assistant_api.py +4377 -0
- qanswer_sdk/api/bot_slack_api.py +814 -0
- qanswer_sdk/api/chat_completion_api.py +309 -0
- qanswer_sdk/api/chatbot_api.py +1091 -0
- qanswer_sdk/api/connector_document_api.py +1406 -0
- qanswer_sdk/api/connector_e_consilium_api.py +326 -0
- qanswer_sdk/api/connector_e_consilium_search_index_connector_api.py +1215 -0
- qanswer_sdk/api/connector_google_drive_api.py +1870 -0
- qanswer_sdk/api/connector_one_drive_api.py +1559 -0
- qanswer_sdk/api/connector_onenote_api.py +1576 -0
- qanswer_sdk/api/connector_pinecone_api.py +892 -0
- qanswer_sdk/api/connector_publication_office_controller_api.py +1215 -0
- qanswer_sdk/api/connector_qn_a_api.py +1538 -0
- qanswer_sdk/api/connector_rdf_answer_api.py +1445 -0
- qanswer_sdk/api/connector_rdf_api.py +5318 -0
- qanswer_sdk/api/connector_sharepoint_api.py +2584 -0
- qanswer_sdk/api/connector_websearch_api.py +326 -0
- qanswer_sdk/api/connector_website_api.py +2068 -0
- qanswer_sdk/api/connectors_api.py +1497 -0
- qanswer_sdk/api/connectors_data_api.py +3697 -0
- qanswer_sdk/api/conversation_logs_api.py +6668 -0
- qanswer_sdk/api/dataset_config_api.py +2178 -0
- qanswer_sdk/api/debug_api.py +282 -0
- qanswer_sdk/api/llm_api.py +563 -0
- qanswer_sdk/api/llm_consumption_controller_api.py +310 -0
- qanswer_sdk/api/organizations_teams_api.py +8465 -0
- qanswer_sdk/api/payment_api.py +1546 -0
- qanswer_sdk/api/socket_api.py +2975 -0
- qanswer_sdk/api/speech_to_text_api.py +734 -0
- qanswer_sdk/api/tag_api.py +2396 -0
- qanswer_sdk/api/task_chat_api.py +2064 -0
- qanswer_sdk/api/task_rdf_linker_api.py +4382 -0
- qanswer_sdk/api/task_rdf_sparql_endpoint_api.py +3522 -0
- qanswer_sdk/api/task_rdf_text_linker_api.py +1346 -0
- qanswer_sdk/api/task_relation_extraction_api.py +2977 -0
- qanswer_sdk/api/task_report_copilot_api.py +2980 -0
- qanswer_sdk/api/task_search_api.py +1784 -0
- qanswer_sdk/api/task_sparql2text_api.py +326 -0
- qanswer_sdk/api/task_text2sparql_api.py +908 -0
- qanswer_sdk/api/task_text_classification_api.py +914 -0
- qanswer_sdk/api/user_api.py +7098 -0
- qanswer_sdk/api_client.py +797 -0
- qanswer_sdk/api_response.py +21 -0
- qanswer_sdk/configuration.py +487 -0
- qanswer_sdk/exceptions.py +199 -0
- qanswer_sdk/models/__init__.py +307 -0
- qanswer_sdk/models/access_pdf_payload_model.py +109 -0
- qanswer_sdk/models/add_qn_a_request.py +103 -0
- qanswer_sdk/models/add_synonyms.py +91 -0
- qanswer_sdk/models/add_synonyms_resp.py +89 -0
- qanswer_sdk/models/aggregate.py +97 -0
- qanswer_sdk/models/aggregation.py +112 -0
- qanswer_sdk/models/aggregations_group.py +102 -0
- qanswer_sdk/models/ai_assistant_dto.py +103 -0
- qanswer_sdk/models/ai_assistant_shared_access.py +113 -0
- qanswer_sdk/models/allowed_file_extensions.py +98 -0
- qanswer_sdk/models/api_response.py +87 -0
- qanswer_sdk/models/applied_metadata_filter.py +98 -0
- qanswer_sdk/models/assistant_message_stop.py +93 -0
- qanswer_sdk/models/auth_link_response.py +91 -0
- qanswer_sdk/models/autocompletion_config.py +93 -0
- qanswer_sdk/models/available_connectors_response.py +99 -0
- qanswer_sdk/models/available_embedding_models_response.py +95 -0
- qanswer_sdk/models/available_endpoints_response.py +95 -0
- qanswer_sdk/models/available_logs_visibility_policy.py +103 -0
- qanswer_sdk/models/available_space_quota_for_dataset.py +91 -0
- qanswer_sdk/models/available_storage_preference.py +103 -0
- qanswer_sdk/models/base_connectors_response.py +89 -0
- qanswer_sdk/models/base_conversation_response.py +89 -0
- qanswer_sdk/models/base_feedback_response.py +89 -0
- qanswer_sdk/models/branding_data.py +87 -0
- qanswer_sdk/models/cell.py +89 -0
- qanswer_sdk/models/change_password.py +89 -0
- qanswer_sdk/models/change_password_admin.py +89 -0
- qanswer_sdk/models/change_role.py +96 -0
- qanswer_sdk/models/chat_task_settings.py +135 -0
- qanswer_sdk/models/chat_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/chat_task_update.py +129 -0
- qanswer_sdk/models/chatbot_chat_payload.py +115 -0
- qanswer_sdk/models/chatbot_conversation_model.py +141 -0
- qanswer_sdk/models/chatbot_response.py +119 -0
- qanswer_sdk/models/check_mode_response.py +100 -0
- qanswer_sdk/models/class_info.py +89 -0
- qanswer_sdk/models/connector_model.py +112 -0
- qanswer_sdk/models/content_item.py +130 -0
- qanswer_sdk/models/conversation_message.py +186 -0
- qanswer_sdk/models/conversation_model.py +131 -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.py +99 -0
- qanswer_sdk/models/create_connector_request.py +93 -0
- qanswer_sdk/models/create_connector_response.py +95 -0
- qanswer_sdk/models/create_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/create_sharepoint_connector_from_certificate_request.py +103 -0
- qanswer_sdk/models/create_sharepoint_connector_request.py +101 -0
- qanswer_sdk/models/dataset_config_request.py +187 -0
- qanswer_sdk/models/dataset_default_values_model.py +141 -0
- qanswer_sdk/models/dataset_description.py +91 -0
- qanswer_sdk/models/dataset_detail.py +133 -0
- qanswer_sdk/models/dataset_detail_kg.py +158 -0
- qanswer_sdk/models/dataset_schema.py +207 -0
- qanswer_sdk/models/dataset_update_object.py +195 -0
- qanswer_sdk/models/dataset_users_response.py +87 -0
- qanswer_sdk/models/default_prompt.py +106 -0
- qanswer_sdk/models/delete_connector_model.py +96 -0
- qanswer_sdk/models/delete_connector_request.py +99 -0
- qanswer_sdk/models/delete_connectors_response.py +91 -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 +91 -0
- qanswer_sdk/models/delete_synonym_resp.py +89 -0
- qanswer_sdk/models/diarization_segment.py +93 -0
- qanswer_sdk/models/document_content_response.py +91 -0
- qanswer_sdk/models/document_content_update_model.py +95 -0
- qanswer_sdk/models/document_file_delete_by_connector_model.py +99 -0
- qanswer_sdk/models/document_metadata.py +107 -0
- qanswer_sdk/models/document_metadata_list_wrapper.py +95 -0
- qanswer_sdk/models/document_status_response.py +89 -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 +105 -0
- qanswer_sdk/models/econsilium_search_index_additional_fields.py +101 -0
- qanswer_sdk/models/email_request.py +87 -0
- qanswer_sdk/models/embedding_endpoint.py +139 -0
- qanswer_sdk/models/embedding_endpoint_create.py +137 -0
- qanswer_sdk/models/embedding_endpoint_update.py +131 -0
- qanswer_sdk/models/embedding_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/embedding_model.py +96 -0
- qanswer_sdk/models/entity.py +97 -0
- qanswer_sdk/models/entity_linker_response.py +99 -0
- qanswer_sdk/models/entity_model.py +99 -0
- qanswer_sdk/models/extra_body.py +91 -0
- qanswer_sdk/models/extract_hyper_links_payload.py +102 -0
- qanswer_sdk/models/extract_robot_links_payload.py +88 -0
- qanswer_sdk/models/extract_robot_links_response.py +88 -0
- qanswer_sdk/models/fact.py +96 -0
- qanswer_sdk/models/feedback_model.py +107 -0
- qanswer_sdk/models/feedback_update.py +103 -0
- qanswer_sdk/models/file_es_meta_data.py +89 -0
- qanswer_sdk/models/file_folder_model.py +113 -0
- qanswer_sdk/models/file_model.py +134 -0
- qanswer_sdk/models/files_by_connector_model.py +89 -0
- qanswer_sdk/models/format_return.py +87 -0
- qanswer_sdk/models/g_drive_connector_info.py +95 -0
- qanswer_sdk/models/g_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/g_drive_download_request.py +101 -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/guardrail_endpoint.py +121 -0
- qanswer_sdk/models/has_lucene_index_result.py +87 -0
- qanswer_sdk/models/index_config.py +95 -0
- qanswer_sdk/models/install_response.py +89 -0
- qanswer_sdk/models/is_enabled_response.py +87 -0
- qanswer_sdk/models/is_merging_result.py +87 -0
- qanswer_sdk/models/json_nullable_file_failure_reason.py +87 -0
- qanswer_sdk/models/json_nullable_source_metadata.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/link.py +103 -0
- qanswer_sdk/models/link_extraction_response.py +97 -0
- qanswer_sdk/models/link_result_paginated.py +97 -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_chatbot_conversation_response.py +105 -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 +101 -0
- qanswer_sdk/models/list_socket_events.py +95 -0
- qanswer_sdk/models/list_synonyms_model.py +89 -0
- qanswer_sdk/models/llm_context_ranges_response.py +93 -0
- qanswer_sdk/models/llm_cost.py +108 -0
- qanswer_sdk/models/llm_details.py +111 -0
- qanswer_sdk/models/llm_endpoint.py +167 -0
- qanswer_sdk/models/llm_endpoint_create.py +165 -0
- qanswer_sdk/models/llm_endpoint_default_prompts.py +93 -0
- qanswer_sdk/models/llm_endpoint_update.py +163 -0
- qanswer_sdk/models/llm_endpoint_validation_response.py +96 -0
- qanswer_sdk/models/login_request.py +89 -0
- qanswer_sdk/models/logo.py +89 -0
- qanswer_sdk/models/lucene_index_request_result.py +87 -0
- qanswer_sdk/models/merge_request_result.py +87 -0
- qanswer_sdk/models/messages_stats_per_day_response.py +99 -0
- qanswer_sdk/models/modify_connector_request.py +111 -0
- qanswer_sdk/models/o_auth_service.py +89 -0
- qanswer_sdk/models/one_drive_download_by_ids.py +89 -0
- qanswer_sdk/models/one_drive_download_request.py +101 -0
- qanswer_sdk/models/one_note_download_by_ids.py +91 -0
- qanswer_sdk/models/one_note_download_request.py +101 -0
- qanswer_sdk/models/organization.py +93 -0
- qanswer_sdk/models/organization_creation.py +91 -0
- qanswer_sdk/models/organization_filter.py +87 -0
- qanswer_sdk/models/organization_shared.py +105 -0
- qanswer_sdk/models/page_organization.py +123 -0
- qanswer_sdk/models/page_team_with_count.py +123 -0
- qanswer_sdk/models/pageable.py +92 -0
- qanswer_sdk/models/pageable_object.py +101 -0
- qanswer_sdk/models/password.py +89 -0
- qanswer_sdk/models/pinecone_index_model.py +91 -0
- qanswer_sdk/models/plan.py +123 -0
- qanswer_sdk/models/predicted_class.py +89 -0
- qanswer_sdk/models/prompt_token_count_details.py +99 -0
- qanswer_sdk/models/provider.py +87 -0
- qanswer_sdk/models/publication_add_payload.py +103 -0
- qanswer_sdk/models/publication_file_metadata.py +105 -0
- qanswer_sdk/models/publication_office_additional_fields.py +111 -0
- qanswer_sdk/models/publication_search_index_search_response.py +113 -0
- qanswer_sdk/models/qa_context.py +129 -0
- qanswer_sdk/models/qa_contexts.py +116 -0
- qanswer_sdk/models/qa_metadata_payload.py +123 -0
- qanswer_sdk/models/qa_table.py +102 -0
- qanswer_sdk/models/qn_a_pair_model.py +103 -0
- qanswer_sdk/models/qn_a_pair_response.py +95 -0
- qanswer_sdk/models/question_completion.py +89 -0
- qanswer_sdk/models/rag_params.py +89 -0
- qanswer_sdk/models/rag_payload.py +154 -0
- qanswer_sdk/models/rag_response.py +150 -0
- qanswer_sdk/models/ranker_config.py +93 -0
- qanswer_sdk/models/reference_model.py +95 -0
- qanswer_sdk/models/refresh_token_request.py +87 -0
- qanswer_sdk/models/refresh_website_connector_payload.py +94 -0
- qanswer_sdk/models/register_pinecone_connector_request.py +95 -0
- qanswer_sdk/models/relation_extraction_configuration.py +105 -0
- qanswer_sdk/models/relation_extraction_payload.py +111 -0
- qanswer_sdk/models/relation_extraction_result.py +101 -0
- qanswer_sdk/models/relation_extraction_schema.py +101 -0
- qanswer_sdk/models/relation_extraction_task_settings.py +123 -0
- qanswer_sdk/models/relation_extraction_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/relation_extraction_task_update.py +117 -0
- qanswer_sdk/models/relation_extraction_template_payload.py +97 -0
- qanswer_sdk/models/relation_extraction_template_update_payload.py +95 -0
- qanswer_sdk/models/relation_model.py +89 -0
- qanswer_sdk/models/report_copilot_create_payload.py +103 -0
- qanswer_sdk/models/report_copilot_export_template_as_docx_payload_simplified.py +91 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_payload.py +95 -0
- qanswer_sdk/models/report_copilot_generation_from_slots_response.py +95 -0
- qanswer_sdk/models/report_copilot_refinement_payload.py +104 -0
- qanswer_sdk/models/report_copilot_refinement_response.py +87 -0
- qanswer_sdk/models/report_copilot_slot_task_settings.py +125 -0
- qanswer_sdk/models/report_copilot_slot_task_update.py +119 -0
- qanswer_sdk/models/report_copilot_task_settings.py +123 -0
- qanswer_sdk/models/report_copilot_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/report_copilot_task_update.py +117 -0
- qanswer_sdk/models/report_copilot_template.py +107 -0
- qanswer_sdk/models/report_copilot_template_simplified.py +95 -0
- qanswer_sdk/models/report_copilot_update_payload.py +101 -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/retreive_all_synonyms_resp.py +99 -0
- qanswer_sdk/models/retry_params.py +89 -0
- qanswer_sdk/models/role.py +99 -0
- qanswer_sdk/models/search_document_response.py +105 -0
- qanswer_sdk/models/search_index_payload.py +114 -0
- qanswer_sdk/models/search_metadata_filter.py +89 -0
- qanswer_sdk/models/search_payload.py +124 -0
- qanswer_sdk/models/search_response.py +113 -0
- qanswer_sdk/models/search_task_settings.py +131 -0
- qanswer_sdk/models/search_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/search_task_update.py +123 -0
- qanswer_sdk/models/set_logo1_request.py +87 -0
- qanswer_sdk/models/share_point_download_by_ids.py +99 -0
- qanswer_sdk/models/share_point_download_request.py +101 -0
- qanswer_sdk/models/shared_organization_access.py +109 -0
- qanswer_sdk/models/shared_team_access.py +107 -0
- qanswer_sdk/models/shared_user.py +99 -0
- qanswer_sdk/models/sign_up_request.py +96 -0
- qanswer_sdk/models/signout_request.py +87 -0
- qanswer_sdk/models/slot.py +138 -0
- qanswer_sdk/models/slot_in_prompt.py +91 -0
- qanswer_sdk/models/slot_update.py +138 -0
- qanswer_sdk/models/socket_conversation_message.py +207 -0
- qanswer_sdk/models/socket_data_extraction.py +109 -0
- qanswer_sdk/models/socket_file_metadata.py +172 -0
- qanswer_sdk/models/socket_join_conversation.py +97 -0
- qanswer_sdk/models/socket_join_dataset.py +93 -0
- qanswer_sdk/models/socket_report_continuation_response.py +106 -0
- qanswer_sdk/models/socket_report_copilot_generation_from_slots_response.py +120 -0
- qanswer_sdk/models/socket_report_copilot_refinement_response.py +108 -0
- qanswer_sdk/models/socket_speech2_text_response.py +99 -0
- qanswer_sdk/models/socket_stop_conversation.py +97 -0
- qanswer_sdk/models/sort_object.py +91 -0
- qanswer_sdk/models/source.py +125 -0
- qanswer_sdk/models/sparql2_text_payload.py +97 -0
- qanswer_sdk/models/speech2_text_response.py +87 -0
- qanswer_sdk/models/speech2_text_with_diarization_response.py +106 -0
- qanswer_sdk/models/stat_per_date.py +89 -0
- qanswer_sdk/models/status_response.py +89 -0
- qanswer_sdk/models/subject_model.py +91 -0
- qanswer_sdk/models/suggestion_list_response.py +87 -0
- qanswer_sdk/models/summa_server.py +101 -0
- qanswer_sdk/models/tag_payload.py +87 -0
- qanswer_sdk/models/tag_qa_list_payload.py +100 -0
- qanswer_sdk/models/tag_qa_payload.py +91 -0
- qanswer_sdk/models/team.py +93 -0
- qanswer_sdk/models/team_creation.py +89 -0
- qanswer_sdk/models/team_filter.py +91 -0
- qanswer_sdk/models/team_shared.py +105 -0
- qanswer_sdk/models/team_with_count.py +95 -0
- qanswer_sdk/models/terms_bucket.py +89 -0
- qanswer_sdk/models/text2_sparql_payload.py +156 -0
- qanswer_sdk/models/text2_sparql_task_settings.py +123 -0
- qanswer_sdk/models/text2_sparql_task_settings_update_payload.py +95 -0
- qanswer_sdk/models/text2_sparql_task_update.py +117 -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/total_stat.py +96 -0
- qanswer_sdk/models/ui_mappings.py +141 -0
- qanswer_sdk/models/update_metadata_model.py +95 -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 +93 -0
- qanswer_sdk/models/update_synonyms_resp.py +89 -0
- qanswer_sdk/models/uri_mapping.py +89 -0
- qanswer_sdk/models/user.py +91 -0
- qanswer_sdk/models/user_chatbot_setting_payload.py +106 -0
- qanswer_sdk/models/user_chatbot_setting_response.py +105 -0
- qanswer_sdk/models/user_dataset.py +144 -0
- qanswer_sdk/models/user_dataset_api_key.py +116 -0
- qanswer_sdk/models/user_filter.py +101 -0
- qanswer_sdk/models/user_identity_availability.py +87 -0
- qanswer_sdk/models/user_list_dto.py +101 -0
- qanswer_sdk/models/user_oauth_token.py +96 -0
- qanswer_sdk/models/user_profile.py +184 -0
- qanswer_sdk/models/user_profile_list_dto.py +101 -0
- qanswer_sdk/models/user_profile_paginated.py +101 -0
- qanswer_sdk/models/website_add_payload.py +98 -0
- qanswer_sdk/models/website_connector_settings.py +160 -0
- qanswer_sdk/models/widget_configs.py +105 -0
- qanswer_sdk/py.typed +0 -0
- qanswer_sdk/rest.py +257 -0
- qanswer_sdk-3.1193.0.dist-info/METADATA +125 -0
- qanswer_sdk-3.1193.0.dist-info/RECORD +346 -0
- qanswer_sdk-3.1193.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,1445 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
QAnswer: Api Documentation
|
5
|
+
|
6
|
+
APIs provided by QAnswer
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 1.0
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
""" # noqa: E501
|
13
|
+
|
14
|
+
import warnings
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
|
+
from typing_extensions import Annotated
|
18
|
+
|
19
|
+
from pydantic import StrictInt, StrictStr
|
20
|
+
from typing import Any, Dict, List, Optional
|
21
|
+
from qanswer_sdk.models.qa_contexts import QaContexts
|
22
|
+
from qanswer_sdk.models.qa_table import QaTable
|
23
|
+
from qanswer_sdk.models.summa_server import SummaServer
|
24
|
+
|
25
|
+
from qanswer_sdk.api_client import ApiClient, RequestSerialized
|
26
|
+
from qanswer_sdk.api_response import ApiResponse
|
27
|
+
from qanswer_sdk.rest import RESTResponseType
|
28
|
+
|
29
|
+
|
30
|
+
class ConnectorRDFAnswerApi:
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
32
|
+
Ref: https://openapi-generator.tech
|
33
|
+
|
34
|
+
Do not edit the class manually.
|
35
|
+
"""
|
36
|
+
|
37
|
+
def __init__(self, api_client=None) -> None:
|
38
|
+
if api_client is None:
|
39
|
+
api_client = ApiClient.get_default()
|
40
|
+
self.api_client = api_client
|
41
|
+
|
42
|
+
|
43
|
+
@validate_call
|
44
|
+
def answer_context(
|
45
|
+
self,
|
46
|
+
username: StrictStr,
|
47
|
+
kb: StrictStr,
|
48
|
+
sparql_query: StrictStr,
|
49
|
+
lang: Optional[StrictStr] = None,
|
50
|
+
timeout: Optional[StrictInt] = None,
|
51
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
52
|
+
_request_timeout: Union[
|
53
|
+
None,
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
55
|
+
Tuple[
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
57
|
+
Annotated[StrictFloat, Field(gt=0)]
|
58
|
+
]
|
59
|
+
] = None,
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
64
|
+
) -> QaContexts:
|
65
|
+
"""Given a SPARQL query returns all information about the answer entities like label, description, images ...
|
66
|
+
|
67
|
+
|
68
|
+
:param username: (required)
|
69
|
+
:type username: str
|
70
|
+
:param kb: (required)
|
71
|
+
:type kb: str
|
72
|
+
:param sparql_query: (required)
|
73
|
+
:type sparql_query: str
|
74
|
+
:param lang:
|
75
|
+
:type lang: str
|
76
|
+
:param timeout:
|
77
|
+
:type timeout: int
|
78
|
+
:param q_answer_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._answer_context_serialize(
|
103
|
+
username=username,
|
104
|
+
kb=kb,
|
105
|
+
sparql_query=sparql_query,
|
106
|
+
lang=lang,
|
107
|
+
timeout=timeout,
|
108
|
+
q_answer_api_key=q_answer_api_key,
|
109
|
+
_request_auth=_request_auth,
|
110
|
+
_content_type=_content_type,
|
111
|
+
_headers=_headers,
|
112
|
+
_host_index=_host_index
|
113
|
+
)
|
114
|
+
|
115
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
116
|
+
'200': "QaContexts",
|
117
|
+
}
|
118
|
+
response_data = self.api_client.call_api(
|
119
|
+
*_param,
|
120
|
+
_request_timeout=_request_timeout
|
121
|
+
)
|
122
|
+
response_data.read()
|
123
|
+
return self.api_client.response_deserialize(
|
124
|
+
response_data=response_data,
|
125
|
+
response_types_map=_response_types_map,
|
126
|
+
).data
|
127
|
+
|
128
|
+
|
129
|
+
@validate_call
|
130
|
+
def answer_context_with_http_info(
|
131
|
+
self,
|
132
|
+
username: StrictStr,
|
133
|
+
kb: StrictStr,
|
134
|
+
sparql_query: StrictStr,
|
135
|
+
lang: Optional[StrictStr] = None,
|
136
|
+
timeout: Optional[StrictInt] = None,
|
137
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
138
|
+
_request_timeout: Union[
|
139
|
+
None,
|
140
|
+
Annotated[StrictFloat, Field(gt=0)],
|
141
|
+
Tuple[
|
142
|
+
Annotated[StrictFloat, Field(gt=0)],
|
143
|
+
Annotated[StrictFloat, Field(gt=0)]
|
144
|
+
]
|
145
|
+
] = None,
|
146
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
147
|
+
_content_type: Optional[StrictStr] = None,
|
148
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
149
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
150
|
+
) -> ApiResponse[QaContexts]:
|
151
|
+
"""Given a SPARQL query returns all information about the answer entities like label, description, images ...
|
152
|
+
|
153
|
+
|
154
|
+
:param username: (required)
|
155
|
+
:type username: str
|
156
|
+
:param kb: (required)
|
157
|
+
:type kb: str
|
158
|
+
:param sparql_query: (required)
|
159
|
+
:type sparql_query: str
|
160
|
+
:param lang:
|
161
|
+
:type lang: str
|
162
|
+
:param timeout:
|
163
|
+
:type timeout: int
|
164
|
+
:param q_answer_api_key:
|
165
|
+
:type q_answer_api_key: str
|
166
|
+
:param _request_timeout: timeout setting for this request. If one
|
167
|
+
number provided, it will be total request
|
168
|
+
timeout. It can also be a pair (tuple) of
|
169
|
+
(connection, read) timeouts.
|
170
|
+
:type _request_timeout: int, tuple(int, int), optional
|
171
|
+
:param _request_auth: set to override the auth_settings for an a single
|
172
|
+
request; this effectively ignores the
|
173
|
+
authentication in the spec for a single request.
|
174
|
+
:type _request_auth: dict, optional
|
175
|
+
:param _content_type: force content-type for the request.
|
176
|
+
:type _content_type: str, Optional
|
177
|
+
:param _headers: set to override the headers for a single
|
178
|
+
request; this effectively ignores the headers
|
179
|
+
in the spec for a single request.
|
180
|
+
:type _headers: dict, optional
|
181
|
+
:param _host_index: set to override the host_index for a single
|
182
|
+
request; this effectively ignores the host_index
|
183
|
+
in the spec for a single request.
|
184
|
+
:type _host_index: int, optional
|
185
|
+
:return: Returns the result object.
|
186
|
+
""" # noqa: E501
|
187
|
+
|
188
|
+
_param = self._answer_context_serialize(
|
189
|
+
username=username,
|
190
|
+
kb=kb,
|
191
|
+
sparql_query=sparql_query,
|
192
|
+
lang=lang,
|
193
|
+
timeout=timeout,
|
194
|
+
q_answer_api_key=q_answer_api_key,
|
195
|
+
_request_auth=_request_auth,
|
196
|
+
_content_type=_content_type,
|
197
|
+
_headers=_headers,
|
198
|
+
_host_index=_host_index
|
199
|
+
)
|
200
|
+
|
201
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
202
|
+
'200': "QaContexts",
|
203
|
+
}
|
204
|
+
response_data = self.api_client.call_api(
|
205
|
+
*_param,
|
206
|
+
_request_timeout=_request_timeout
|
207
|
+
)
|
208
|
+
response_data.read()
|
209
|
+
return self.api_client.response_deserialize(
|
210
|
+
response_data=response_data,
|
211
|
+
response_types_map=_response_types_map,
|
212
|
+
)
|
213
|
+
|
214
|
+
|
215
|
+
@validate_call
|
216
|
+
def answer_context_without_preload_content(
|
217
|
+
self,
|
218
|
+
username: StrictStr,
|
219
|
+
kb: StrictStr,
|
220
|
+
sparql_query: StrictStr,
|
221
|
+
lang: Optional[StrictStr] = None,
|
222
|
+
timeout: Optional[StrictInt] = None,
|
223
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
224
|
+
_request_timeout: Union[
|
225
|
+
None,
|
226
|
+
Annotated[StrictFloat, Field(gt=0)],
|
227
|
+
Tuple[
|
228
|
+
Annotated[StrictFloat, Field(gt=0)],
|
229
|
+
Annotated[StrictFloat, Field(gt=0)]
|
230
|
+
]
|
231
|
+
] = None,
|
232
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
233
|
+
_content_type: Optional[StrictStr] = None,
|
234
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
235
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
236
|
+
) -> RESTResponseType:
|
237
|
+
"""Given a SPARQL query returns all information about the answer entities like label, description, images ...
|
238
|
+
|
239
|
+
|
240
|
+
:param username: (required)
|
241
|
+
:type username: str
|
242
|
+
:param kb: (required)
|
243
|
+
:type kb: str
|
244
|
+
:param sparql_query: (required)
|
245
|
+
:type sparql_query: str
|
246
|
+
:param lang:
|
247
|
+
:type lang: str
|
248
|
+
:param timeout:
|
249
|
+
:type timeout: int
|
250
|
+
:param q_answer_api_key:
|
251
|
+
:type q_answer_api_key: str
|
252
|
+
:param _request_timeout: timeout setting for this request. If one
|
253
|
+
number provided, it will be total request
|
254
|
+
timeout. It can also be a pair (tuple) of
|
255
|
+
(connection, read) timeouts.
|
256
|
+
:type _request_timeout: int, tuple(int, int), optional
|
257
|
+
:param _request_auth: set to override the auth_settings for an a single
|
258
|
+
request; this effectively ignores the
|
259
|
+
authentication in the spec for a single request.
|
260
|
+
:type _request_auth: dict, optional
|
261
|
+
:param _content_type: force content-type for the request.
|
262
|
+
:type _content_type: str, Optional
|
263
|
+
:param _headers: set to override the headers for a single
|
264
|
+
request; this effectively ignores the headers
|
265
|
+
in the spec for a single request.
|
266
|
+
:type _headers: dict, optional
|
267
|
+
:param _host_index: set to override the host_index for a single
|
268
|
+
request; this effectively ignores the host_index
|
269
|
+
in the spec for a single request.
|
270
|
+
:type _host_index: int, optional
|
271
|
+
:return: Returns the result object.
|
272
|
+
""" # noqa: E501
|
273
|
+
|
274
|
+
_param = self._answer_context_serialize(
|
275
|
+
username=username,
|
276
|
+
kb=kb,
|
277
|
+
sparql_query=sparql_query,
|
278
|
+
lang=lang,
|
279
|
+
timeout=timeout,
|
280
|
+
q_answer_api_key=q_answer_api_key,
|
281
|
+
_request_auth=_request_auth,
|
282
|
+
_content_type=_content_type,
|
283
|
+
_headers=_headers,
|
284
|
+
_host_index=_host_index
|
285
|
+
)
|
286
|
+
|
287
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
288
|
+
'200': "QaContexts",
|
289
|
+
}
|
290
|
+
response_data = self.api_client.call_api(
|
291
|
+
*_param,
|
292
|
+
_request_timeout=_request_timeout
|
293
|
+
)
|
294
|
+
return response_data.response
|
295
|
+
|
296
|
+
|
297
|
+
def _answer_context_serialize(
|
298
|
+
self,
|
299
|
+
username,
|
300
|
+
kb,
|
301
|
+
sparql_query,
|
302
|
+
lang,
|
303
|
+
timeout,
|
304
|
+
q_answer_api_key,
|
305
|
+
_request_auth,
|
306
|
+
_content_type,
|
307
|
+
_headers,
|
308
|
+
_host_index,
|
309
|
+
) -> RequestSerialized:
|
310
|
+
|
311
|
+
_host = None
|
312
|
+
|
313
|
+
_collection_formats: Dict[str, str] = {
|
314
|
+
}
|
315
|
+
|
316
|
+
_path_params: Dict[str, str] = {}
|
317
|
+
_query_params: List[Tuple[str, str]] = []
|
318
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
319
|
+
_form_params: List[Tuple[str, str]] = []
|
320
|
+
_files: Dict[
|
321
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
322
|
+
] = {}
|
323
|
+
_body_params: Optional[bytes] = None
|
324
|
+
|
325
|
+
# process the path parameters
|
326
|
+
# process the query parameters
|
327
|
+
if username is not None:
|
328
|
+
|
329
|
+
_query_params.append(('username', username))
|
330
|
+
|
331
|
+
if kb is not None:
|
332
|
+
|
333
|
+
_query_params.append(('kb', kb))
|
334
|
+
|
335
|
+
if lang is not None:
|
336
|
+
|
337
|
+
_query_params.append(('lang', lang))
|
338
|
+
|
339
|
+
if sparql_query is not None:
|
340
|
+
|
341
|
+
_query_params.append(('sparqlQuery', sparql_query))
|
342
|
+
|
343
|
+
if timeout is not None:
|
344
|
+
|
345
|
+
_query_params.append(('timeout', timeout))
|
346
|
+
|
347
|
+
# process the header parameters
|
348
|
+
if q_answer_api_key is not None:
|
349
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
350
|
+
# process the form parameters
|
351
|
+
# process the body parameter
|
352
|
+
|
353
|
+
|
354
|
+
# set the HTTP header `Accept`
|
355
|
+
if 'Accept' not in _header_params:
|
356
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
357
|
+
[
|
358
|
+
'application/json'
|
359
|
+
]
|
360
|
+
)
|
361
|
+
|
362
|
+
|
363
|
+
# authentication setting
|
364
|
+
_auth_settings: List[str] = [
|
365
|
+
'QAnswer-Api-Key',
|
366
|
+
'Bearer'
|
367
|
+
]
|
368
|
+
|
369
|
+
return self.api_client.param_serialize(
|
370
|
+
method='GET',
|
371
|
+
resource_path='/api/connectors/rdf/answer/context',
|
372
|
+
path_params=_path_params,
|
373
|
+
query_params=_query_params,
|
374
|
+
header_params=_header_params,
|
375
|
+
body=_body_params,
|
376
|
+
post_params=_form_params,
|
377
|
+
files=_files,
|
378
|
+
auth_settings=_auth_settings,
|
379
|
+
collection_formats=_collection_formats,
|
380
|
+
_host=_host,
|
381
|
+
_request_auth=_request_auth
|
382
|
+
)
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
@validate_call
|
388
|
+
def rdf(
|
389
|
+
self,
|
390
|
+
dataset: StrictStr,
|
391
|
+
user: List[StrictStr],
|
392
|
+
url: StrictStr,
|
393
|
+
language: Optional[StrictStr] = None,
|
394
|
+
accept: Optional[List[StrictStr]] = None,
|
395
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
396
|
+
_request_timeout: Union[
|
397
|
+
None,
|
398
|
+
Annotated[StrictFloat, Field(gt=0)],
|
399
|
+
Tuple[
|
400
|
+
Annotated[StrictFloat, Field(gt=0)],
|
401
|
+
Annotated[StrictFloat, Field(gt=0)]
|
402
|
+
]
|
403
|
+
] = None,
|
404
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
405
|
+
_content_type: Optional[StrictStr] = None,
|
406
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
407
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
408
|
+
) -> object:
|
409
|
+
"""Gets back the RDF content to render
|
410
|
+
|
411
|
+
|
412
|
+
:param dataset: (required)
|
413
|
+
:type dataset: str
|
414
|
+
:param user: (required)
|
415
|
+
:type user: List[str]
|
416
|
+
:param url: (required)
|
417
|
+
:type url: str
|
418
|
+
:param language:
|
419
|
+
:type language: str
|
420
|
+
:param accept:
|
421
|
+
:type accept: List[str]
|
422
|
+
:param q_answer_api_key:
|
423
|
+
:type q_answer_api_key: str
|
424
|
+
:param _request_timeout: timeout setting for this request. If one
|
425
|
+
number provided, it will be total request
|
426
|
+
timeout. It can also be a pair (tuple) of
|
427
|
+
(connection, read) timeouts.
|
428
|
+
:type _request_timeout: int, tuple(int, int), optional
|
429
|
+
:param _request_auth: set to override the auth_settings for an a single
|
430
|
+
request; this effectively ignores the
|
431
|
+
authentication in the spec for a single request.
|
432
|
+
:type _request_auth: dict, optional
|
433
|
+
:param _content_type: force content-type for the request.
|
434
|
+
:type _content_type: str, Optional
|
435
|
+
:param _headers: set to override the headers for a single
|
436
|
+
request; this effectively ignores the headers
|
437
|
+
in the spec for a single request.
|
438
|
+
:type _headers: dict, optional
|
439
|
+
:param _host_index: set to override the host_index for a single
|
440
|
+
request; this effectively ignores the host_index
|
441
|
+
in the spec for a single request.
|
442
|
+
:type _host_index: int, optional
|
443
|
+
:return: Returns the result object.
|
444
|
+
""" # noqa: E501
|
445
|
+
|
446
|
+
_param = self._rdf_serialize(
|
447
|
+
dataset=dataset,
|
448
|
+
user=user,
|
449
|
+
url=url,
|
450
|
+
language=language,
|
451
|
+
accept=accept,
|
452
|
+
q_answer_api_key=q_answer_api_key,
|
453
|
+
_request_auth=_request_auth,
|
454
|
+
_content_type=_content_type,
|
455
|
+
_headers=_headers,
|
456
|
+
_host_index=_host_index
|
457
|
+
)
|
458
|
+
|
459
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
460
|
+
'200': "object",
|
461
|
+
}
|
462
|
+
response_data = self.api_client.call_api(
|
463
|
+
*_param,
|
464
|
+
_request_timeout=_request_timeout
|
465
|
+
)
|
466
|
+
response_data.read()
|
467
|
+
return self.api_client.response_deserialize(
|
468
|
+
response_data=response_data,
|
469
|
+
response_types_map=_response_types_map,
|
470
|
+
).data
|
471
|
+
|
472
|
+
|
473
|
+
@validate_call
|
474
|
+
def rdf_with_http_info(
|
475
|
+
self,
|
476
|
+
dataset: StrictStr,
|
477
|
+
user: List[StrictStr],
|
478
|
+
url: StrictStr,
|
479
|
+
language: Optional[StrictStr] = None,
|
480
|
+
accept: Optional[List[StrictStr]] = None,
|
481
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
482
|
+
_request_timeout: Union[
|
483
|
+
None,
|
484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
485
|
+
Tuple[
|
486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
487
|
+
Annotated[StrictFloat, Field(gt=0)]
|
488
|
+
]
|
489
|
+
] = None,
|
490
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
491
|
+
_content_type: Optional[StrictStr] = None,
|
492
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
493
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
494
|
+
) -> ApiResponse[object]:
|
495
|
+
"""Gets back the RDF content to render
|
496
|
+
|
497
|
+
|
498
|
+
:param dataset: (required)
|
499
|
+
:type dataset: str
|
500
|
+
:param user: (required)
|
501
|
+
:type user: List[str]
|
502
|
+
:param url: (required)
|
503
|
+
:type url: str
|
504
|
+
:param language:
|
505
|
+
:type language: str
|
506
|
+
:param accept:
|
507
|
+
:type accept: List[str]
|
508
|
+
:param q_answer_api_key:
|
509
|
+
:type q_answer_api_key: str
|
510
|
+
:param _request_timeout: timeout setting for this request. If one
|
511
|
+
number provided, it will be total request
|
512
|
+
timeout. It can also be a pair (tuple) of
|
513
|
+
(connection, read) timeouts.
|
514
|
+
:type _request_timeout: int, tuple(int, int), optional
|
515
|
+
:param _request_auth: set to override the auth_settings for an a single
|
516
|
+
request; this effectively ignores the
|
517
|
+
authentication in the spec for a single request.
|
518
|
+
:type _request_auth: dict, optional
|
519
|
+
:param _content_type: force content-type for the request.
|
520
|
+
:type _content_type: str, Optional
|
521
|
+
:param _headers: set to override the headers for a single
|
522
|
+
request; this effectively ignores the headers
|
523
|
+
in the spec for a single request.
|
524
|
+
:type _headers: dict, optional
|
525
|
+
:param _host_index: set to override the host_index for a single
|
526
|
+
request; this effectively ignores the host_index
|
527
|
+
in the spec for a single request.
|
528
|
+
:type _host_index: int, optional
|
529
|
+
:return: Returns the result object.
|
530
|
+
""" # noqa: E501
|
531
|
+
|
532
|
+
_param = self._rdf_serialize(
|
533
|
+
dataset=dataset,
|
534
|
+
user=user,
|
535
|
+
url=url,
|
536
|
+
language=language,
|
537
|
+
accept=accept,
|
538
|
+
q_answer_api_key=q_answer_api_key,
|
539
|
+
_request_auth=_request_auth,
|
540
|
+
_content_type=_content_type,
|
541
|
+
_headers=_headers,
|
542
|
+
_host_index=_host_index
|
543
|
+
)
|
544
|
+
|
545
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
546
|
+
'200': "object",
|
547
|
+
}
|
548
|
+
response_data = self.api_client.call_api(
|
549
|
+
*_param,
|
550
|
+
_request_timeout=_request_timeout
|
551
|
+
)
|
552
|
+
response_data.read()
|
553
|
+
return self.api_client.response_deserialize(
|
554
|
+
response_data=response_data,
|
555
|
+
response_types_map=_response_types_map,
|
556
|
+
)
|
557
|
+
|
558
|
+
|
559
|
+
@validate_call
|
560
|
+
def rdf_without_preload_content(
|
561
|
+
self,
|
562
|
+
dataset: StrictStr,
|
563
|
+
user: List[StrictStr],
|
564
|
+
url: StrictStr,
|
565
|
+
language: Optional[StrictStr] = None,
|
566
|
+
accept: Optional[List[StrictStr]] = None,
|
567
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
568
|
+
_request_timeout: Union[
|
569
|
+
None,
|
570
|
+
Annotated[StrictFloat, Field(gt=0)],
|
571
|
+
Tuple[
|
572
|
+
Annotated[StrictFloat, Field(gt=0)],
|
573
|
+
Annotated[StrictFloat, Field(gt=0)]
|
574
|
+
]
|
575
|
+
] = None,
|
576
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
577
|
+
_content_type: Optional[StrictStr] = None,
|
578
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
579
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
580
|
+
) -> RESTResponseType:
|
581
|
+
"""Gets back the RDF content to render
|
582
|
+
|
583
|
+
|
584
|
+
:param dataset: (required)
|
585
|
+
:type dataset: str
|
586
|
+
:param user: (required)
|
587
|
+
:type user: List[str]
|
588
|
+
:param url: (required)
|
589
|
+
:type url: str
|
590
|
+
:param language:
|
591
|
+
:type language: str
|
592
|
+
:param accept:
|
593
|
+
:type accept: List[str]
|
594
|
+
:param q_answer_api_key:
|
595
|
+
:type q_answer_api_key: str
|
596
|
+
:param _request_timeout: timeout setting for this request. If one
|
597
|
+
number provided, it will be total request
|
598
|
+
timeout. It can also be a pair (tuple) of
|
599
|
+
(connection, read) timeouts.
|
600
|
+
:type _request_timeout: int, tuple(int, int), optional
|
601
|
+
:param _request_auth: set to override the auth_settings for an a single
|
602
|
+
request; this effectively ignores the
|
603
|
+
authentication in the spec for a single request.
|
604
|
+
:type _request_auth: dict, optional
|
605
|
+
:param _content_type: force content-type for the request.
|
606
|
+
:type _content_type: str, Optional
|
607
|
+
:param _headers: set to override the headers for a single
|
608
|
+
request; this effectively ignores the headers
|
609
|
+
in the spec for a single request.
|
610
|
+
:type _headers: dict, optional
|
611
|
+
:param _host_index: set to override the host_index for a single
|
612
|
+
request; this effectively ignores the host_index
|
613
|
+
in the spec for a single request.
|
614
|
+
:type _host_index: int, optional
|
615
|
+
:return: Returns the result object.
|
616
|
+
""" # noqa: E501
|
617
|
+
|
618
|
+
_param = self._rdf_serialize(
|
619
|
+
dataset=dataset,
|
620
|
+
user=user,
|
621
|
+
url=url,
|
622
|
+
language=language,
|
623
|
+
accept=accept,
|
624
|
+
q_answer_api_key=q_answer_api_key,
|
625
|
+
_request_auth=_request_auth,
|
626
|
+
_content_type=_content_type,
|
627
|
+
_headers=_headers,
|
628
|
+
_host_index=_host_index
|
629
|
+
)
|
630
|
+
|
631
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
632
|
+
'200': "object",
|
633
|
+
}
|
634
|
+
response_data = self.api_client.call_api(
|
635
|
+
*_param,
|
636
|
+
_request_timeout=_request_timeout
|
637
|
+
)
|
638
|
+
return response_data.response
|
639
|
+
|
640
|
+
|
641
|
+
def _rdf_serialize(
|
642
|
+
self,
|
643
|
+
dataset,
|
644
|
+
user,
|
645
|
+
url,
|
646
|
+
language,
|
647
|
+
accept,
|
648
|
+
q_answer_api_key,
|
649
|
+
_request_auth,
|
650
|
+
_content_type,
|
651
|
+
_headers,
|
652
|
+
_host_index,
|
653
|
+
) -> RequestSerialized:
|
654
|
+
|
655
|
+
_host = None
|
656
|
+
|
657
|
+
_collection_formats: Dict[str, str] = {
|
658
|
+
'user': 'csv',
|
659
|
+
'accept': 'csv',
|
660
|
+
}
|
661
|
+
|
662
|
+
_path_params: Dict[str, str] = {}
|
663
|
+
_query_params: List[Tuple[str, str]] = []
|
664
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
665
|
+
_form_params: List[Tuple[str, str]] = []
|
666
|
+
_files: Dict[
|
667
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
668
|
+
] = {}
|
669
|
+
_body_params: Optional[bytes] = None
|
670
|
+
|
671
|
+
# process the path parameters
|
672
|
+
if dataset is not None:
|
673
|
+
_path_params['dataset'] = dataset
|
674
|
+
if user is not None:
|
675
|
+
_path_params['user'] = user
|
676
|
+
# process the query parameters
|
677
|
+
if url is not None:
|
678
|
+
|
679
|
+
_query_params.append(('url', url))
|
680
|
+
|
681
|
+
if language is not None:
|
682
|
+
|
683
|
+
_query_params.append(('language', language))
|
684
|
+
|
685
|
+
# process the header parameters
|
686
|
+
if accept is not None:
|
687
|
+
_header_params['accept'] = accept
|
688
|
+
if q_answer_api_key is not None:
|
689
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
690
|
+
# process the form parameters
|
691
|
+
# process the body parameter
|
692
|
+
|
693
|
+
|
694
|
+
# set the HTTP header `Accept`
|
695
|
+
if 'Accept' not in _header_params:
|
696
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
697
|
+
[
|
698
|
+
'*/*'
|
699
|
+
]
|
700
|
+
)
|
701
|
+
|
702
|
+
|
703
|
+
# authentication setting
|
704
|
+
_auth_settings: List[str] = [
|
705
|
+
'QAnswer-Api-Key',
|
706
|
+
'Bearer'
|
707
|
+
]
|
708
|
+
|
709
|
+
return self.api_client.param_serialize(
|
710
|
+
method='GET',
|
711
|
+
resource_path='/api/connectors/rdf/answer/browser/{user}/{dataset}/facet',
|
712
|
+
path_params=_path_params,
|
713
|
+
query_params=_query_params,
|
714
|
+
header_params=_header_params,
|
715
|
+
body=_body_params,
|
716
|
+
post_params=_form_params,
|
717
|
+
files=_files,
|
718
|
+
auth_settings=_auth_settings,
|
719
|
+
collection_formats=_collection_formats,
|
720
|
+
_host=_host,
|
721
|
+
_request_auth=_request_auth
|
722
|
+
)
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
@validate_call
|
728
|
+
def summa(
|
729
|
+
self,
|
730
|
+
dataset: StrictStr,
|
731
|
+
entity: StrictStr,
|
732
|
+
user: List[StrictStr],
|
733
|
+
top_k: Optional[StrictInt] = None,
|
734
|
+
language: Optional[StrictStr] = None,
|
735
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
736
|
+
_request_timeout: Union[
|
737
|
+
None,
|
738
|
+
Annotated[StrictFloat, Field(gt=0)],
|
739
|
+
Tuple[
|
740
|
+
Annotated[StrictFloat, Field(gt=0)],
|
741
|
+
Annotated[StrictFloat, Field(gt=0)]
|
742
|
+
]
|
743
|
+
] = None,
|
744
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
745
|
+
_content_type: Optional[StrictStr] = None,
|
746
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
747
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
748
|
+
) -> SummaServer:
|
749
|
+
"""Generates summaries, i.e. most relevant top-k properties, for an item in a dataset
|
750
|
+
|
751
|
+
|
752
|
+
:param dataset: (required)
|
753
|
+
:type dataset: str
|
754
|
+
:param entity: (required)
|
755
|
+
:type entity: str
|
756
|
+
:param user: (required)
|
757
|
+
:type user: List[str]
|
758
|
+
:param top_k:
|
759
|
+
:type top_k: int
|
760
|
+
:param language:
|
761
|
+
:type language: str
|
762
|
+
:param q_answer_api_key:
|
763
|
+
:type q_answer_api_key: str
|
764
|
+
:param _request_timeout: timeout setting for this request. If one
|
765
|
+
number provided, it will be total request
|
766
|
+
timeout. It can also be a pair (tuple) of
|
767
|
+
(connection, read) timeouts.
|
768
|
+
:type _request_timeout: int, tuple(int, int), optional
|
769
|
+
:param _request_auth: set to override the auth_settings for an a single
|
770
|
+
request; this effectively ignores the
|
771
|
+
authentication in the spec for a single request.
|
772
|
+
:type _request_auth: dict, optional
|
773
|
+
:param _content_type: force content-type for the request.
|
774
|
+
:type _content_type: str, Optional
|
775
|
+
:param _headers: set to override the headers for a single
|
776
|
+
request; this effectively ignores the headers
|
777
|
+
in the spec for a single request.
|
778
|
+
:type _headers: dict, optional
|
779
|
+
:param _host_index: set to override the host_index for a single
|
780
|
+
request; this effectively ignores the host_index
|
781
|
+
in the spec for a single request.
|
782
|
+
:type _host_index: int, optional
|
783
|
+
:return: Returns the result object.
|
784
|
+
""" # noqa: E501
|
785
|
+
|
786
|
+
_param = self._summa_serialize(
|
787
|
+
dataset=dataset,
|
788
|
+
entity=entity,
|
789
|
+
user=user,
|
790
|
+
top_k=top_k,
|
791
|
+
language=language,
|
792
|
+
q_answer_api_key=q_answer_api_key,
|
793
|
+
_request_auth=_request_auth,
|
794
|
+
_content_type=_content_type,
|
795
|
+
_headers=_headers,
|
796
|
+
_host_index=_host_index
|
797
|
+
)
|
798
|
+
|
799
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
800
|
+
'200': "SummaServer",
|
801
|
+
}
|
802
|
+
response_data = self.api_client.call_api(
|
803
|
+
*_param,
|
804
|
+
_request_timeout=_request_timeout
|
805
|
+
)
|
806
|
+
response_data.read()
|
807
|
+
return self.api_client.response_deserialize(
|
808
|
+
response_data=response_data,
|
809
|
+
response_types_map=_response_types_map,
|
810
|
+
).data
|
811
|
+
|
812
|
+
|
813
|
+
@validate_call
|
814
|
+
def summa_with_http_info(
|
815
|
+
self,
|
816
|
+
dataset: StrictStr,
|
817
|
+
entity: StrictStr,
|
818
|
+
user: List[StrictStr],
|
819
|
+
top_k: Optional[StrictInt] = None,
|
820
|
+
language: Optional[StrictStr] = None,
|
821
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
822
|
+
_request_timeout: Union[
|
823
|
+
None,
|
824
|
+
Annotated[StrictFloat, Field(gt=0)],
|
825
|
+
Tuple[
|
826
|
+
Annotated[StrictFloat, Field(gt=0)],
|
827
|
+
Annotated[StrictFloat, Field(gt=0)]
|
828
|
+
]
|
829
|
+
] = None,
|
830
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
831
|
+
_content_type: Optional[StrictStr] = None,
|
832
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
833
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
834
|
+
) -> ApiResponse[SummaServer]:
|
835
|
+
"""Generates summaries, i.e. most relevant top-k properties, for an item in a dataset
|
836
|
+
|
837
|
+
|
838
|
+
:param dataset: (required)
|
839
|
+
:type dataset: str
|
840
|
+
:param entity: (required)
|
841
|
+
:type entity: str
|
842
|
+
:param user: (required)
|
843
|
+
:type user: List[str]
|
844
|
+
:param top_k:
|
845
|
+
:type top_k: int
|
846
|
+
:param language:
|
847
|
+
:type language: str
|
848
|
+
:param q_answer_api_key:
|
849
|
+
:type q_answer_api_key: str
|
850
|
+
:param _request_timeout: timeout setting for this request. If one
|
851
|
+
number provided, it will be total request
|
852
|
+
timeout. It can also be a pair (tuple) of
|
853
|
+
(connection, read) timeouts.
|
854
|
+
:type _request_timeout: int, tuple(int, int), optional
|
855
|
+
:param _request_auth: set to override the auth_settings for an a single
|
856
|
+
request; this effectively ignores the
|
857
|
+
authentication in the spec for a single request.
|
858
|
+
:type _request_auth: dict, optional
|
859
|
+
:param _content_type: force content-type for the request.
|
860
|
+
:type _content_type: str, Optional
|
861
|
+
:param _headers: set to override the headers for a single
|
862
|
+
request; this effectively ignores the headers
|
863
|
+
in the spec for a single request.
|
864
|
+
:type _headers: dict, optional
|
865
|
+
:param _host_index: set to override the host_index for a single
|
866
|
+
request; this effectively ignores the host_index
|
867
|
+
in the spec for a single request.
|
868
|
+
:type _host_index: int, optional
|
869
|
+
:return: Returns the result object.
|
870
|
+
""" # noqa: E501
|
871
|
+
|
872
|
+
_param = self._summa_serialize(
|
873
|
+
dataset=dataset,
|
874
|
+
entity=entity,
|
875
|
+
user=user,
|
876
|
+
top_k=top_k,
|
877
|
+
language=language,
|
878
|
+
q_answer_api_key=q_answer_api_key,
|
879
|
+
_request_auth=_request_auth,
|
880
|
+
_content_type=_content_type,
|
881
|
+
_headers=_headers,
|
882
|
+
_host_index=_host_index
|
883
|
+
)
|
884
|
+
|
885
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
886
|
+
'200': "SummaServer",
|
887
|
+
}
|
888
|
+
response_data = self.api_client.call_api(
|
889
|
+
*_param,
|
890
|
+
_request_timeout=_request_timeout
|
891
|
+
)
|
892
|
+
response_data.read()
|
893
|
+
return self.api_client.response_deserialize(
|
894
|
+
response_data=response_data,
|
895
|
+
response_types_map=_response_types_map,
|
896
|
+
)
|
897
|
+
|
898
|
+
|
899
|
+
@validate_call
|
900
|
+
def summa_without_preload_content(
|
901
|
+
self,
|
902
|
+
dataset: StrictStr,
|
903
|
+
entity: StrictStr,
|
904
|
+
user: List[StrictStr],
|
905
|
+
top_k: Optional[StrictInt] = None,
|
906
|
+
language: Optional[StrictStr] = None,
|
907
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
908
|
+
_request_timeout: Union[
|
909
|
+
None,
|
910
|
+
Annotated[StrictFloat, Field(gt=0)],
|
911
|
+
Tuple[
|
912
|
+
Annotated[StrictFloat, Field(gt=0)],
|
913
|
+
Annotated[StrictFloat, Field(gt=0)]
|
914
|
+
]
|
915
|
+
] = None,
|
916
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
917
|
+
_content_type: Optional[StrictStr] = None,
|
918
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
919
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
920
|
+
) -> RESTResponseType:
|
921
|
+
"""Generates summaries, i.e. most relevant top-k properties, for an item in a dataset
|
922
|
+
|
923
|
+
|
924
|
+
:param dataset: (required)
|
925
|
+
:type dataset: str
|
926
|
+
:param entity: (required)
|
927
|
+
:type entity: str
|
928
|
+
:param user: (required)
|
929
|
+
:type user: List[str]
|
930
|
+
:param top_k:
|
931
|
+
:type top_k: int
|
932
|
+
:param language:
|
933
|
+
:type language: str
|
934
|
+
:param q_answer_api_key:
|
935
|
+
:type q_answer_api_key: str
|
936
|
+
:param _request_timeout: timeout setting for this request. If one
|
937
|
+
number provided, it will be total request
|
938
|
+
timeout. It can also be a pair (tuple) of
|
939
|
+
(connection, read) timeouts.
|
940
|
+
:type _request_timeout: int, tuple(int, int), optional
|
941
|
+
:param _request_auth: set to override the auth_settings for an a single
|
942
|
+
request; this effectively ignores the
|
943
|
+
authentication in the spec for a single request.
|
944
|
+
:type _request_auth: dict, optional
|
945
|
+
:param _content_type: force content-type for the request.
|
946
|
+
:type _content_type: str, Optional
|
947
|
+
:param _headers: set to override the headers for a single
|
948
|
+
request; this effectively ignores the headers
|
949
|
+
in the spec for a single request.
|
950
|
+
:type _headers: dict, optional
|
951
|
+
:param _host_index: set to override the host_index for a single
|
952
|
+
request; this effectively ignores the host_index
|
953
|
+
in the spec for a single request.
|
954
|
+
:type _host_index: int, optional
|
955
|
+
:return: Returns the result object.
|
956
|
+
""" # noqa: E501
|
957
|
+
|
958
|
+
_param = self._summa_serialize(
|
959
|
+
dataset=dataset,
|
960
|
+
entity=entity,
|
961
|
+
user=user,
|
962
|
+
top_k=top_k,
|
963
|
+
language=language,
|
964
|
+
q_answer_api_key=q_answer_api_key,
|
965
|
+
_request_auth=_request_auth,
|
966
|
+
_content_type=_content_type,
|
967
|
+
_headers=_headers,
|
968
|
+
_host_index=_host_index
|
969
|
+
)
|
970
|
+
|
971
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
972
|
+
'200': "SummaServer",
|
973
|
+
}
|
974
|
+
response_data = self.api_client.call_api(
|
975
|
+
*_param,
|
976
|
+
_request_timeout=_request_timeout
|
977
|
+
)
|
978
|
+
return response_data.response
|
979
|
+
|
980
|
+
|
981
|
+
def _summa_serialize(
|
982
|
+
self,
|
983
|
+
dataset,
|
984
|
+
entity,
|
985
|
+
user,
|
986
|
+
top_k,
|
987
|
+
language,
|
988
|
+
q_answer_api_key,
|
989
|
+
_request_auth,
|
990
|
+
_content_type,
|
991
|
+
_headers,
|
992
|
+
_host_index,
|
993
|
+
) -> RequestSerialized:
|
994
|
+
|
995
|
+
_host = None
|
996
|
+
|
997
|
+
_collection_formats: Dict[str, str] = {
|
998
|
+
'user': 'multi',
|
999
|
+
}
|
1000
|
+
|
1001
|
+
_path_params: Dict[str, str] = {}
|
1002
|
+
_query_params: List[Tuple[str, str]] = []
|
1003
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1004
|
+
_form_params: List[Tuple[str, str]] = []
|
1005
|
+
_files: Dict[
|
1006
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1007
|
+
] = {}
|
1008
|
+
_body_params: Optional[bytes] = None
|
1009
|
+
|
1010
|
+
# process the path parameters
|
1011
|
+
if dataset is not None:
|
1012
|
+
_path_params['dataset'] = dataset
|
1013
|
+
# process the query parameters
|
1014
|
+
if entity is not None:
|
1015
|
+
|
1016
|
+
_query_params.append(('entity', entity))
|
1017
|
+
|
1018
|
+
if top_k is not None:
|
1019
|
+
|
1020
|
+
_query_params.append(('topK', top_k))
|
1021
|
+
|
1022
|
+
if language is not None:
|
1023
|
+
|
1024
|
+
_query_params.append(('language', language))
|
1025
|
+
|
1026
|
+
if user is not None:
|
1027
|
+
|
1028
|
+
_query_params.append(('user', user))
|
1029
|
+
|
1030
|
+
# process the header parameters
|
1031
|
+
if q_answer_api_key is not None:
|
1032
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
1033
|
+
# process the form parameters
|
1034
|
+
# process the body parameter
|
1035
|
+
|
1036
|
+
|
1037
|
+
# set the HTTP header `Accept`
|
1038
|
+
if 'Accept' not in _header_params:
|
1039
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1040
|
+
[
|
1041
|
+
'*/*'
|
1042
|
+
]
|
1043
|
+
)
|
1044
|
+
|
1045
|
+
|
1046
|
+
# authentication setting
|
1047
|
+
_auth_settings: List[str] = [
|
1048
|
+
'QAnswer-Api-Key',
|
1049
|
+
'Bearer'
|
1050
|
+
]
|
1051
|
+
|
1052
|
+
return self.api_client.param_serialize(
|
1053
|
+
method='GET',
|
1054
|
+
resource_path='/api/connectors/rdf/answer/summaserver/{dataset}',
|
1055
|
+
path_params=_path_params,
|
1056
|
+
query_params=_query_params,
|
1057
|
+
header_params=_header_params,
|
1058
|
+
body=_body_params,
|
1059
|
+
post_params=_form_params,
|
1060
|
+
files=_files,
|
1061
|
+
auth_settings=_auth_settings,
|
1062
|
+
collection_formats=_collection_formats,
|
1063
|
+
_host=_host,
|
1064
|
+
_request_auth=_request_auth
|
1065
|
+
)
|
1066
|
+
|
1067
|
+
|
1068
|
+
|
1069
|
+
|
1070
|
+
@validate_call
|
1071
|
+
def table_context(
|
1072
|
+
self,
|
1073
|
+
sparql_query: StrictStr,
|
1074
|
+
lang: Optional[StrictStr] = None,
|
1075
|
+
kb: Optional[StrictStr] = None,
|
1076
|
+
limit: Optional[StrictInt] = None,
|
1077
|
+
offset: Optional[StrictInt] = None,
|
1078
|
+
username: Optional[StrictStr] = None,
|
1079
|
+
timeout: Optional[StrictInt] = None,
|
1080
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
1081
|
+
_request_timeout: Union[
|
1082
|
+
None,
|
1083
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1084
|
+
Tuple[
|
1085
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1086
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1087
|
+
]
|
1088
|
+
] = None,
|
1089
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1090
|
+
_content_type: Optional[StrictStr] = None,
|
1091
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1092
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1093
|
+
) -> QaTable:
|
1094
|
+
"""Given a SPARQL query returns the information about the answer entities in the form of a table.
|
1095
|
+
|
1096
|
+
|
1097
|
+
:param sparql_query: (required)
|
1098
|
+
:type sparql_query: str
|
1099
|
+
:param lang:
|
1100
|
+
:type lang: str
|
1101
|
+
:param kb:
|
1102
|
+
:type kb: str
|
1103
|
+
:param limit:
|
1104
|
+
:type limit: int
|
1105
|
+
:param offset:
|
1106
|
+
:type offset: int
|
1107
|
+
:param username:
|
1108
|
+
:type username: str
|
1109
|
+
:param timeout:
|
1110
|
+
:type timeout: int
|
1111
|
+
:param q_answer_api_key:
|
1112
|
+
:type q_answer_api_key: str
|
1113
|
+
:param _request_timeout: timeout setting for this request. If one
|
1114
|
+
number provided, it will be total request
|
1115
|
+
timeout. It can also be a pair (tuple) of
|
1116
|
+
(connection, read) timeouts.
|
1117
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1118
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1119
|
+
request; this effectively ignores the
|
1120
|
+
authentication in the spec for a single request.
|
1121
|
+
:type _request_auth: dict, optional
|
1122
|
+
:param _content_type: force content-type for the request.
|
1123
|
+
:type _content_type: str, Optional
|
1124
|
+
:param _headers: set to override the headers for a single
|
1125
|
+
request; this effectively ignores the headers
|
1126
|
+
in the spec for a single request.
|
1127
|
+
:type _headers: dict, optional
|
1128
|
+
:param _host_index: set to override the host_index for a single
|
1129
|
+
request; this effectively ignores the host_index
|
1130
|
+
in the spec for a single request.
|
1131
|
+
:type _host_index: int, optional
|
1132
|
+
:return: Returns the result object.
|
1133
|
+
""" # noqa: E501
|
1134
|
+
|
1135
|
+
_param = self._table_context_serialize(
|
1136
|
+
sparql_query=sparql_query,
|
1137
|
+
lang=lang,
|
1138
|
+
kb=kb,
|
1139
|
+
limit=limit,
|
1140
|
+
offset=offset,
|
1141
|
+
username=username,
|
1142
|
+
timeout=timeout,
|
1143
|
+
q_answer_api_key=q_answer_api_key,
|
1144
|
+
_request_auth=_request_auth,
|
1145
|
+
_content_type=_content_type,
|
1146
|
+
_headers=_headers,
|
1147
|
+
_host_index=_host_index
|
1148
|
+
)
|
1149
|
+
|
1150
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1151
|
+
'200': "QaTable",
|
1152
|
+
}
|
1153
|
+
response_data = self.api_client.call_api(
|
1154
|
+
*_param,
|
1155
|
+
_request_timeout=_request_timeout
|
1156
|
+
)
|
1157
|
+
response_data.read()
|
1158
|
+
return self.api_client.response_deserialize(
|
1159
|
+
response_data=response_data,
|
1160
|
+
response_types_map=_response_types_map,
|
1161
|
+
).data
|
1162
|
+
|
1163
|
+
|
1164
|
+
@validate_call
|
1165
|
+
def table_context_with_http_info(
|
1166
|
+
self,
|
1167
|
+
sparql_query: StrictStr,
|
1168
|
+
lang: Optional[StrictStr] = None,
|
1169
|
+
kb: Optional[StrictStr] = None,
|
1170
|
+
limit: Optional[StrictInt] = None,
|
1171
|
+
offset: Optional[StrictInt] = None,
|
1172
|
+
username: Optional[StrictStr] = None,
|
1173
|
+
timeout: Optional[StrictInt] = None,
|
1174
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
1175
|
+
_request_timeout: Union[
|
1176
|
+
None,
|
1177
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1178
|
+
Tuple[
|
1179
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1180
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1181
|
+
]
|
1182
|
+
] = None,
|
1183
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1184
|
+
_content_type: Optional[StrictStr] = None,
|
1185
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1186
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1187
|
+
) -> ApiResponse[QaTable]:
|
1188
|
+
"""Given a SPARQL query returns the information about the answer entities in the form of a table.
|
1189
|
+
|
1190
|
+
|
1191
|
+
:param sparql_query: (required)
|
1192
|
+
:type sparql_query: str
|
1193
|
+
:param lang:
|
1194
|
+
:type lang: str
|
1195
|
+
:param kb:
|
1196
|
+
:type kb: str
|
1197
|
+
:param limit:
|
1198
|
+
:type limit: int
|
1199
|
+
:param offset:
|
1200
|
+
:type offset: int
|
1201
|
+
:param username:
|
1202
|
+
:type username: str
|
1203
|
+
:param timeout:
|
1204
|
+
:type timeout: int
|
1205
|
+
:param q_answer_api_key:
|
1206
|
+
:type q_answer_api_key: str
|
1207
|
+
:param _request_timeout: timeout setting for this request. If one
|
1208
|
+
number provided, it will be total request
|
1209
|
+
timeout. It can also be a pair (tuple) of
|
1210
|
+
(connection, read) timeouts.
|
1211
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1212
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1213
|
+
request; this effectively ignores the
|
1214
|
+
authentication in the spec for a single request.
|
1215
|
+
:type _request_auth: dict, optional
|
1216
|
+
:param _content_type: force content-type for the request.
|
1217
|
+
:type _content_type: str, Optional
|
1218
|
+
:param _headers: set to override the headers for a single
|
1219
|
+
request; this effectively ignores the headers
|
1220
|
+
in the spec for a single request.
|
1221
|
+
:type _headers: dict, optional
|
1222
|
+
:param _host_index: set to override the host_index for a single
|
1223
|
+
request; this effectively ignores the host_index
|
1224
|
+
in the spec for a single request.
|
1225
|
+
:type _host_index: int, optional
|
1226
|
+
:return: Returns the result object.
|
1227
|
+
""" # noqa: E501
|
1228
|
+
|
1229
|
+
_param = self._table_context_serialize(
|
1230
|
+
sparql_query=sparql_query,
|
1231
|
+
lang=lang,
|
1232
|
+
kb=kb,
|
1233
|
+
limit=limit,
|
1234
|
+
offset=offset,
|
1235
|
+
username=username,
|
1236
|
+
timeout=timeout,
|
1237
|
+
q_answer_api_key=q_answer_api_key,
|
1238
|
+
_request_auth=_request_auth,
|
1239
|
+
_content_type=_content_type,
|
1240
|
+
_headers=_headers,
|
1241
|
+
_host_index=_host_index
|
1242
|
+
)
|
1243
|
+
|
1244
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1245
|
+
'200': "QaTable",
|
1246
|
+
}
|
1247
|
+
response_data = self.api_client.call_api(
|
1248
|
+
*_param,
|
1249
|
+
_request_timeout=_request_timeout
|
1250
|
+
)
|
1251
|
+
response_data.read()
|
1252
|
+
return self.api_client.response_deserialize(
|
1253
|
+
response_data=response_data,
|
1254
|
+
response_types_map=_response_types_map,
|
1255
|
+
)
|
1256
|
+
|
1257
|
+
|
1258
|
+
@validate_call
|
1259
|
+
def table_context_without_preload_content(
|
1260
|
+
self,
|
1261
|
+
sparql_query: StrictStr,
|
1262
|
+
lang: Optional[StrictStr] = None,
|
1263
|
+
kb: Optional[StrictStr] = None,
|
1264
|
+
limit: Optional[StrictInt] = None,
|
1265
|
+
offset: Optional[StrictInt] = None,
|
1266
|
+
username: Optional[StrictStr] = None,
|
1267
|
+
timeout: Optional[StrictInt] = None,
|
1268
|
+
q_answer_api_key: Optional[StrictStr] = None,
|
1269
|
+
_request_timeout: Union[
|
1270
|
+
None,
|
1271
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1272
|
+
Tuple[
|
1273
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1274
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1275
|
+
]
|
1276
|
+
] = None,
|
1277
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1278
|
+
_content_type: Optional[StrictStr] = None,
|
1279
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1280
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1281
|
+
) -> RESTResponseType:
|
1282
|
+
"""Given a SPARQL query returns the information about the answer entities in the form of a table.
|
1283
|
+
|
1284
|
+
|
1285
|
+
:param sparql_query: (required)
|
1286
|
+
:type sparql_query: str
|
1287
|
+
:param lang:
|
1288
|
+
:type lang: str
|
1289
|
+
:param kb:
|
1290
|
+
:type kb: str
|
1291
|
+
:param limit:
|
1292
|
+
:type limit: int
|
1293
|
+
:param offset:
|
1294
|
+
:type offset: int
|
1295
|
+
:param username:
|
1296
|
+
:type username: str
|
1297
|
+
:param timeout:
|
1298
|
+
:type timeout: int
|
1299
|
+
:param q_answer_api_key:
|
1300
|
+
:type q_answer_api_key: str
|
1301
|
+
:param _request_timeout: timeout setting for this request. If one
|
1302
|
+
number provided, it will be total request
|
1303
|
+
timeout. It can also be a pair (tuple) of
|
1304
|
+
(connection, read) timeouts.
|
1305
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1306
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1307
|
+
request; this effectively ignores the
|
1308
|
+
authentication in the spec for a single request.
|
1309
|
+
:type _request_auth: dict, optional
|
1310
|
+
:param _content_type: force content-type for the request.
|
1311
|
+
:type _content_type: str, Optional
|
1312
|
+
:param _headers: set to override the headers for a single
|
1313
|
+
request; this effectively ignores the headers
|
1314
|
+
in the spec for a single request.
|
1315
|
+
:type _headers: dict, optional
|
1316
|
+
:param _host_index: set to override the host_index for a single
|
1317
|
+
request; this effectively ignores the host_index
|
1318
|
+
in the spec for a single request.
|
1319
|
+
:type _host_index: int, optional
|
1320
|
+
:return: Returns the result object.
|
1321
|
+
""" # noqa: E501
|
1322
|
+
|
1323
|
+
_param = self._table_context_serialize(
|
1324
|
+
sparql_query=sparql_query,
|
1325
|
+
lang=lang,
|
1326
|
+
kb=kb,
|
1327
|
+
limit=limit,
|
1328
|
+
offset=offset,
|
1329
|
+
username=username,
|
1330
|
+
timeout=timeout,
|
1331
|
+
q_answer_api_key=q_answer_api_key,
|
1332
|
+
_request_auth=_request_auth,
|
1333
|
+
_content_type=_content_type,
|
1334
|
+
_headers=_headers,
|
1335
|
+
_host_index=_host_index
|
1336
|
+
)
|
1337
|
+
|
1338
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1339
|
+
'200': "QaTable",
|
1340
|
+
}
|
1341
|
+
response_data = self.api_client.call_api(
|
1342
|
+
*_param,
|
1343
|
+
_request_timeout=_request_timeout
|
1344
|
+
)
|
1345
|
+
return response_data.response
|
1346
|
+
|
1347
|
+
|
1348
|
+
def _table_context_serialize(
|
1349
|
+
self,
|
1350
|
+
sparql_query,
|
1351
|
+
lang,
|
1352
|
+
kb,
|
1353
|
+
limit,
|
1354
|
+
offset,
|
1355
|
+
username,
|
1356
|
+
timeout,
|
1357
|
+
q_answer_api_key,
|
1358
|
+
_request_auth,
|
1359
|
+
_content_type,
|
1360
|
+
_headers,
|
1361
|
+
_host_index,
|
1362
|
+
) -> RequestSerialized:
|
1363
|
+
|
1364
|
+
_host = None
|
1365
|
+
|
1366
|
+
_collection_formats: Dict[str, str] = {
|
1367
|
+
}
|
1368
|
+
|
1369
|
+
_path_params: Dict[str, str] = {}
|
1370
|
+
_query_params: List[Tuple[str, str]] = []
|
1371
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1372
|
+
_form_params: List[Tuple[str, str]] = []
|
1373
|
+
_files: Dict[
|
1374
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1375
|
+
] = {}
|
1376
|
+
_body_params: Optional[bytes] = None
|
1377
|
+
|
1378
|
+
# process the path parameters
|
1379
|
+
# process the query parameters
|
1380
|
+
if lang is not None:
|
1381
|
+
|
1382
|
+
_query_params.append(('lang', lang))
|
1383
|
+
|
1384
|
+
if kb is not None:
|
1385
|
+
|
1386
|
+
_query_params.append(('kb', kb))
|
1387
|
+
|
1388
|
+
if sparql_query is not None:
|
1389
|
+
|
1390
|
+
_query_params.append(('sparqlQuery', sparql_query))
|
1391
|
+
|
1392
|
+
if limit is not None:
|
1393
|
+
|
1394
|
+
_query_params.append(('limit', limit))
|
1395
|
+
|
1396
|
+
if offset is not None:
|
1397
|
+
|
1398
|
+
_query_params.append(('offset', offset))
|
1399
|
+
|
1400
|
+
if username is not None:
|
1401
|
+
|
1402
|
+
_query_params.append(('username', username))
|
1403
|
+
|
1404
|
+
if timeout is not None:
|
1405
|
+
|
1406
|
+
_query_params.append(('timeout', timeout))
|
1407
|
+
|
1408
|
+
# process the header parameters
|
1409
|
+
if q_answer_api_key is not None:
|
1410
|
+
_header_params['QAnswer-Api-Key'] = q_answer_api_key
|
1411
|
+
# process the form parameters
|
1412
|
+
# process the body parameter
|
1413
|
+
|
1414
|
+
|
1415
|
+
# set the HTTP header `Accept`
|
1416
|
+
if 'Accept' not in _header_params:
|
1417
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1418
|
+
[
|
1419
|
+
'application/json'
|
1420
|
+
]
|
1421
|
+
)
|
1422
|
+
|
1423
|
+
|
1424
|
+
# authentication setting
|
1425
|
+
_auth_settings: List[str] = [
|
1426
|
+
'QAnswer-Api-Key',
|
1427
|
+
'Bearer'
|
1428
|
+
]
|
1429
|
+
|
1430
|
+
return self.api_client.param_serialize(
|
1431
|
+
method='GET',
|
1432
|
+
resource_path='/api/connectors/rdf/answer/table',
|
1433
|
+
path_params=_path_params,
|
1434
|
+
query_params=_query_params,
|
1435
|
+
header_params=_header_params,
|
1436
|
+
body=_body_params,
|
1437
|
+
post_params=_form_params,
|
1438
|
+
files=_files,
|
1439
|
+
auth_settings=_auth_settings,
|
1440
|
+
collection_formats=_collection_formats,
|
1441
|
+
_host=_host,
|
1442
|
+
_request_auth=_request_auth
|
1443
|
+
)
|
1444
|
+
|
1445
|
+
|