Skip to content

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": "" }]

@paddle-bot
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
@codecov
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
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