diff --git a/assistant_dists/ai_faq_assistant/pipeline_conf.json b/assistant_dists/ai_faq_assistant/pipeline_conf.json index a21dcc585d..8ed13d5637 100644 --- a/assistant_dists/ai_faq_assistant/pipeline_conf.json +++ b/assistant_dists/ai_faq_assistant/pipeline_conf.json @@ -269,9 +269,9 @@ } }, "metadata": { - "display_name": "AI FAQ Assistant", - "author": "AI for General Public", - "description": "You can use this Assistant to ask simple questions about today's AI technology. It will provide answers based on the FAQ given in the prompt as well as the underlying model's internal knowledge.", + "display_name": "FAQ Assistant", + "author": "DeepPavlov", + "description": "You can use this Assistant to ask simple questions about today's DeepPavlov company.", "version": "0.0.1", "date_created": "2023-01-10T02:00:00", "ram_usage": "50 GB", diff --git a/assistant_dists/ai_faq_ru_assistant/docker-compose.override.yml b/assistant_dists/ai_faq_ru_assistant/docker-compose.override.yml new file mode 100644 index 0000000000..a25bd30f38 --- /dev/null +++ b/assistant_dists/ai_faq_ru_assistant/docker-compose.override.yml @@ -0,0 +1,139 @@ +services: + agent: + build: + args: + WAIT_HOSTS: prompt-selector-ru:8135, dialogrpt-ru:8122, dff-ai-faq-ru-prompted-skill:8190, + ranking-based-response-selector-ru:8002 + WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-480} + HIGH_PRIORITY_INTENTS: 1 + RESTRICTION_FOR_SENSITIVE_CASE: 1 + ALWAYS_TURN_ON_ALL_SKILLS: 0 + LANGUAGE: RU + FALLBACK_FILE: fallbacks_dream_ru.json + command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.pipeline_config=assistant_dists/business_ru_assistant/pipeline_conf.json' + environment: + WAIT_HOSTS: prompt-selector-ru:8135, dialogrpt-ru:8122, dff-ai-faq-ru-prompted-skill:8190, + ranking-based-response-selector-ru:8002 + WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-480} + HIGH_PRIORITY_INTENTS: 1 + RESTRICTION_FOR_SENSITIVE_CASE: 1 + ALWAYS_TURN_ON_ALL_SKILLS: 0 + LANGUAGE: RU + FALLBACK_FILE: fallbacks_dream_ru.json + deploy: + resources: + limits: + memory: 200M + reservations: + memory: 200M + prompt-selector-ru: + env_file: + - .env + build: + args: + SERVICE_PORT: 8135 + SERVICE_NAME: prompt_selector + N_SENTENCES_TO_RETURN: 3 + PROMPTS_TO_CONSIDER: s9qkdg4i9g01 + FLASK_APP: server + context: . + dockerfile: annotators/prompt_selector/Dockerfile + command: flask run -h 0.0.0.0 -p 8135 + environment: + SERVICE_PORT: 8135 + SERVICE_NAME: prompt_selector + N_SENTENCES_TO_RETURN: 3 + PROMPTS_TO_CONSIDER: s9qkdg4i9g01 + FLASK_APP: server + deploy: + resources: + limits: + memory: 100M + reservations: + memory: 100M + dialogrpt-ru: + env_file: + - .env_ru + build: + args: + SERVICE_PORT: 8122 + PRETRAINED_MODEL_FNAME: dialogrpt_ru_ckpt_v0.pth + TOKENIZER_NAME_OR_PATH: DeepPavlov/rudialogpt3_medium_based_on_gpt2_v2 + CUDA_VISIBLE_DEVICES: '0' + FLASK_APP: server + context: services/dialogrpt_ru + command: flask run -h 0.0.0.0 -p 8122 + environment: + SERVICE_PORT: 8122 + PRETRAINED_MODEL_FNAME: dialogrpt_ru_ckpt_v0.pth + TOKENIZER_NAME_OR_PATH: DeepPavlov/rudialogpt3_medium_based_on_gpt2_v2 + CUDA_VISIBLE_DEVICES: '0' + FLASK_APP: server + deploy: + resources: + limits: + memory: 4G + reservations: + memory: 4G + dff-ai-faq-ru-prompted-skill: + env_file: + - .env + build: + args: + SERVICE_PORT: 8190 + SERVICE_NAME: dff_ai_faq_ru_prompted_skill + PROMPT_FILE: common/prompts/ai_faq_ru.json + GENERATIVE_SERVICE_URL: http://gigachat-api:8187/respond + GENERATIVE_SERVICE_CONFIG: gigachat.json + GENERATIVE_TIMEOUT: 120 + N_UTTERANCES_CONTEXT: 7 + ENVVARS_TO_SEND: GIGACHAT_CREDENTIAL,GIGACHAT_SCOPE + context: . + dockerfile: skills/dff_template_prompted_skill/Dockerfile + environment: + SERVICE_PORT: 8190 + SERVICE_NAME: dff_ai_faq_ru_prompted_skill + PROMPT_FILE: common/prompts/ai_faq_ru.json + GENERATIVE_SERVICE_URL: http://gigachat-api:8187/respond + GENERATIVE_SERVICE_CONFIG: gigachat.json + GENERATIVE_TIMEOUT: 120 + N_UTTERANCES_CONTEXT: 7 + ENVVARS_TO_SEND: GIGACHAT_CREDENTIAL,GIGACHAT_SCOPE + deploy: + resources: + limits: + memory: 128M + reservations: + memory: 128M + ranking-based-response-selector-ru: + env_file: + - .env + build: + args: + SERVICE_PORT: 8002 + SERVICE_NAME: response_selector + SENTENCE_RANKER_ANNOTATION_NAME: dialogrpt + SENTENCE_RANKER_SERVICE_URL: http://dialogrpt-ru:8122/rank_sentences + SENTENCE_RANKER_TIMEOUT: 3 + N_UTTERANCES_CONTEXT: 5 + FILTER_TOXIC_OR_BADLISTED: 1 + FLASK_APP: server + context: . + dockerfile: response_selectors/ranking_based_response_selector/Dockerfile + command: flask run -h 0.0.0.0 -p 8002 + environment: + SERVICE_PORT: 8002 + SERVICE_NAME: response_selector + SENTENCE_RANKER_ANNOTATION_NAME: dialogrpt + SENTENCE_RANKER_SERVICE_URL: http://dialogrpt-ru:8122/rank_sentences + SENTENCE_RANKER_TIMEOUT: 3 + N_UTTERANCES_CONTEXT: 5 + FILTER_TOXIC_OR_BADLISTED: 1 + FLASK_APP: server + deploy: + resources: + limits: + memory: 100M + reservations: + memory: 100M +version: '3.7' diff --git a/assistant_dists/ai_faq_ru_assistant/pipeline_conf.json b/assistant_dists/ai_faq_ru_assistant/pipeline_conf.json new file mode 100644 index 0000000000..df6e9b70d9 --- /dev/null +++ b/assistant_dists/ai_faq_ru_assistant/pipeline_conf.json @@ -0,0 +1,232 @@ +{ + "services": { + "last_chance_service": { + "group": "last_chance_service", + "connector": { + "protocol": "python", + "class_name": "PredefinedTextConnector", + "response_text": "Извини, что-то пошло не так в моем мозгу. Пожалуйста, повтори предыдущую реплику.", + "annotations": { + "sentseg": { + "punct_sent": "Извини, что-то пошло не так в моем мозгу. Пожалуйста, повтори предыдущую реплику.", + "segments": [ + "Извини, что-то пошло не так в моем мозгу.", + "Пожалуйста, повтори предыдущую реплику." + ] + } + } + }, + "state_manager_method": "add_bot_utterance_last_chance", + "tags": [ + "last_chance" + ], + "endpoint": "respond", + "is_enabled": true, + "source": { + "component": "components/ktwzbud2l5ug.yml", + "service": "services/agent_services/service_configs/0o5hpk4t0wl7" + } + }, + "timeout_service": { + "group": "timeout_service", + "connector": { + "protocol": "python", + "class_name": "PredefinedTextConnector", + "response_text": "Извини, что-то пошло не так в моем мозгу. Пожалуйста, повтори предыдущую реплику.", + "annotations": { + "sentseg": { + "punct_sent": "Извини, что-то пошло не так в моем мозгу. Пожалуйста, повтори предыдущую реплику.", + "segments": [ + "Извини, что-то пошло не так в моем мозгу.", + "Пожалуйста, повтори предыдущую реплику." + ] + } + } + }, + "state_manager_method": "add_bot_utterance_last_chance", + "tags": [ + "timeout" + ], + "endpoint": "respond", + "is_enabled": true, + "source": { + "component": "components/tnqsdvixagp6.yml", + "service": "services/agent_services/service_configs/0o5hpk4t0wl7" + } + }, + "annotators": { + "prompt_goals_collector": { + "group": "annotators", + "connector": { + "protocol": "http", + "timeout": 2.0, + "url": "http://prompt-selector-ru:8135/collect_goals" + }, + "dialog_formatter": "state_formatters.dp_formatters:prompts_goals_collector_formatter", + "response_formatter": "state_formatters.dp_formatters:simple_formatter_service", + "state_manager_method": "update_attributes", + "endpoint": "collect_goals", + "is_enabled": true, + "source": { + "component": "components/k3j2h498hvflekdfdfbfgh34r.yml", + "service": "annotators/prompt_selector/service_configs/prompt-selector-ru" + } + }, + "prompt_selector": { + "group": "annotators", + "connector": { + "protocol": "http", + "timeout": 2.0, + "url": "http://prompt-selector-ru:8135/respond" + }, + "dialog_formatter": "state_formatters.dp_formatters:context_formatter_dialog", + "response_formatter": "state_formatters.dp_formatters:simple_formatter_service", + "state_manager_method": "add_annotation", + "endpoint": "respond", + "is_enabled": true, + "source": { + "component": "components/ctl9rk5pcthb.yml", + "service": "annotators/prompt_selector/service_configs/56nyak2w8mxz" + } + } + }, + "response_annotators": {}, + "response_annotator_selectors": { + "group": "response_annotator_selectors", + "connector": { + "protocol": "python", + "class_name": "skill_selectors.post_annotator_selector.connector:PostAnnotatorSelectorConnector", + "annotator_names": [ + "sentseg" + ] + }, + "response_formatter": "state_formatters.dp_formatters:simple_formatter_service", + "tags": [ + "selector" + ], + "is_enabled": true, + "source": { + "component": "components/LXrJDIf43gwNmPMNXG5Eg.yml", + "service": "services/response_annotator_selectors/service_configs/agent" + } + }, + "candidate_annotators": { + "dialogrpt": { + "group": "candidate_annotators", + "connector": { + "protocol": "http", + "timeout": 1.0, + "url": "http://dialogrpt-ru:8122/respond" + }, + "dialog_formatter": "state_formatters.dp_formatters:hypotheses_with_context_list", + "response_formatter": "state_formatters.dp_formatters:simple_formatter_service", + "previous_services": [ + "skills" + ], + "state_manager_method": "add_hypothesis_annotation_batch", + "endpoint": "respond", + "is_enabled": true, + "source": { + "component": "components/DUW2u7FwPMyhBOWrK1HTg.yml", + "service": "services/dialogrpt_ru/service_configs/dialogrpt-ru" + } + } + }, + "skill_selectors": { + "description_based_skill_selector": { + "group": "skill_selectors", + "connector": { + "protocol": "python", + "class_name": "skill_selectors.description_based_skill_selector.connector:DescriptionBasedSkillSelectorConnector" + }, + "dialog_formatter": "state_formatters.dp_formatters:base_skill_selector_formatter_dialog", + "response_formatter": "state_formatters.dp_formatters:simple_formatter_service", + "previous_services": [ + "annotators" + ], + "tags": [ + "selector" + ], + "endpoint": "respond", + "is_enabled": true, + "source": { + "component": "components/dfsw4bji8bgjq2.yml", + "service": "skill_selectors/description_based_skill_selector/service_configs/agent" + } + } + }, + "skills": { + "dummy_skill": { + "group": "skills", + "connector": { + "protocol": "python", + "class_name": "skills.dummy_skill.connector:DummySkillConnector" + }, + "dialog_formatter": "state_formatters.dp_formatters:utt_sentrewrite_modified_last_dialog", + "response_formatter": "state_formatters.dp_formatters:skill_with_attributes_formatter_service", + "previous_services": [ + "skill_selectors" + ], + "state_manager_method": "add_hypothesis", + "is_enabled": true, + "source": { + "component": "components/uYkoK0vRp4bbIg9akI1yw.yml", + "service": "skills/dummy_skill/service_configs/agent" + } + }, + "dff_ai_faq_ru_prompted_skill": { + "connector": { + "protocol": "http", + "timeout": 120.0, + "url": "http://dff-ai-faq-ru-prompted-skill:8190/respond" + }, + "dialog_formatter": { + "name": "state_formatters.dp_formatters:dff_prompted_skill_formatter", + "skill_name": "dff_ai_faq_ru_prompted_skill" + }, + "response_formatter": "state_formatters.dp_formatters:skill_with_attributes_formatter_service", + "previous_services": [ + "skill_selectors" + ], + "state_manager_method": "add_hypothesis", + "is_enabled": true, + "source": { + "component": "components/0Anxjzdjfajdfjsndfdkmthmdsknv4a.yml", + "service": "skills/dff_template_prompted_skill/service_configs/dff-ai-faq-ru-prompted-skill" + } + } + }, + "response_selectors": { + "response_selector": { + "group": "response_selectors", + "connector": { + "protocol": "http", + "timeout": 1.0, + "url": "http://ranking-based-response-selector-ru:8002/respond" + }, + "dialog_formatter": "state_formatters.dp_formatters:cropped_dialog", + "response_formatter": "state_formatters.dp_formatters:base_response_selector_formatter_service", + "previous_services": [ + "candidate_annotators" + ], + "state_manager_method": "add_bot_utterance", + "tags": [ + "selector" + ], + "endpoint": "respond", + "is_enabled": true, + "source": { + "component": "components/hE12LfxAkX3K9gU0nU4yE2.yml", + "service": "response_selectors/ranking_based_response_selector/service_configs/ranking-based-response-selector-ru" + } + } + }, + "actors": {} + }, + "metadata": { + "display_name": "FAQ ассистент", + "author": "DeepPavlov", + "description": "Вы можете использовать этого помощника, чтобы задавать простые вопросы о сегодняшней компании DeepPavlov.", + "date_created": "2024-02-19T20:31:06" + } +} \ No newline at end of file diff --git a/common/prompts/ai_faq.json b/common/prompts/ai_faq.json index 4d8b9c064b..9d5ddbde9f 100644 --- a/common/prompts/ai_faq.json +++ b/common/prompts/ai_faq.json @@ -1,4 +1,4 @@ { - "prompt": "TASK: \nYou are a chatbot that can only answers FAQ questions about AI.\n\nFAQ:\nWhat is a smart home?\nA smart home is like having a personal assistant for your house. It's a system of devices and appliances that can be controlled remotely and programmed to perform tasks automatically. For example, you can use your smartphone to turn on the lights, adjust the thermostat, or start the coffee maker before you even get out of bed.\n\nWhat is NLP?\nNLP stands for Natural Language Processing, which is like teaching a computer to understand and communicate in human language. Just like how you would learn a new language, NLP algorithms are trained to recognize patterns and structures in language data, and then use that knowledge to generate human-like responses or analyze text for insights.\n\nWhat is computer vision?\nComputer vision is like giving a computer the ability to see and interpret the world around it. It involves teaching machines to recognize and interpret visual information, such as images or video, by using algorithms that mimic the way our brains process visual stimuli. This allows computers to identify objects, people, and even emotions in visual content.\n\nWhat is machine learning?\nMachine learning is like teaching a computer to learn and make decisions on its own. It's a type of artificial intelligence that allows machines to automatically improve their performance over time by analyzing data and patterns. Just like how you would get better at a task by practicing and learning from mistakes, machine learning algorithms learn from experience to make better predictions or decisions.\n\nWhat is a neural network?\nA neural network is like a complex web of interconnected neurons in the brain, but in this case, it's a computer program designed to learn and make decisions. It's a type of machine learning algorithm that simulates the way our brains process information by using layers of interconnected nodes to recognize patterns and make predictions. Think of it like a brain-inspired calculator that can solve complex problems and make decisions based on data input.\n\nINSTRUCTION:\nA human enters the conversation and starts asking questions. Generate the reply based on FAQ list.", - "goals": "Answers frequently asked questions about AI, including topics such as smart homes, NLP, computer vision, machine learning, and neural networks." + "prompt": "ROLE: You are an assistant who helps the user to learn information about DeepPavlov company and its products. \n\nTASK: Your task is to answer user's questions based on the provided TEXT ABOUT COMPANY following the INSTRUCTIONS.\nIf there is no direct answer to the question in the TEXT ABOUT THE COMPANY, say that you cannot answer this question.\n\nINSTRUCTIONS: \nFollow the steps below to answer user's question:\n1. Analyze the text and determine, whether the TEXT ABOUT THE COMPANY contains the direct answer or not.\n2. If there is a direct answer for user's question in the TEXT ABOUT THE COMPANY, use this information and answer the question.\n3. If there is no direct answer in the TEXT ABOUT THE COMPANY, then simply write \\\"Sorry, I don't have this information.\\\"\n4. Use EXAMPLES as references for your answer.\n\nEXAMPLES:\nExample 1: there is a direct answer in the text.\nQuestion: Is DeepPavlov library a closed source?\nChain-of-thought: As I see, there is such information in the text. So I can give an answer.\nAnswer:No, DeepPavlov library is an open source conversational artificial intelligence library code.\n\nExample 2: there is no direct answer in the text.\nQ: Where can I find the source code for DeepPavlov library?\nChain-of-thought: I might know about source code from my background knowledge. However, from what I see from the text, no information is provided. Thus, I should answer that I don't have this information.\nA: Sorry, I don't have this information.\n\nQ: What is TensorFlow?\nChain-of-thought: I might know about TensorFlow from my background knowledge. However, from what I see from the text, no description is provided. Thus, I should answer that I don't have this information.\nA: Sorry, I don't have this information.\n\nQ: What is Framework?\nChain-of-thought: I might know about frameworks from my background knowledge. However, from what I see from the text, no description is provided. Thus, I should answer that I don't have this information.\nA: Sorry, I don't have this information.\n\nTEXT ABOUT COMPANY:\nБИБЛИОТЕКА DEEPPAVLOV — DeepPavlov is an open source framework for chatbots and virtual assistants development. DeepPavlov is designed for development of production ready chat-bots and complex conversational systems, research in the area of NLP and, particularly, of dialog systems.\n\nDEEPPAVLOV AGENT — DeepPavlov Agent is an open-source framework for development of scalable and production ready multi-skill virtual assistants, complex dialogue systems and chatbots. DeepPavlov Agent provides easy adaptation to your needs, simple deployment, and usage. You can combine various components to address complex conversational AI tasks. It also offers an easy way to configure and deploy applications, and users can easily interact with agent-based systems through built-in HTTP APIs, Telegram client, or command line.\n\nDEEPPAVLOV DREAM – The ultimate open-source platform for building powerful Generative AI assistants. DeepPavlov Dream is a free, open-source Multiskill AI Assistant Platform built using DeepPavlov Conversational AI Stack. It is built on top of DeepPavlov Agent running as a container in Docker. It runs on x86_64 machines, and prefers having NVIDIA GPUs on the machine.\n\nDFF (DIALOG FLOW FRAMEWORK) — Dialog Flow Framework is a free and open-source python software stack for creating chatbots, released under the terms of Apache License 2.0. The Dialog Flow Framework (DFF) allows you to develop conversational services. DFF offers a specialized domain-specific language (DSL) for quickly writing dialogs in pure Python. The service is created by defining a special dialog graph that determines the behavior of the dialog agent. The latter is then leveraged in the DFF pipeline. You can use the framework in various services such as social networks, call centers, websites, personal assistants, etc. DFF, a versatile Python-based conversational service framework, can be deployed across a spectrum of platforms, ensuring flexibility for both novice and seasoned developers.\nWhether deployed on cloud platforms, containerized environments, or directly on IoT devices, DFF's accessibility and customization options make it a robust choice for developing conversational services in the evolving landscape of Python applications and IoT connectivity.\n", + "goals": "" } \ No newline at end of file diff --git a/common/prompts/ai_faq_ru.json b/common/prompts/ai_faq_ru.json new file mode 100644 index 0000000000..475099c465 --- /dev/null +++ b/common/prompts/ai_faq_ru.json @@ -0,0 +1,4 @@ +{ + "prompt": "РОЛЬ: Вы — помощник, который помогает пользователю узнать информацию о компании DeepPavlov и её продуктах.\n\nЗАДАЧА: Ваша задача — отвечать на вопросы пользователя на основе предоставленного ТЕКСТА О КОМПАНИИ, следуя ИНСТРУКЦИЯМ.\nЕсли в ТЕКСТЕ О КОМПАНИИ нет прямого ответа на вопрос, скажите, что не можете ответить на этот вопрос.\n\nИНСТРУКЦИИ:\nСледуйте приведённым ниже шагам, чтобы ответить на вопрос пользователя:\n\nПроанализируйте текст и определите, содержится ли в ТЕКСТЕ О КОМПАНИИ прямой ответ или нет.\nЕсли в ТЕКСТЕ О КОМПАНИИ есть прямой ответ на вопрос пользователя, используйте эту информацию и ответьте на вопрос.\nЕсли в ТЕКСТЕ О КОМПАНИИ нет прямого ответа на вопрос пользователя, просто напишите \"Извините, у меня нет этой информации.\"\nИспользуйте ПРИМЕРЫ в качестве ссылок для вашего ответа.\nПРИМЕРЫ:\nПример 1: в тексте есть прямой ответ.\nВопрос: Является ли библиотека DeepPavlov закрытым исходным кодом?\nЦепочка размышлений: Как я вижу, в тексте есть такая информация. Значит, я могу дать ответ.\nОтвет: Нет, библиотека DeepPavlov является библиотекой разговорного искусственного интеллекта с открытым исходным кодом.\n\nПример 2: в тексте нет прямого ответа.\nВопрос: Где я могу найти исходный код библиотеки DeepPavlov?\nЦепочка размышлений: Я могу знать об исходном коде из своего фона. Однако, исходя из текста, никакой информации не предоставлено. Поэтому я должен ответить, что у меня нет этой информации.\nОтвет: Извините, у меня нет этой информации.\n\nВопрос: Что такое TensorFlow?\nЦепочка размышлений: Я могу знать о TensorFlow из своего фона. Однако, исходя из текста, никакого описания не предоставлено. Поэтому я должен ответить, что у меня нет этой информации.\nОтвет: Извините, у меня нет этой информации.\n\nВопрос: Что такое Framework?\nЦепочка размышлений: Я могу знать о фреймворках из своего фона. Однако, исходя из текста, никакого описания не предоставлено. Поэтому я должен ответить, что у меня нет этой информации.\nОтвет: Извините, у меня нет этой информации.\n\nТЕКСТ О КОМПАНИИ:\nПродукты DeepPavlov: БИБЛИОТЕКА DEEPPAVLOV — диалоговая библиотека искусственного интеллекта с открытым исходным кодом для создания виртуальных ассистентов и анализа текста, построенная на TensorFlow и Keras. Она содержит набор компонентов для быстрого прототипирования диалоговых систем, которые позволяют автоматизировать процессы коммуникации в ритейле, маркетинге, банковской сфере и др. областях. Библиотека DeepPavlov обеспечивает полный цикл разработки диалоговых агентов, предназначенных для автоматизации коммуникационных процессов в ритейле, маркетинге, банковской и многих других областях, например, выполняющих функции виртуальных ассистентов контакт-центров, служб технической поддержки и т.п. Преимуществом DeepPavlov в сравнении с ближайшим аналогом, библиотекой Rasa, является гибкость в части конфигурации диалоговых агентов, а также набор предобученных моделей для NLP задач русского языка. Библиотека DeepPavlov содержит: Набор предварительно обученных state-of-the-art NLP моделей для анализа текста, компонентов диалоговых систем (ML / DL / Rule-based) и пайплайнов; Инструменты прикладной разработки и интеграции (мессенджеры, программное обеспечение служб поддержки и т.д.); Библиотека для создания и тестирования диалоговых моделей; Интеграция с API; Поддержка для 53+ языков. DEEPPAVLOV AGENT — платформа с открытым исходным кодом для разработки масштабируемых и готовых к производству виртуальных помощников с несколькими навыками, сложных диалоговых систем и чат-ботов. DEEPPAVLOV DREAM – открытая версия ИИ ассистента, построенного на базе бота, сделанного для и участвовавшего в Amazon Alexa Prize, инструменты и компоненты, необходимые для построения подобных ИИ ассистентов. DeepPavlov Dream – это первый мультифункциональный и экспериментальный ИИ помощник, созданный с использованием диалогового стека продуктов DeepPavlov. Подробная информация и документация на сайте: https://dream.deeppavlov.ai/. DFF (DIALOG FLOW FRAMEWORK) — это бесплатный стек программного обеспечения Python с открытым исходным кодом для создания чат-ботов, выпущенный на условиях лицензии Apache 2.0. Он появился во время конкурса Amazon Alexa Prize Socialbot Grand Challenge 4 и позволяет очень легко развивать свои собственные навыки, основанные на сценариях, для Dream. В разделе https://deeppavlov.ai/datasets на сайте можно найти следующие датасеты: DeepPavlov Dream Dialogues, DeepPavlov Topics. В DeepPavlov можно пройти стажировку, ознакомиться с условиями можно по ссылке: https://deeppavlov.ai/internships\"\"\" Информацию о вакансиях в DeepPavlov можно найти по ссылке: https://deeppavlov.ai/careers\"\"\"", + "goals": "" +} \ No newline at end of file diff --git a/components/0Anxjzdjfajdfjsndfdkmthmdsknv4a.yml b/components/0Anxjzdjfajdfjsndfdkmthmdsknv4a.yml new file mode 100644 index 0000000000..b00aaa0301 --- /dev/null +++ b/components/0Anxjzdjfajdfjsndfdkmthmdsknv4a.yml @@ -0,0 +1,30 @@ +name: dff_ai_faq_ru_prompted_skill +display_name: FAQ навык +component_type: Generative +model_type: NN-based +is_customizable: true +author: publisher@deeppavlov.ai +description: Этот навык предоставляет ответы, сгенерированные языковой моделью на основе контекста диалога и заданной подсказки, чтобы ответить на вопросы пользователя о компании DeepPavlov. +ram_usage: 150M +gpu_usage: null +group: skills +connector: + protocol: http + timeout: 20.0 + url: http://dff-ai-faq-ru-prompted-skill:8190/respond + class_name: null + response_text: null + annotations: null + annotator_names: null +dialog_formatter: + name: state_formatters.dp_formatters:dff_prompted_skill_formatter + skill_name: dff_marketing_strategy_prompted_skill +response_formatter: state_formatters.dp_formatters:skill_with_attributes_formatter_service +previous_services: +- skill_selectors +required_previous_services: null +state_manager_method: add_hypothesis +tags: null +endpoint: respond +service: skills/dff_template_prompted_skill/service_configs/dff_marketing_strategy_prompted_skill +date_created: '2024-02-19T20:31:40' diff --git a/components/sQjaqWKJjVWjVEIbNuA.yml b/components/sQjaqWKJjVWjVEIbNuA.yml index 06c8f9dbb3..e5dccd4692 100644 --- a/components/sQjaqWKJjVWjVEIbNuA.yml +++ b/components/sQjaqWKJjVWjVEIbNuA.yml @@ -1,13 +1,11 @@ name: dff_ai_faq_prompted_skill -display_name: AI FAQ Skill +display_name: FAQ Skill component_type: Generative model_type: NN-based is_customizable: true author: publisher@deeppavlov.ai -description: This skill is part of the AI FAQ Assistant pipeline. It provides answers - generated by the language model based on the dialog context and the given prompt - to answer the user's questions about some simple concepts in the modern world of - AI. +description: This skill provides responses generated by a language model based on the context of the conversation + and a given prompt to answer the user's questions about DeepPavlov. ram_usage: 150M gpu_usage: null group: skills diff --git a/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-prompted-skill/environment.yml b/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-prompted-skill/environment.yml index e1bc812c9b..57efd39ecf 100644 --- a/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-prompted-skill/environment.yml +++ b/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-prompted-skill/environment.yml @@ -1,7 +1,7 @@ SERVICE_PORT: 8143 SERVICE_NAME: dff_ai_faq_prompted_skill PROMPT_FILE: common/prompts/ai_faq.json -GENERATIVE_SERVICE_URL: http://transformers-lm-gptjt:8161/respond -GENERATIVE_SERVICE_CONFIG: default_generative_config.json +GENERATIVE_SERVICE_URL: http://openai-api-chatgpt-16k:8167/respond +GENERATIVE_SERVICE_CONFIG: openai-chatgpt.json GENERATIVE_TIMEOUT: 120 N_UTTERANCES_CONTEXT: 7 diff --git a/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-prompted-skill/service.yml b/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-prompted-skill/service.yml index d21eab4813..ed4e273dd5 100644 --- a/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-prompted-skill/service.yml +++ b/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-prompted-skill/service.yml @@ -9,8 +9,8 @@ compose: SERVICE_PORT: 8143 SERVICE_NAME: dff_ai_faq_prompted_skill PROMPT_FILE: common/prompts/ai_faq.json - GENERATIVE_SERVICE_URL: http://transformers-lm-gptjt:8161/respond - GENERATIVE_SERVICE_CONFIG: default_generative_config.json + GENERATIVE_SERVICE_URL: http://openai-api-chatgpt-16k:8167/respond + GENERATIVE_SERVICE_CONFIG: openai-chatgpt.json GENERATIVE_TIMEOUT: 120 N_UTTERANCES_CONTEXT: 7 context: . diff --git a/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-ru-promted-skill/environment.yml b/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-ru-promted-skill/environment.yml new file mode 100644 index 0000000000..af9bd76eb1 --- /dev/null +++ b/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-ru-promted-skill/environment.yml @@ -0,0 +1,8 @@ +SERVICE_PORT: 8190 +SERVICE_NAME: dff_ai_faq_ru_prompted_skill +PROMPT_FILE: common/prompts/ai_faq_ru.json +GENERATIVE_SERVICE_URL: http://gigachat-api:8187/respond +GENERATIVE_SERVICE_CONFIG: gigachat.json +GENERATIVE_TIMEOUT: 120 +N_UTTERANCES_CONTEXT: 7 +ENVVARS_TO_SEND: GIGACHAT_CREDENTIAL,GIGACHAT_SCOPE diff --git a/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-ru-promted-skill/service.yml b/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-ru-promted-skill/service.yml new file mode 100644 index 0000000000..91c130c241 --- /dev/null +++ b/skills/dff_template_prompted_skill/service_configs/dff-ai-faq-ru-promted-skill/service.yml @@ -0,0 +1,30 @@ +name: dff-ai-faq-ru-prompted-skill +endpoints: +- respond +compose: + env_file: + - .env + build: + args: + SERVICE_PORT: 8190 + SERVICE_NAME: dff_ai_faq_ru_prompted_skill + PROMPT_FILE: common/prompts/ai_faq_ru.json + GENERATIVE_SERVICE_URL: http://gigachat-api:8187/respond + GENERATIVE_SERVICE_CONFIG: gigachat.json + GENERATIVE_TIMEOUT: 120 + N_UTTERANCES_CONTEXT: 7 + ENVVARS_TO_SEND: GIGACHAT_CREDENTIAL,GIGACHAT_SCOPE + context: . + dockerfile: ./skills/dff_template_prompted_skill/Dockerfile + deploy: + resources: + limits: + memory: 128M + reservations: + memory: 128M + volumes: + - ./skills/dff_template_prompted_skill:/src + - ./common:/src/common + ports: + - 8190:8190 +proxy: null