Skip to content

Commit

Permalink
Merge pull request #352 from deeppavlov/dev
Browse files Browse the repository at this point in the history
* fix: cards for deepy

* fix: cards for deepy

* fix: use gpt-3.5
  • Loading branch information
dilyararimovna authored Mar 18, 2023
2 parents aa44906 + 2535cc6 commit a9bae9d
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 30 deletions.
4 changes: 0 additions & 4 deletions assistant_dists/deepy_assistant/cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ services:
environment:
DEVICE: cpu
CUDA_VISIBLE_DEVICES: ""
transformers-lm-bloomz7b:
environment:
DEVICE: cpu
CUDA_VISIBLE_DEVICES: ""
7 changes: 3 additions & 4 deletions assistant_dists/deepy_assistant/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ services:
- "./common:/src/common"
ports:
- 8135:8135
transformers-lm-bloomz7b:
openai-api-davinci3:
volumes:
- "./services/transformers_lm:/src"
- "./services/openai_api_lm:/src"
- "./common:/src/common"
- "~/.deeppavlov/cache:/root/.cache"
ports:
- 8146:8146
- 8131:8131
dff-deepy-prompted-skill:
volumes:
- "./skills/dff_template_prompted_skill:/src"
Expand Down
26 changes: 13 additions & 13 deletions assistant_dists/deepy_assistant/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ services:
command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.pipeline_config=assistant_dists/deepy_assistant/pipeline_conf.json'
environment:
WAIT_HOSTS: "sentseg:8011, no-restrictions-selector:8009, badlisted-words:8018, combined-classification:8087,
spelling-preprocessing:8074, sentence-ranker:8128, prompt-selector:8135, transformers-lm-bloomz7b:8146,
dff-deepy-prompted-skill:8148"
spelling-preprocessing:8074, sentence-ranker:8128, prompt-selector:8135, openai-api-davinci3:8131,
dff-deepy-prompted-skill:8148"
WAIT_HOSTS_TIMEOUT: ${WAIT_TIMEOUT:-1000}

sentseg:
Expand Down Expand Up @@ -145,26 +145,25 @@ services:
reservations:
memory: 3G

transformers-lm-bloomz7b:
openai-api-davinci3:
env_file: [ .env ]
build:
args:
SERVICE_PORT: 8146
SERVICE_NAME: transformers_lm_bloomz7b
PRETRAINED_MODEL_NAME_OR_PATH: bigscience/bloomz-7b1
HALF_PRECISION: 0
SERVICE_PORT: 8131
SERVICE_NAME: openai_api_davinci3
PRETRAINED_MODEL_NAME_OR_PATH: text-davinci-003
context: .
dockerfile: ./services/transformers_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8146
dockerfile: ./services/openai_api_lm/Dockerfile
command: flask run -h 0.0.0.0 -p 8131
environment:
- CUDA_VISIBLE_DEVICES=0
- FLASK_APP=server
deploy:
resources:
limits:
memory: 50G
memory: 100M
reservations:
memory: 50G
memory: 100M

dff-deepy-prompted-skill:
env_file: [ .env ]
Expand All @@ -173,10 +172,11 @@ services:
SERVICE_PORT: 8148
SERVICE_NAME: dff_deepy_prompted_skill
PROMPT_FILE: common/prompts/deepy.json
GENERATIVE_SERVICE_URL: http://transformers-lm-bloomz7b:8146/respond
GENERATIVE_SERVICE_CONFIG: default_generative_config.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 5
N_UTTERANCES_CONTEXT: 3
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
dockerfile: ./skills/dff_template_prompted_skill/Dockerfile
command: gunicorn --workers=1 server:app -b 0.0.0.0:8148 --reload
Expand Down
9 changes: 0 additions & 9 deletions assistant_dists/deepy_assistant/proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,4 @@ services:
- PROXY_PASS=dream.deeppavlov.ai:8128
- PORT=8128

transformers-lm-bloomz7b:
command: [ "nginx", "-g", "daemon off;" ]
build:
context: dp/proxy/
dockerfile: Dockerfile
environment:
- PROXY_PASS=dream.deeppavlov.ai:8146
- PORT=8146

version: '3.7'
25 changes: 25 additions & 0 deletions skills/dff_template_prompted_skill/component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,28 @@ dff-rhodes-coaching-prompted-skill:
GENERATIVE_TIMEOUT: 5
N_UTTERANCES_CONTEXT: 3
date_created: '2023-03-16T09:45:32'
dff-deepy-prompted-skill:
name: dff_deepy_prompted_skill
display_name: Deepy Assistant Skill
container_name: dff-deepy-prompted-skill
component_type: Script-based with NNs
model_type: NN-based
is_customizable: true
author: DeepPavlov
description: Deepy Assistant can help a user to create a customized dialogue system.
ram_usage: 150M
gpu_usage: null
port: 8148
endpoints:
- group: skills
endpoint: respond
build_args:
SERVICE_PORT: 8148
SERVICE_NAME: dff_deepy_prompted_skill
PROMPT_FILE: common/prompts/deepy.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 5
N_UTTERANCES_CONTEXT: 3
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
date_created: '2023-03-16T09:45:32'
11 changes: 11 additions & 0 deletions skills/dff_template_prompted_skill/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,14 @@ dff-dream-persona-davinci3-prompted-skill:
previous_services:
- skill_selectors
state_manager_method: add_hypothesis
dff-deepy-prompted-skill:
- group: skills
connector:
protocol: http
timeout: 5.0
url: http://dff-deepy-prompted-skill:8148/respond
dialog_formatter: state_formatters.dp_formatters:dff_deepy_prompted_skill_formatter
response_formatter: state_formatters.dp_formatters:skill_with_attributes_formatter_service
previous_services:
- skill_selectors
state_manager_method: add_hypothesis

0 comments on commit a9bae9d

Please sign in to comment.