Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiskill update #440

Merged
merged 10 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ services:
SERVICE_NAME: dff_dream_persona_prompted_skill
PROMPT_FILE: common/prompts/dream_persona.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 7
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand Down
4 changes: 4 additions & 0 deletions assistant_dists/multiskill_ai_assistant/cpu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
version: '3.7'
services:
combined-classification:
environment:
DEVICE: cpu
CUDA_VISIBLE_DEVICES: ""
sentence-ranker:
environment:
DEVICE: cpu
Expand Down
11 changes: 11 additions & 0 deletions assistant_dists/multiskill_ai_assistant/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@ services:
- ".:/dp-agent"
ports:
- 4242:4242
sentseg:
volumes:
- "./annotators/SentSeg:/src"
ports:
- 8011:8011
ranking-based-response-selector:
volumes:
- "./response_selectors/ranking_based_response_selector:/src"
- "./common:/src/common"
ports:
- 8002:8002
combined-classification:
volumes:
- "./common:/src/common"
- "./annotators/combined_classification:/src"
ports:
- 8087:8087
sentence-ranker:
volumes:
- "./services/sentence_ranker:/src"
Expand Down
56 changes: 44 additions & 12 deletions assistant_dists/multiskill_ai_assistant/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ services:
agent:
command: sh -c 'bin/wait && python -m deeppavlov_agent.run agent.pipeline_config=assistant_dists/multiskill_ai_assistant/pipeline_conf.json'
environment:
WAIT_HOSTS: "ranking-based-response-selector:8002, sentence-ranker:8128, prompt-selector:8135,
WAIT_HOSTS: "sentseg:8011, ranking-based-response-selector:8002, combined-classification:8087,
sentence-ranker:8128, prompt-selector:8135,
openai-api-davinci3:8131, dff-dream-persona-davinci3-prompted-skill:8137,
dff-casual-email-prompted-skill:8154, dff-meeting-notes-prompted-skill:8155,
dff-official-email-prompted-skill:8156, dff-plan-for-article-prompted-skill:8157"
Expand All @@ -12,6 +13,37 @@ services:
ALWAYS_TURN_ON_ALL_SKILLS: 0
LANGUAGE: EN

sentseg:
env_file: [ .env ]
build:
context: ./annotators/SentSeg/
command: flask run -h 0.0.0.0 -p 8011
environment:
- FLASK_APP=server
deploy:
resources:
limits:
memory: 1.5G
reservations:
memory: 1.5G

combined-classification:
env_file: [ .env ]
build:
args:
CONFIG: combined_classifier.json
SERVICE_PORT: 8087
context: .
dockerfile: ./annotators/combined_classification/Dockerfile
environment:
- CUDA_VISIBLE_DEVICES=0
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 2G

ranking-based-response-selector:
env_file: [ .env ]
build:
Expand Down Expand Up @@ -42,7 +74,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
N_SENTENCES_TO_RETURN: 2
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona,casual_email,meeting_notes,official_email,plan_for_article
context: .
dockerfile: ./annotators/prompt_selector/Dockerfile
Expand Down Expand Up @@ -103,8 +135,8 @@ services:
SERVICE_NAME: dff_dream_persona_prompted_skill
PROMPT_FILE: common/prompts/dream_persona.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 7
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand All @@ -125,8 +157,8 @@ services:
SERVICE_NAME: dff_casual_email_prompted_skill
PROMPT_FILE: common/prompts/casual_email.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 7
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand All @@ -147,8 +179,8 @@ services:
SERVICE_NAME: dff_meeting_notes_prompted_skill
PROMPT_FILE: common/prompts/meeting_notes.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 7
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand All @@ -169,8 +201,8 @@ services:
SERVICE_NAME: dff_official_email_prompted_skill
PROMPT_FILE: common/prompts/official_email.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 7
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand All @@ -191,8 +223,8 @@ services:
SERVICE_NAME: dff_plan_for_article_prompted_skill
PROMPT_FILE: common/prompts/plan_for_article.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 7
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand Down
10 changes: 5 additions & 5 deletions assistant_dists/multiskill_ai_assistant/pipeline_conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"dff_dream_persona_prompted_skill": {
"connector": {
"protocol": "http",
"timeout": 10.0,
"timeout": 20.0,
"url": "http://dff-dream-persona-davinci3-prompted-skill:8137/respond"
},
"dialog_formatter": {
Expand All @@ -173,7 +173,7 @@
"dff_casual_email_prompted_skill": {
"connector": {
"protocol": "http",
"timeout": 10.0,
"timeout": 20.0,
"url": "http://dff-casual-email-prompted-skill:8154/respond"
},
"dialog_formatter": {
Expand All @@ -194,7 +194,7 @@
"dff_meeting_notes_prompted_skill": {
"connector": {
"protocol": "http",
"timeout": 10.0,
"timeout": 20.0,
"url": "http://dff-meeting-notes-prompted-skill:8155/respond"
},
"dialog_formatter": {
Expand All @@ -215,7 +215,7 @@
"dff_official_email_prompted_skill": {
"connector": {
"protocol": "http",
"timeout": 10.0,
"timeout": 20.0,
"url": "http://dff-official-email-prompted-skill:8156/respond"
},
"dialog_formatter": {
Expand All @@ -236,7 +236,7 @@
"dff_plan_for_article_prompted_skill": {
"connector": {
"protocol": "http",
"timeout": 10.0,
"timeout": 20.0,
"url": "http://dff-plan-for-article-prompted-skill:8157/respond"
},
"dialog_formatter": {
Expand Down
18 changes: 18 additions & 0 deletions assistant_dists/multiskill_ai_assistant/proxy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
services:

sentseg:
command: ["nginx", "-g", "daemon off;"]
build:
context: dp/proxy/
dockerfile: Dockerfile
environment:
- PROXY_PASS=proxy.deeppavlov.ai:8011
- PORT=8011

combined-classification:
command: ["nginx", "-g", "daemon off;"]
build:
context: dp/proxy/
dockerfile: Dockerfile
environment:
- PROXY_PASS=proxy.deeppavlov.ai:8087
- PORT=8087

sentence-ranker:
command: [ "nginx", "-g", "daemon off;" ]
build:
Expand Down
2 changes: 1 addition & 1 deletion common/prompts/casual_email.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"prompt": "Write an casual-style email using draft notes. You should warmly greet the addressee first. Then utilize given draft notes to formulate statements and requests to the addressee. At the end, write that you are waiting for a responding email, and thank the addressee for the reply.\nKeep it casual and at most 100 words."
"prompt": "You are an AI assistant. You can write an casual-style email using draft notes. You should warmly greet the addressee first. Then utilize given draft notes to formulate statements and requests to the addressee. At the end, write that you are waiting for a responding email, and thank the addressee for the reply.\nKeep it casual and at most 100 words."
}
2 changes: 1 addition & 1 deletion common/prompts/meeting_notes.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"prompt": "Summarize the script of a meeting and present it as a list of separate bullet points. You should also correct grammatical mistakes. You should also highlight unanswered questions."
"prompt": "You are an AI assistant. You take meeting notes and write a concise retelling of the meeting in a structured way. You may use bullet points. Write no more than 200 words."
}
2 changes: 1 addition & 1 deletion common/prompts/official_email.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"prompt": "Write an official-style email using draft notes. You should warmly greet the addressee first. Then utilize given draft notes to formulate statements and requests to the addressee. At the end, write that you are waiting for a responding email, and thank the addressee for the reply.\nKeep it official and at most 200 words."
"prompt": "You are an AI assistant. You can write an official-style email using draft notes. You should warmly greet the addressee first. Then utilize given draft notes to formulate statements and requests to the addressee. At the end, write that you are waiting for a responding email, and thank the addressee for the reply.\nKeep it official and at most 200 words."
}
2 changes: 1 addition & 1 deletion common/prompts/plan_for_article.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"prompt": "Write a bullet-points plan for an article on Medium on the given topic.\nKeep it detailed but at most 100 words."
"prompt": "You are an AI assistant. You can write a bullet-points plan for an article on Medium on the given topic.\nKeep it detailed but at most 100 words."
}
2 changes: 1 addition & 1 deletion components/2bbCQcfY2YYjHtMCRFHImG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gpu_usage: null
group: skills
connector:
protocol: http
timeout: 10.0
timeout: 20.0
url: http://dff-meeting-notes-prompted-skill:8155/respond
dialog_formatter:
name: state_formatters.dp_formatters:dff_prompted_skill_formatter
Expand Down
2 changes: 1 addition & 1 deletion components/6vJmuO1GbwgIDIBc3hrwm0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gpu_usage: null
group: skills
connector:
protocol: http
timeout: 10.0
timeout: 20.0
url: http://dff-plan-for-article-prompted-skill:8157/respond
dialog_formatter:
name: state_formatters.dp_formatters:dff_prompted_skill_formatter
Expand Down
2 changes: 1 addition & 1 deletion components/8qwxH2SZE4EhXS5JqqZPkm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gpu_usage: null
group: skills
connector:
protocol: http
timeout: 10.0
timeout: 20.0
url: http://dff-official-email-prompted-skill:8156/respond
dialog_formatter:
name: state_formatters.dp_formatters:dff_prompted_skill_formatter
Expand Down
2 changes: 1 addition & 1 deletion components/W6hdAGshQyMwdQukRXXuKA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gpu_usage: null
group: skills
connector:
protocol: http
timeout: 10.0
timeout: 20.0
url: http://dff-dream-persona-davinci3-prompted-skill:8137/respond
dialog_formatter:
name: state_formatters.dp_formatters:dff_prompted_skill_formatter
Expand Down
2 changes: 1 addition & 1 deletion components/mJFsrLmq1C2Q7bw7W6QnbT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ gpu_usage: null
group: skills
connector:
protocol: http
timeout: 10.0
timeout: 20.0
url: http://dff-casual-email-prompted-skill:8154/respond
dialog_formatter:
name: state_formatters.dp_formatters:dff_prompted_skill_formatter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"max_tokens": 128,
"max_tokens": 256,
"temperature": 0.4,
"top_p": 1.0,
"frequency_penalty": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SERVICE_PORT: 8154
SERVICE_NAME: dff_casual_email_prompted_skill
PROMPT_FILE: common/prompts/casual_email.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 10
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ compose:
SERVICE_NAME: dff_casual_email_prompted_skill
PROMPT_FILE: common/prompts/casual_email.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 10
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SERVICE_PORT: 8137
SERVICE_NAME: dff_dream_persona_prompted_skill
PROMPT_FILE: common/prompts/dream_persona.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 10
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ compose:
SERVICE_NAME: dff_dream_persona_prompted_skill
PROMPT_FILE: common/prompts/dream_persona.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 10
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SERVICE_PORT: 8155
SERVICE_NAME: dff_meeting_notes_prompted_skill
PROMPT_FILE: common/prompts/meeting_notes.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 10
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ compose:
SERVICE_NAME: dff_meeting_notes_prompted_skill
PROMPT_FILE: common/prompts/meeting_notes.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 10
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SERVICE_PORT: 8156
SERVICE_NAME: dff_official_email_prompted_skill
PROMPT_FILE: common/prompts/official_email.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 10
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ compose:
SERVICE_NAME: dff_official_email_prompted_skill
PROMPT_FILE: common/prompts/official_email.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 10
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SERVICE_PORT: 8157
SERVICE_NAME: dff_plan_for_article_prompted_skill
PROMPT_FILE: common/prompts/plan_for_article.json
GENERATIVE_SERVICE_URL: http://openai-api-davinci3:8131/respond
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003.json
GENERATIVE_TIMEOUT: 10
GENERATIVE_SERVICE_CONFIG: openai-text-davinci-003-long.json
GENERATIVE_TIMEOUT: 20
N_UTTERANCES_CONTEXT: 7
ENVVARS_TO_SEND: OPENAI_API_KEY,OPENAI_ORGANIZATION
Loading