-
Notifications
You must be signed in to change notification settings - Fork 596
【BugFix】completion接口echo回显支持 #3245
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
Merged
LiqinruiG
merged 58 commits into
PaddlePaddle:develop
from
AuferGachet:wenxin-tools-551
Aug 19, 2025
Merged
【BugFix】completion接口echo回显支持 #3245
LiqinruiG
merged 58 commits into
PaddlePaddle:develop
from
AuferGachet:wenxin-tools-551
Aug 19, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Thanks for your contribution! |
Merge branch 'wenxin-tools-551' of https://github.com/AuferGachet/FastDeploy into wenxin-tools-551
|
retry |
Merge branch 'wenxin-tools-551' of https://github.com/AuferGachet/FastDeploy into wenxin-tools-551
Merge branch 'wenxin-tools-551' of https://github.com/AuferGachet/FastDeploy into wenxin-tools-551
LiqinruiG
approved these changes
Aug 19, 2025
AuferGachet
added a commit
to AuferGachet/FastDeploy
that referenced
this pull request
Aug 19, 2025
【BugFix】completion接口echo回显支持 (PaddlePaddle#3245) * wenxin-tools-511,修复v1/completion无法回显的问题。 * 支持多prompt的回显 * 支持多prompt情况下的流式回显 * 补充了 completion 接口支持 echo 的单元测试 * pre-commit * 移除了多余的test文件 * 修复了completion接口echo支持的单测方法 * 补充了单元测试文件 * 补充单测 * unittest * 补充单测 * 修复单测 * 删除不必要的assert. * 重新提交 * 更新测试方法 * ut * 验证是否是正确思路单测 * 验证是否是正确思路单测 * 验证是否是正确思路单测3 * 优化单测代码,有针对性地缩小单测范围。 * 优化单测代码2,有针对性地缩小单测范围。 * 优化单测代码3,有针对性地缩小单测范围。 * support 'echo' in chat/completion. * update * update * update * update * update * update * 补充了关于tokenid的单元测试 * update * 修正index错误 * 修正index错误
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
本次支持了completion 接口的单/多prompt的echo回显:
具体而言,针对于v1/completion接口
请求:
curl -X POST http://127.0.0.1:8566/v1/completions \ -H "Content-Type: application/json" \ -d '{ "prompt": "以下是你的自我介绍:", "echo": true }'结果:(能够做到prompt拼接在回复文本之前)
..."text":"以下是你的自我介绍:\n这是我的第一篇博客,欢迎大家来阅读。\n我是来自2018级计算机科学与技术专业的刘文博。"...
实现相同功能,能够做到prompt拼接在第一包返回的文本之前。