From 1513f564927c49544b548a7e7dc887ad354a3a41 Mon Sep 17 00:00:00 2001 From: rafilgalimzanov Date: Mon, 6 May 2024 21:58:48 +0300 Subject: [PATCH] add dream-persona-skill --- .../docker-compose.override.yml | 28 +++++++++---------- .../dream_persona_prompted/pipeline_conf.json | 21 ++++++++++++++ 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/assistant_dists/dream_persona_prompted/docker-compose.override.yml b/assistant_dists/dream_persona_prompted/docker-compose.override.yml index ef3e466aa..4ef93c45f 100644 --- a/assistant_dists/dream_persona_prompted/docker-compose.override.yml +++ b/assistant_dists/dream_persona_prompted/docker-compose.override.yml @@ -3,7 +3,7 @@ services: command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.pipeline_config=assistant_dists/dream_persona_prompted/pipeline_conf.json' environment: WAIT_HOSTS: "sentseg:8011, ranking-based-response-selector:8002, combined-classification:8087, - sentence-ranker:8128, prompt-selector:8135, transformers-lm-gptjt:8161" + sentence-ranker:8128, prompt-selector:8135, dff-dream-persona-chatgpt-prompted-skill:8137" WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-1000} HIGH_PRIORITY_INTENTS: 1 RESTRICTION_FOR_SENSITIVE_CASE: 1 @@ -107,25 +107,25 @@ services: reservations: memory: 3G - transformers-lm-gptjt: - env_file: [ .env ] + dff-dream-persona-chatgpt-prompted-skill: + env_file: [ .env,.env_secret ] build: args: - SERVICE_PORT: 8161 - SERVICE_NAME: transformers_lm_gptjt - PRETRAINED_MODEL_NAME_OR_PATH: togethercomputer/GPT-JT-6B-v1 - HALF_PRECISION: 1 + SERVICE_PORT: 8137 + SERVICE_NAME: dff_dream_persona_prompted_skill + PROMPT_FILE: common/prompts/dream_persona.json + GENERATIVE_SERVICE_URL: http://openai-api-chatgpt:8145/respond + GENERATIVE_SERVICE_CONFIG: openai-chatgpt.json + GENERATIVE_TIMEOUT: 120 + N_UTTERANCES_CONTEXT: 7 + ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION context: . - dockerfile: ./services/transformers_lm/Dockerfile - command: flask run -h 0.0.0.0 -p 8161 - environment: - - CUDA_VISIBLE_DEVICES=0 - - FLASK_APP=server + dockerfile: ./skills/dff_template_prompted_skill/Dockerfile deploy: resources: limits: - memory: 50G + memory: 128M reservations: - memory: 50G + memory: 128M version: '3.7' diff --git a/assistant_dists/dream_persona_prompted/pipeline_conf.json b/assistant_dists/dream_persona_prompted/pipeline_conf.json index cb1aa14c6..4ddc4b424 100644 --- a/assistant_dists/dream_persona_prompted/pipeline_conf.json +++ b/assistant_dists/dream_persona_prompted/pipeline_conf.json @@ -207,6 +207,27 @@ } }, "skills": { + "dff_dream_persona_prompted_skill": { + "connector": { + "protocol": "http", + "timeout": 120.0, + "url": "http://dff-dream-persona-chatgpt-prompted-skill:8137/respond" + }, + "dialog_formatter": { + "name": "state_formatters.dp_formatters:dff_prompted_skill_formatter", + "skill_name": "dff_dream_persona_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/W6hdAGshQyMwdQukRXXuKA.yml", + "service": "skills/dff_template_prompted_skill/service_configs/dff-dream-persona-chatgpt-prompted-skill" + } + }, "dummy_skill": { "connector": { "protocol": "python",