Skip to content

【BugFix】completion接口echo回显支持 #3470

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

Closed

Conversation

AuferGachet
Copy link
Contributor

本次支持了completion 接口的单/多prompt的echo回显:

  • 非流式上逻辑上支持,但最新版本报错,已修复。
  • 流式上最新版本不支持, 已做相应的支持。

具体而言,针对于v1/completion接口

  1. 非流式

请求:
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级计算机科学与技术专业的刘文博。"...

  1. 流式

实现相同功能,能够做到prompt拼接在第一包返回的文本之前。

Copy link

paddle-bot bot commented Aug 19, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Aug 19, 2025
@AuferGachet AuferGachet deleted the branch PaddlePaddle:release/2.1 August 19, 2025 11:33
@AuferGachet AuferGachet deleted the release/2.1 branch August 19, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants