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,95 @@
|
|
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
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class TeamWithCount(BaseModel):
|
26
|
+
"""
|
27
|
+
Represents a team within an organization with the head count.
|
28
|
+
""" # noqa: E501
|
29
|
+
name: Optional[StrictStr] = Field(default=None, description="Team Name")
|
30
|
+
description: Optional[StrictStr] = Field(default=None, description="Brief explanation of the team's purpose.")
|
31
|
+
id: Optional[StrictInt] = Field(default=None, description="Unique identifier")
|
32
|
+
organization_id: Optional[StrictInt] = Field(default=None, description="Unique identifier of the organization", alias="organizationId")
|
33
|
+
number_of_members: Optional[StrictInt] = Field(default=None, description="Number of members in the team", alias="numberOfMembers")
|
34
|
+
__properties: ClassVar[List[str]] = ["name", "description", "id", "organizationId", "numberOfMembers"]
|
35
|
+
|
36
|
+
model_config = ConfigDict(
|
37
|
+
populate_by_name=True,
|
38
|
+
validate_assignment=True,
|
39
|
+
protected_namespaces=(),
|
40
|
+
)
|
41
|
+
|
42
|
+
|
43
|
+
def to_str(self) -> str:
|
44
|
+
"""Returns the string representation of the model using alias"""
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
46
|
+
|
47
|
+
def to_json(self) -> str:
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
50
|
+
return json.dumps(self.to_dict())
|
51
|
+
|
52
|
+
@classmethod
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
54
|
+
"""Create an instance of TeamWithCount from a JSON string"""
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
56
|
+
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
59
|
+
|
60
|
+
This has the following differences from calling pydantic's
|
61
|
+
`self.model_dump(by_alias=True)`:
|
62
|
+
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
64
|
+
were set at model initialization. Other fields with value `None`
|
65
|
+
are ignored.
|
66
|
+
"""
|
67
|
+
excluded_fields: Set[str] = set([
|
68
|
+
])
|
69
|
+
|
70
|
+
_dict = self.model_dump(
|
71
|
+
by_alias=True,
|
72
|
+
exclude=excluded_fields,
|
73
|
+
exclude_none=True,
|
74
|
+
)
|
75
|
+
return _dict
|
76
|
+
|
77
|
+
@classmethod
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
79
|
+
"""Create an instance of TeamWithCount from a dict"""
|
80
|
+
if obj is None:
|
81
|
+
return None
|
82
|
+
|
83
|
+
if not isinstance(obj, dict):
|
84
|
+
return cls.model_validate(obj)
|
85
|
+
|
86
|
+
_obj = cls.model_validate({
|
87
|
+
"name": obj.get("name"),
|
88
|
+
"description": obj.get("description"),
|
89
|
+
"id": obj.get("id"),
|
90
|
+
"organizationId": obj.get("organizationId"),
|
91
|
+
"numberOfMembers": obj.get("numberOfMembers")
|
92
|
+
})
|
93
|
+
return _obj
|
94
|
+
|
95
|
+
|
@@ -0,0 +1,89 @@
|
|
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
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictInt
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class TermsBucket(BaseModel):
|
26
|
+
"""
|
27
|
+
TermsBucket
|
28
|
+
""" # noqa: E501
|
29
|
+
doc_count: StrictInt
|
30
|
+
key: Dict[str, Any]
|
31
|
+
__properties: ClassVar[List[str]] = ["doc_count", "key"]
|
32
|
+
|
33
|
+
model_config = ConfigDict(
|
34
|
+
populate_by_name=True,
|
35
|
+
validate_assignment=True,
|
36
|
+
protected_namespaces=(),
|
37
|
+
)
|
38
|
+
|
39
|
+
|
40
|
+
def to_str(self) -> str:
|
41
|
+
"""Returns the string representation of the model using alias"""
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
43
|
+
|
44
|
+
def to_json(self) -> str:
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
47
|
+
return json.dumps(self.to_dict())
|
48
|
+
|
49
|
+
@classmethod
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
51
|
+
"""Create an instance of TermsBucket from a JSON string"""
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
53
|
+
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
56
|
+
|
57
|
+
This has the following differences from calling pydantic's
|
58
|
+
`self.model_dump(by_alias=True)`:
|
59
|
+
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
61
|
+
were set at model initialization. Other fields with value `None`
|
62
|
+
are ignored.
|
63
|
+
"""
|
64
|
+
excluded_fields: Set[str] = set([
|
65
|
+
])
|
66
|
+
|
67
|
+
_dict = self.model_dump(
|
68
|
+
by_alias=True,
|
69
|
+
exclude=excluded_fields,
|
70
|
+
exclude_none=True,
|
71
|
+
)
|
72
|
+
return _dict
|
73
|
+
|
74
|
+
@classmethod
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
76
|
+
"""Create an instance of TermsBucket from a dict"""
|
77
|
+
if obj is None:
|
78
|
+
return None
|
79
|
+
|
80
|
+
if not isinstance(obj, dict):
|
81
|
+
return cls.model_validate(obj)
|
82
|
+
|
83
|
+
_obj = cls.model_validate({
|
84
|
+
"doc_count": obj.get("doc_count"),
|
85
|
+
"key": obj.get("key")
|
86
|
+
})
|
87
|
+
return _obj
|
88
|
+
|
89
|
+
|
@@ -0,0 +1,156 @@
|
|
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
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
22
|
+
from qanswer_sdk.models.search_metadata_filter import SearchMetadataFilter
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class Text2SparqlPayload(BaseModel):
|
27
|
+
"""
|
28
|
+
Text2SparqlPayload
|
29
|
+
""" # noqa: E501
|
30
|
+
question: StrictStr = Field(description="The input question from the user.")
|
31
|
+
username: StrictStr = Field(description="The username of the user.")
|
32
|
+
dataset: StrictStr = Field(description="The dataset to be queried for information.")
|
33
|
+
image_urls: Optional[List[StrictStr]] = Field(default=None, description="List of image URLs to be processed if provided.")
|
34
|
+
parent_message_id: Optional[StrictStr] = Field(default=None, description="ID of the parent generation (message_id of parent response or question) if applicable; used for tracking multi-turn conversations.")
|
35
|
+
conversation_id: Optional[StrictStr] = Field(default=None, description="Unique identifier for the conversation.")
|
36
|
+
is_regenerate: Optional[StrictBool] = Field(default=None, description="Indicates if the user is asking for a regenerated response.")
|
37
|
+
auto_filters: Optional[StrictBool] = Field(default=None, description="Determines whether the auto filters should be used for the response.")
|
38
|
+
origin: Optional[StrictStr] = Field(default=None, description="The username or IP address of the user making the request.")
|
39
|
+
text_fragmentation: Optional[StrictBool] = Field(default=None, description="Detemines wether links for website sources should have text fragments.")
|
40
|
+
interface_origin: Optional[StrictStr] = Field(default=None, description="The interface from which the request originated (search, chat, microsoft_teams, etc.).")
|
41
|
+
system_prompt: Optional[StrictStr] = Field(default=None, description="The system prompt to be used for the response.")
|
42
|
+
prompt: Optional[StrictStr] = Field(default=None, description="The raw prompt submitted to the model.")
|
43
|
+
additional_fields: Optional[Dict[str, Any]] = Field(default=None, description="Additional metadata fields for customization, generally metadata that can be consumed in the prompt.")
|
44
|
+
bypass_guardrail: Optional[StrictBool] = Field(default=None, description="Determines whether safety guardrails should be bypassed.")
|
45
|
+
talk_to_web: Optional[StrictBool] = Field(default=None, description="Determines whether the response should be sent to the web interface.")
|
46
|
+
original_question: Optional[StrictStr] = Field(default=None, description="The original question submitted to the model.")
|
47
|
+
oauth_token: Optional[StrictStr] = Field(default=None, description="The oauth token")
|
48
|
+
filters: Optional[List[List[SearchMetadataFilter]]] = None
|
49
|
+
index_hashes: Optional[List[Dict[str, Any]]] = Field(default=None, description="The hashes of the indexes to be used for the response.")
|
50
|
+
agentic_chatbot_enabled: Optional[StrictBool] = Field(default=None, description="Whether the agentic chatbot is enabled.")
|
51
|
+
conversation_has_clip: Optional[StrictBool] = Field(default=None, description="Indicates whether the conversation has a clip associated with it.")
|
52
|
+
current_time: Optional[StrictStr] = Field(default=None, description="The current time to be used in the prompt, if applicable.")
|
53
|
+
validate_sparql: Optional[StrictBool] = None
|
54
|
+
__properties: ClassVar[List[str]] = ["question", "username", "dataset", "image_urls", "parent_message_id", "conversation_id", "is_regenerate", "auto_filters", "origin", "text_fragmentation", "interface_origin", "system_prompt", "prompt", "additional_fields", "bypass_guardrail", "talk_to_web", "original_question", "oauth_token", "filters", "index_hashes", "agentic_chatbot_enabled", "conversation_has_clip", "current_time", "validate_sparql"]
|
55
|
+
|
56
|
+
@field_validator('interface_origin')
|
57
|
+
def interface_origin_validate_enum(cls, value):
|
58
|
+
"""Validates the enum"""
|
59
|
+
if value is None:
|
60
|
+
return value
|
61
|
+
|
62
|
+
if value not in set(['search', 'chat', 'widget', 'microsoft_teams', 'discord', 'slack', 'chatbot_playground', 'undefined']):
|
63
|
+
raise ValueError("must be one of enum values ('search', 'chat', 'widget', 'microsoft_teams', 'discord', 'slack', 'chatbot_playground', 'undefined')")
|
64
|
+
return value
|
65
|
+
|
66
|
+
model_config = ConfigDict(
|
67
|
+
populate_by_name=True,
|
68
|
+
validate_assignment=True,
|
69
|
+
protected_namespaces=(),
|
70
|
+
)
|
71
|
+
|
72
|
+
|
73
|
+
def to_str(self) -> str:
|
74
|
+
"""Returns the string representation of the model using alias"""
|
75
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
76
|
+
|
77
|
+
def to_json(self) -> str:
|
78
|
+
"""Returns the JSON representation of the model using alias"""
|
79
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
80
|
+
return json.dumps(self.to_dict())
|
81
|
+
|
82
|
+
@classmethod
|
83
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
84
|
+
"""Create an instance of Text2SparqlPayload from a JSON string"""
|
85
|
+
return cls.from_dict(json.loads(json_str))
|
86
|
+
|
87
|
+
def to_dict(self) -> Dict[str, Any]:
|
88
|
+
"""Return the dictionary representation of the model using alias.
|
89
|
+
|
90
|
+
This has the following differences from calling pydantic's
|
91
|
+
`self.model_dump(by_alias=True)`:
|
92
|
+
|
93
|
+
* `None` is only added to the output dict for nullable fields that
|
94
|
+
were set at model initialization. Other fields with value `None`
|
95
|
+
are ignored.
|
96
|
+
"""
|
97
|
+
excluded_fields: Set[str] = set([
|
98
|
+
])
|
99
|
+
|
100
|
+
_dict = self.model_dump(
|
101
|
+
by_alias=True,
|
102
|
+
exclude=excluded_fields,
|
103
|
+
exclude_none=True,
|
104
|
+
)
|
105
|
+
# override the default output from pydantic by calling `to_dict()` of each item in filters (list of list)
|
106
|
+
_items = []
|
107
|
+
if self.filters:
|
108
|
+
for _item_filters in self.filters:
|
109
|
+
if _item_filters:
|
110
|
+
_items.append(
|
111
|
+
[_inner_item.to_dict() for _inner_item in _item_filters if _inner_item is not None]
|
112
|
+
)
|
113
|
+
_dict['filters'] = _items
|
114
|
+
return _dict
|
115
|
+
|
116
|
+
@classmethod
|
117
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
118
|
+
"""Create an instance of Text2SparqlPayload from a dict"""
|
119
|
+
if obj is None:
|
120
|
+
return None
|
121
|
+
|
122
|
+
if not isinstance(obj, dict):
|
123
|
+
return cls.model_validate(obj)
|
124
|
+
|
125
|
+
_obj = cls.model_validate({
|
126
|
+
"question": obj.get("question"),
|
127
|
+
"username": obj.get("username"),
|
128
|
+
"dataset": obj.get("dataset"),
|
129
|
+
"image_urls": obj.get("image_urls"),
|
130
|
+
"parent_message_id": obj.get("parent_message_id"),
|
131
|
+
"conversation_id": obj.get("conversation_id"),
|
132
|
+
"is_regenerate": obj.get("is_regenerate"),
|
133
|
+
"auto_filters": obj.get("auto_filters"),
|
134
|
+
"origin": obj.get("origin"),
|
135
|
+
"text_fragmentation": obj.get("text_fragmentation"),
|
136
|
+
"interface_origin": obj.get("interface_origin"),
|
137
|
+
"system_prompt": obj.get("system_prompt"),
|
138
|
+
"prompt": obj.get("prompt"),
|
139
|
+
"additional_fields": obj.get("additional_fields"),
|
140
|
+
"bypass_guardrail": obj.get("bypass_guardrail"),
|
141
|
+
"talk_to_web": obj.get("talk_to_web"),
|
142
|
+
"original_question": obj.get("original_question"),
|
143
|
+
"oauth_token": obj.get("oauth_token"),
|
144
|
+
"filters": [
|
145
|
+
[SearchMetadataFilter.from_dict(_inner_item) for _inner_item in _item]
|
146
|
+
for _item in obj["filters"]
|
147
|
+
] if obj.get("filters") is not None else None,
|
148
|
+
"index_hashes": obj.get("index_hashes"),
|
149
|
+
"agentic_chatbot_enabled": obj.get("agentic_chatbot_enabled"),
|
150
|
+
"conversation_has_clip": obj.get("conversation_has_clip"),
|
151
|
+
"current_time": obj.get("current_time"),
|
152
|
+
"validate_sparql": obj.get("validate_sparql")
|
153
|
+
})
|
154
|
+
return _obj
|
155
|
+
|
156
|
+
|
@@ -0,0 +1,123 @@
|
|
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
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr, field_validator
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
|
+
from qanswer_sdk.models.llm_details import LLMDetails
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class Text2SparqlTaskSettings(BaseModel):
|
27
|
+
"""
|
28
|
+
Text2SparqlTaskSettings
|
29
|
+
""" # noqa: E501
|
30
|
+
prompt: Optional[StrictStr] = None
|
31
|
+
llm_choice: Optional[StrictStr] = None
|
32
|
+
bot_seed: Optional[StrictInt] = None
|
33
|
+
bot_temperature: Optional[Union[StrictFloat, StrictInt]] = None
|
34
|
+
bot_answer_length: Optional[StrictStr] = None
|
35
|
+
number_of_references: Optional[StrictInt] = None
|
36
|
+
stream_speed: Optional[Union[StrictFloat, StrictInt]] = None
|
37
|
+
context_window: Optional[StrictInt] = None
|
38
|
+
max_tokens: Optional[StrictInt] = None
|
39
|
+
bot_name: Optional[StrictStr] = None
|
40
|
+
bot_description: Optional[StrictStr] = None
|
41
|
+
llm_details: LLMDetails
|
42
|
+
__properties: ClassVar[List[str]] = ["prompt", "llm_choice", "bot_seed", "bot_temperature", "bot_answer_length", "number_of_references", "stream_speed", "context_window", "max_tokens", "bot_name", "bot_description", "llm_details"]
|
43
|
+
|
44
|
+
@field_validator('bot_answer_length')
|
45
|
+
def bot_answer_length_validate_enum(cls, value):
|
46
|
+
"""Validates the enum"""
|
47
|
+
if value is None:
|
48
|
+
return value
|
49
|
+
|
50
|
+
if value not in set(['short', 'brief', 'long']):
|
51
|
+
raise ValueError("must be one of enum values ('short', 'brief', 'long')")
|
52
|
+
return value
|
53
|
+
|
54
|
+
model_config = ConfigDict(
|
55
|
+
populate_by_name=True,
|
56
|
+
validate_assignment=True,
|
57
|
+
protected_namespaces=(),
|
58
|
+
)
|
59
|
+
|
60
|
+
|
61
|
+
def to_str(self) -> str:
|
62
|
+
"""Returns the string representation of the model using alias"""
|
63
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
64
|
+
|
65
|
+
def to_json(self) -> str:
|
66
|
+
"""Returns the JSON representation of the model using alias"""
|
67
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
68
|
+
return json.dumps(self.to_dict())
|
69
|
+
|
70
|
+
@classmethod
|
71
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
72
|
+
"""Create an instance of Text2SparqlTaskSettings from a JSON string"""
|
73
|
+
return cls.from_dict(json.loads(json_str))
|
74
|
+
|
75
|
+
def to_dict(self) -> Dict[str, Any]:
|
76
|
+
"""Return the dictionary representation of the model using alias.
|
77
|
+
|
78
|
+
This has the following differences from calling pydantic's
|
79
|
+
`self.model_dump(by_alias=True)`:
|
80
|
+
|
81
|
+
* `None` is only added to the output dict for nullable fields that
|
82
|
+
were set at model initialization. Other fields with value `None`
|
83
|
+
are ignored.
|
84
|
+
"""
|
85
|
+
excluded_fields: Set[str] = set([
|
86
|
+
])
|
87
|
+
|
88
|
+
_dict = self.model_dump(
|
89
|
+
by_alias=True,
|
90
|
+
exclude=excluded_fields,
|
91
|
+
exclude_none=True,
|
92
|
+
)
|
93
|
+
# override the default output from pydantic by calling `to_dict()` of llm_details
|
94
|
+
if self.llm_details:
|
95
|
+
_dict['llm_details'] = self.llm_details.to_dict()
|
96
|
+
return _dict
|
97
|
+
|
98
|
+
@classmethod
|
99
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
100
|
+
"""Create an instance of Text2SparqlTaskSettings from a dict"""
|
101
|
+
if obj is None:
|
102
|
+
return None
|
103
|
+
|
104
|
+
if not isinstance(obj, dict):
|
105
|
+
return cls.model_validate(obj)
|
106
|
+
|
107
|
+
_obj = cls.model_validate({
|
108
|
+
"prompt": obj.get("prompt"),
|
109
|
+
"llm_choice": obj.get("llm_choice"),
|
110
|
+
"bot_seed": obj.get("bot_seed"),
|
111
|
+
"bot_temperature": obj.get("bot_temperature"),
|
112
|
+
"bot_answer_length": obj.get("bot_answer_length"),
|
113
|
+
"number_of_references": obj.get("number_of_references"),
|
114
|
+
"stream_speed": obj.get("stream_speed"),
|
115
|
+
"context_window": obj.get("context_window"),
|
116
|
+
"max_tokens": obj.get("max_tokens"),
|
117
|
+
"bot_name": obj.get("bot_name"),
|
118
|
+
"bot_description": obj.get("bot_description"),
|
119
|
+
"llm_details": LLMDetails.from_dict(obj["llm_details"]) if obj.get("llm_details") is not None else None
|
120
|
+
})
|
121
|
+
return _obj
|
122
|
+
|
123
|
+
|
@@ -0,0 +1,95 @@
|
|
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
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
22
|
+
from qanswer_sdk.models.text2_sparql_task_update import Text2SparqlTaskUpdate
|
23
|
+
from typing import Optional, Set
|
24
|
+
from typing_extensions import Self
|
25
|
+
|
26
|
+
class Text2SparqlTaskSettingsUpdatePayload(BaseModel):
|
27
|
+
"""
|
28
|
+
Text2SparqlTaskSettingsUpdatePayload
|
29
|
+
""" # noqa: E501
|
30
|
+
username: StrictStr
|
31
|
+
dataset: StrictStr
|
32
|
+
configs: Text2SparqlTaskUpdate
|
33
|
+
__properties: ClassVar[List[str]] = ["username", "dataset", "configs"]
|
34
|
+
|
35
|
+
model_config = ConfigDict(
|
36
|
+
populate_by_name=True,
|
37
|
+
validate_assignment=True,
|
38
|
+
protected_namespaces=(),
|
39
|
+
)
|
40
|
+
|
41
|
+
|
42
|
+
def to_str(self) -> str:
|
43
|
+
"""Returns the string representation of the model using alias"""
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
45
|
+
|
46
|
+
def to_json(self) -> str:
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
49
|
+
return json.dumps(self.to_dict())
|
50
|
+
|
51
|
+
@classmethod
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
53
|
+
"""Create an instance of Text2SparqlTaskSettingsUpdatePayload from a JSON string"""
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
55
|
+
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
58
|
+
|
59
|
+
This has the following differences from calling pydantic's
|
60
|
+
`self.model_dump(by_alias=True)`:
|
61
|
+
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
63
|
+
were set at model initialization. Other fields with value `None`
|
64
|
+
are ignored.
|
65
|
+
"""
|
66
|
+
excluded_fields: Set[str] = set([
|
67
|
+
])
|
68
|
+
|
69
|
+
_dict = self.model_dump(
|
70
|
+
by_alias=True,
|
71
|
+
exclude=excluded_fields,
|
72
|
+
exclude_none=True,
|
73
|
+
)
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of configs
|
75
|
+
if self.configs:
|
76
|
+
_dict['configs'] = self.configs.to_dict()
|
77
|
+
return _dict
|
78
|
+
|
79
|
+
@classmethod
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
81
|
+
"""Create an instance of Text2SparqlTaskSettingsUpdatePayload from a dict"""
|
82
|
+
if obj is None:
|
83
|
+
return None
|
84
|
+
|
85
|
+
if not isinstance(obj, dict):
|
86
|
+
return cls.model_validate(obj)
|
87
|
+
|
88
|
+
_obj = cls.model_validate({
|
89
|
+
"username": obj.get("username"),
|
90
|
+
"dataset": obj.get("dataset"),
|
91
|
+
"configs": Text2SparqlTaskUpdate.from_dict(obj["configs"]) if obj.get("configs") is not None else None
|
92
|
+
})
|
93
|
+
return _obj
|
94
|
+
|
95
|
+
|
@@ -0,0 +1,117 @@
|
|
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
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr, field_validator
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
22
|
+
from typing import Optional, Set
|
23
|
+
from typing_extensions import Self
|
24
|
+
|
25
|
+
class Text2SparqlTaskUpdate(BaseModel):
|
26
|
+
"""
|
27
|
+
Text2SparqlTaskUpdate
|
28
|
+
""" # noqa: E501
|
29
|
+
prompt: Optional[StrictStr] = None
|
30
|
+
llm_choice: Optional[StrictStr] = None
|
31
|
+
bot_seed: Optional[StrictInt] = None
|
32
|
+
bot_temperature: Optional[Union[StrictFloat, StrictInt]] = None
|
33
|
+
bot_answer_length: Optional[StrictStr] = None
|
34
|
+
number_of_references: Optional[StrictInt] = None
|
35
|
+
stream_speed: Optional[Union[StrictFloat, StrictInt]] = None
|
36
|
+
context_window: Optional[StrictInt] = None
|
37
|
+
max_tokens: Optional[StrictInt] = None
|
38
|
+
bot_name: Optional[StrictStr] = None
|
39
|
+
bot_description: Optional[StrictStr] = None
|
40
|
+
__properties: ClassVar[List[str]] = ["prompt", "llm_choice", "bot_seed", "bot_temperature", "bot_answer_length", "number_of_references", "stream_speed", "context_window", "max_tokens", "bot_name", "bot_description"]
|
41
|
+
|
42
|
+
@field_validator('bot_answer_length')
|
43
|
+
def bot_answer_length_validate_enum(cls, value):
|
44
|
+
"""Validates the enum"""
|
45
|
+
if value is None:
|
46
|
+
return value
|
47
|
+
|
48
|
+
if value not in set(['short', 'brief', 'long']):
|
49
|
+
raise ValueError("must be one of enum values ('short', 'brief', 'long')")
|
50
|
+
return value
|
51
|
+
|
52
|
+
model_config = ConfigDict(
|
53
|
+
populate_by_name=True,
|
54
|
+
validate_assignment=True,
|
55
|
+
protected_namespaces=(),
|
56
|
+
)
|
57
|
+
|
58
|
+
|
59
|
+
def to_str(self) -> str:
|
60
|
+
"""Returns the string representation of the model using alias"""
|
61
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
62
|
+
|
63
|
+
def to_json(self) -> str:
|
64
|
+
"""Returns the JSON representation of the model using alias"""
|
65
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
66
|
+
return json.dumps(self.to_dict())
|
67
|
+
|
68
|
+
@classmethod
|
69
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
70
|
+
"""Create an instance of Text2SparqlTaskUpdate from a JSON string"""
|
71
|
+
return cls.from_dict(json.loads(json_str))
|
72
|
+
|
73
|
+
def to_dict(self) -> Dict[str, Any]:
|
74
|
+
"""Return the dictionary representation of the model using alias.
|
75
|
+
|
76
|
+
This has the following differences from calling pydantic's
|
77
|
+
`self.model_dump(by_alias=True)`:
|
78
|
+
|
79
|
+
* `None` is only added to the output dict for nullable fields that
|
80
|
+
were set at model initialization. Other fields with value `None`
|
81
|
+
are ignored.
|
82
|
+
"""
|
83
|
+
excluded_fields: Set[str] = set([
|
84
|
+
])
|
85
|
+
|
86
|
+
_dict = self.model_dump(
|
87
|
+
by_alias=True,
|
88
|
+
exclude=excluded_fields,
|
89
|
+
exclude_none=True,
|
90
|
+
)
|
91
|
+
return _dict
|
92
|
+
|
93
|
+
@classmethod
|
94
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
95
|
+
"""Create an instance of Text2SparqlTaskUpdate from a dict"""
|
96
|
+
if obj is None:
|
97
|
+
return None
|
98
|
+
|
99
|
+
if not isinstance(obj, dict):
|
100
|
+
return cls.model_validate(obj)
|
101
|
+
|
102
|
+
_obj = cls.model_validate({
|
103
|
+
"prompt": obj.get("prompt"),
|
104
|
+
"llm_choice": obj.get("llm_choice"),
|
105
|
+
"bot_seed": obj.get("bot_seed"),
|
106
|
+
"bot_temperature": obj.get("bot_temperature"),
|
107
|
+
"bot_answer_length": obj.get("bot_answer_length"),
|
108
|
+
"number_of_references": obj.get("number_of_references"),
|
109
|
+
"stream_speed": obj.get("stream_speed"),
|
110
|
+
"context_window": obj.get("context_window"),
|
111
|
+
"max_tokens": obj.get("max_tokens"),
|
112
|
+
"bot_name": obj.get("bot_name"),
|
113
|
+
"bot_description": obj.get("bot_description")
|
114
|
+
})
|
115
|
+
return _obj
|
116
|
+
|
117
|
+
|