lobe-chat
lobe-chat copied to clipboard
[Bug] perplexity :[code: 400 | message: Cannot set both presence_penalty and frequency_penalty.]
💻 系统环境
Windows
📦 部署环境
Vercel / Zeabur / Sealos
🌐 浏览器
Edge
🐛 问题描述
issue report with Chinese : 如图所示,Vercel部署的,Perplexity的Key检查通过了的,但是对话报错 "code : 400", 报错内容提示frequency_penalty和presence_penalty不能同时设置。我把frequency_penalty 和 presence_penalty 同时设置为0.0 之后就不再报错了。
issue report with English: As shown in the picture, Vercel deployed, Perplexity's Key check passes, but the dialog reports "code : 400", which indicates that frequency_penalty and presence_penalty cannot be set at the same time. I set both frequency_penalty and presence_penalty to 0.0 and the error stopped.
🚦 期望结果
No response
📷 复现步骤
No response
📝 补充信息
No response
👀 @ConnorCHN
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。
@gijigae please help to check this issue~
Thanks @ConnorCHN for reporting the issue! @arvinxx , will add additional validation for models from Perplexity.
@arvinxx, again need your help. The issue is Perplexity requires either frequency_penalty or presence_penalty, not both. However, the DEFAULT_AGENT_CONFIG returns both values. What would be the best approach to conditionally pass only one value for the Perplexity models?
https://github.com/lobehub/lobe-chat/blob/ec76917a28981370ff673a8e53893e28f06f47ef/src/const/settings.ts#L30C1-L46C3
✅ @ConnorCHN
This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。
:tada: This issue has been resolved in version 0.156.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: