Skip to content

Commit

Permalink
feat: do not use sentence ranker url from env (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
dilyararimovna authored Jul 27, 2023
1 parent 5ae5c8b commit 906b361
Show file tree
Hide file tree
Showing 48 changed files with 47 additions and 4 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ INFILLING_SERVICE_URL=http://infilling:8106/respond
DIALOGPT_CONTINUE_SERVICE_URL=http://dialogpt:8125/continue
PROMPT_STORYGPT_SERVICE_URL=http://prompt-storygpt:8127/respond
STORYGPT_SERVICE_URL=http://storygpt:8126/respond
SENTENCE_RANKER_SERVICE_URL=http://sentence-ranker:8128/respond
FILE_SERVER_URL=http://files:3000
1 change: 0 additions & 1 deletion .env_ru
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ BADLIST_ANNOTATOR_URL=http://badlisted-words-ru:8018/badlisted_words_batch
DP_WIKIDATA_URL=http://wiki-parser-ru:8077/model
DP_ENTITY_LINKING_URL=http://entity-linking-ru:8075/model
FILE_SERVER_URL=http://files:3000
SENTENCE_RANKER_SERVICE_URL=http://dialogrpt-ru:8122/rank_sentences
2 changes: 2 additions & 0 deletions annotators/prompt_selector/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ COPY ./common/ /src/common/

ARG SERVICE_PORT
ENV SERVICE_PORT ${SERVICE_PORT}
ARG SENTENCE_RANKER_SERVICE_URL
ENV SENTENCE_RANKER_SERVICE_URL ${SENTENCE_RANKER_SERVICE_URL}
ARG N_SENTENCES_TO_RETURN
ENV N_SENTENCES_TO_RETURN ${N_SENTENCES_TO_RETURN}
ARG PROMPTS_TO_CONSIDER
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: ai_faq
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: ai_faq
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: deeppavlov
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: deeppavlov
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 1
PROMPTS_TO_CONSIDER: deepy,deepy_faq
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 1
PROMPTS_TO_CONSIDER: deepy,deepy_faq
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona,dream_faq
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona,dream_faq
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: fairytale
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: fairytale
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: fashion_stylist
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: fashion_stylist
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: life_coaching
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: life_coaching
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: marketing
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: marketing
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 2
PROMPTS_TO_CONSIDER: dream_persona,casual_email,meeting_notes,official_email,plan_for_article
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 2
PROMPTS_TO_CONSIDER: dream_persona,casual_email,meeting_notes,official_email,plan_for_article
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: nutrition
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: nutrition
FLASK_APP: server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://dialogrpt-ru:8122/rank_sentences
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona_ru
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ compose:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://dialogrpt-ru:8122/rank_sentences
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona_ru
FLASK_APP: server
Expand Down
1 change: 1 addition & 0 deletions annotators/prompt_selector/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
config_keys:
# SERVICE_PORT: int
SERVICE_NAME: str
SENTENCE_RANKER_SERVICE_URL: str
N_SENTENCES_TO_RETURN: int
PROMPTS_TO_CONSIDER: list
2 changes: 2 additions & 0 deletions annotators/relative_persona_extractor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM python:3.9.16-slim

ARG SERVICE_PORT
ENV SERVICE_PORT ${SERVICE_PORT}
ARG SENTENCE_RANKER_SERVICE_URL
ENV SENTENCE_RANKER_SERVICE_URL ${SENTENCE_RANKER_SERVICE_URL}
ARG N_SENTENCES_TO_RETURN
ENV N_SENTENCES_TO_RETURN ${N_SENTENCES_TO_RETURN}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SERVICE_PORT: 8133
SERVICE_NAME: relative_persona_extractor
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
FLASK_APP: server
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ compose:
args:
SERVICE_PORT: 8133
SERVICE_NAME: relative_persona_extractor
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
FLASK_APP: server
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: ai_faq
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: deeppavlov
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 1
PROMPTS_TO_CONSIDER: deepy
context: .
Expand Down
1 change: 1 addition & 0 deletions assistant_dists/dream/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona,dream_faq
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ services:
args:
SERVICE_PORT: 8133
SERVICE_NAME: relative_persona_extractor
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
context: .
dockerfile: ./annotators/relative_persona_extractor/Dockerfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona,dream_faq
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://dialogrpt-ru:8122/rank_sentences
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona_ru
context: .
Expand Down
1 change: 1 addition & 0 deletions assistant_dists/dream_robot/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: dream_persona,dream_faq
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,7 @@ services:
args:
SERVICE_PORT: 8133
SERVICE_NAME: relative_persona_extractor
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
context: .
dockerfile: ./annotators/relative_persona_extractor/Dockerfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: fairytale
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: fashion_stylist
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: life_coaching
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: marketing
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 2
PROMPTS_TO_CONSIDER: dream_persona,casual_email,meeting_notes,official_email,plan_for_article
context: .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:
args:
SERVICE_PORT: 8135
SERVICE_NAME: prompt_selector
SENTENCE_RANKER_SERVICE_URL: http://sentence-ranker:8128/respond
N_SENTENCES_TO_RETURN: 3
PROMPTS_TO_CONSIDER: nutrition
context: .
Expand Down
2 changes: 0 additions & 2 deletions skill_selectors/rule_based_selector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ ALWAYS_TURN_ON_ALL_SKILLS: whether to always turn on all skills. Avoid using thi
```

## Dependencies

- either candidate annotations by `SENTENCE_RANKER_ANNOTATION_NAME` or service `SENTENCE_RANKER_SERVICE_URL`.

0 comments on commit 906b361

Please sign in to comment.