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

fixed cutoff for AI utterance #426

Merged
merged 4 commits into from
Apr 26, 2023
Merged

fixed cutoff for AI utterance #426

merged 4 commits into from
Apr 26, 2023

Conversation

smilni
Copy link
Contributor

@smilni smilni commented Apr 26, 2023

NB: also increased memory limits for gptj, otherwise it does not build locally (exit with code 137)

@@ -60,7 +60,7 @@ def generate_responses(context, model, tokenizer, prompt, generation_params, con
for result in chat_history_ids:
output = tokenizer.decode(result, skip_special_tokens=True)
result_cut = output.replace(dialog_context + " ", "")
result_cut = GENERATIVE_ROBOT_TEMPLATE.sub("\n", result_cut).strip()
result_cut = GENERATIVE_ROBOT_TEMPLATE.split(result_cut)[0].strip()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
такие штуки надо локально чекать!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

common/universal_templates.py Show resolved Hide resolved
@@ -55,7 +55,7 @@ def generate_responses(context, model, tokenizer, prompt, continue_last_uttr=Fal
for result in chat_history_ids:
output = tokenizer.decode(result, skip_special_tokens=True)
result_cut = output.replace(dialog_context + " ", "")
result_cut = GENERATIVE_ROBOT_TEMPLATE.sub("\n", result_cut).strip()
result_cut = [x for x in GENERATIVE_ROBOT_TEMPLATE.split(result_cut) if x][0].strip()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@dilyararimovna dilyararimovna merged commit 02005d0 into dev Apr 26, 2023
10 of 11 checks passed
@dilyararimovna dilyararimovna deleted the fix/cut_after_bot_utt branch April 26, 2023 16:27
dilyararimovna pushed a commit that referenced this pull request May 1, 2023
* fixed cutoff for AI utterance

* fix for cases with extra ROBOT: etc

* style

* fix for newline
dilyararimovna added a commit that referenced this pull request May 12, 2023
* feat: update oasst model

* fix: model descriptions (#410)

* fix: sync dream_persona with demos (#413)

* Feat/llm-based and ranking-based dm (#405)

* feat: create files for llm based response selection

* feat: tests

* feat: algorithm

* fix: filter bad or toxic uttrs

* feat: ranking based response selector

* feat: model cards

* feat: ranking and refactoring

* feat: component files

* feat: component description

* feat: component description

* feat: use gpt-j resp selector

* feat: context

* feat: utilize hypotheses correctly

* fix: configs

* fix: configs

* fix: mapping

* fix: utilize ranker based selector

* fix: decay dummy

* fix: decay dummy

* fix: response

* fix: remove old selector

* fix: logs

* fix: getting annotations

* fix: code style

* fix: deepy uses resp selector

* fix: no language

* fix: ru usage

* fix: usage of formatter

* fix: codestyle

* fix: logs

* fix: after review

* fix: sync

* fix: add proxy usage (#416)

* feat: new proxy address (#417)

* prompt asks chatbot to be concise (otherwise problems with too long answers) (#418)

* added gptj to proxy file (#424)

* added gptj to proxy file

* return newline

* fix:dummy score decrease (#423)

* Feat/api keys from attributes (#415)

* fix: add attributes to formatter

* fix: try to get env vars from user utterance

* fix: none var values

* fix: logs correct

* fix: send lowercased keys

* prompt to ask fewer questions (#429)

* feat: universal dist requires api keys in request (#425)

* feat: template_template (#414)

* feat: template_template

* feat: readme

* fix: add chatgpt

* fix: tempalte does not use secret env

* fixed cutoff for AI utterance (#426)

* fixed cutoff for AI utterance

* fix for cases with extra ROBOT: etc

* style

* fix for newline

* feat: list of public dists (#433)

* fix: remove badlists from prompted dists (#431)

* added info about payments (#432)

* added info about payments

* better descs + reworked fashion prompt

* table update

* typo fix

* typo fix

* typo

* also increase fashion timeout in yml files

* forgot one file

* fix: no beauty in table

---------

Co-authored-by: dilyararimovna <dilyara.rimovna@gmail.com>

* timeout 30 for fairytales (#427)

* longer generation and timeout to reduce cutoffs (#420)

* longer generation and timeout to reduce cutoffs

* also updated in comp and pipe files

* change prompts for ai faq and nutrition (#430)

* reworked prompts to perform well with oasst

* solved conflict

* fix: tempalte dist and description (#435)

* Feat/multiskill assistant (#434)

* feat: multiskill assistant

* fix: prompt for meeting notes

* fix: waiting for

* fix: formatters

* fix: dot

* fix: secrets

* fix: add dream persona skill

* fix: add dream persona skill

* fix: add to public dists

* fix: folder name

* fix: description

* fix: component cards

* fix: component cards

* feat: thresholds for toxic_cls (#437)

* feat: thresholds for toxic_cls

* fix: codestyle

* fix: update pip (#439)

* fix: urllib neuralcoref

* fix: update pip

* fix: update pip in spacy annotator

* feat: smaller context for prompt selector (#438)

* feat: smaller context for prompt selector

* fix: index error

* Add compose definitions to component cards (#384)

* Fix requirements.txt (#84)

* fix itsdangerous requirements

* pin itsdangerous requirements for all flask==1.1.1 servers

* add compose definitions to component cards

* add host, port, endpoint to pipeline cards

* fix authors, add missing pipelines, add template

* add prompt-selector template, fix templates

* fix template keys

* remove unused comet-atomic component

* rework service, component cards

* move build args and env vars to environment.yml file

* fix empty proxy values

* fix pipeline confs

* fix component connector.annotations

* fix wait hosts in response_annotator_selectors service

* fix wait hosts in other services, environments

* fix response selectors, pipelines

* fix ports in response selector

* fix generative components

* fix: remove spelling and badlists from dream_persona_prompted

* fix: ignore all env_secret

* fix: new formatters for dff

* fix: universal dist does not utilize env_secret

* fix: multiskill components and timeouts

* fix: remove template_template distribution

* fix: deeppavlov assistant

* fix: formatters in components

* fix: volumes for resp selectors

* fix: correct filenames for multiskill

* fix: rullama7bru distribution

* fix pipelines after merge

* fix sentseg annotator source in pipelines

* fix agent services, components

* fix: sentseg and prompt selector do not wait for spelling

* fix: response_annotator_selectors card

* fix: timeouts

* fix: build args

* create services, components for prompt selector

* fix prompt selectors environment

* fix: flask server

* fix: path to prompt selector

* fix: required groups

* fix: required group skill_selectors

* fix: required elements

* fix: previous services

* fix: correct link to sentseg components card

* fix: correct link to sentseg components card

* remove unused prompt selector component

* remove old configs

* fix: rename files without dashes

---------

Co-authored-by: Andrii.Hura <54397922+AndriiHura@users.noreply.github.com>
Co-authored-by: Dilyara Baymurzina <dilyara.rimovna@gmail.com>

* Fix/remove duplicates (#443)

* fix: remove duplicating files

* fix: remove duplicating files

* Multiskill update (#440)

* long gen, long timeout, more prompts

* prompt update

* timeouts

* added longer context to persona

* longer max_tokens

* fix: increase to 20 sec

* fix: used config

* fix: dream persona openai

* fix:multiskill components

---------

Co-authored-by: dilyararimovna <dilyara.rimovna@gmail.com>

* Fix/increase all timeouts (#444)

* fix: increase all timeouts

* fix: increase all timeouts in pipelines

* fix: 7sec to 20 also

* fix: 5sec to 20 also for dream persona

* fix: rebase and change to new model

* fix: upd model

* fix: display name

---------

Co-authored-by: Nika Smilga <42929200+smilni@users.noreply.github.com>
Co-authored-by: Maxim Talimanchuk <mtalimanchuk@gmail.com>
Co-authored-by: Andrii.Hura <54397922+AndriiHura@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants