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

[Gradio] fix llm gradio multi-turn dialogue bug #7992

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

JunnYu
Copy link
Member

@JunnYu JunnYu commented Feb 21, 2024

PR types

Bug fixes

PR changes

APIs

Description

修复开启chat template时候重复拼接query 和 history的问题。
image
image
第一次对话的时候:
query: "你好"
(这里的history不需要作为请求参数)history:[{"role": "user", "utterance": "你好" }, {"role": "bot", "utterance": "" }]
第二次对话的时候:
query: "今天天气怎么样?"
(这里的history需要[:-2]后作为请求参数)history:[{"role": "user", "utterance": "你好" }, {"role": "bot", "utterance": "很高兴为您服务" }, {"role": "user", "utterance": "今天天气怎么样?" }, {"role": "bot", "utterance": "" }]

Copy link

paddle-bot bot commented Feb 21, 2024

Thanks for your contribution!

@JunnYu JunnYu requested a review from wj-Mcat February 21, 2024 05:39
Copy link

codecov bot commented Feb 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5c9c8d3) 56.57% compared to head (303ed86) 56.57%.
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7992   +/-   ##
========================================
  Coverage    56.57%   56.57%           
========================================
  Files          589      589           
  Lines        89946    89946           
========================================
  Hits         50885    50885           
  Misses       39061    39061           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@wj-Mcat wj-Mcat left a comment

Choose a reason for hiding this comment

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

LGTM

@JunnYu JunnYu merged commit 9931d65 into PaddlePaddle:develop Feb 22, 2024
9 of 10 checks passed
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.

2 participants