Skip to content

Commit

Permalink
Merge pull request #611 from deeppavlov/refactor/dream_persona
Browse files Browse the repository at this point in the history
add dream-persona-skill
  • Loading branch information
RafilGalimzyanov authored May 15, 2024
2 parents 1ec8ae6 + 1513f56 commit 24387c5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 14 deletions.
28 changes: 14 additions & 14 deletions assistant_dists/dream_persona_prompted/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
21 changes: 21 additions & 0 deletions assistant_dists/dream_persona_prompted/pipeline_conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 24387c5

Please sign in to comment.