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

[Bug] perplexity :[code: 400 | message: Cannot set both presence_penalty and frequency_penalty.] #1368

Closed
ConnorCHN opened this issue Feb 23, 2024 · 6 comments · Fixed by #2439
Labels
🐛 Bug Something isn't working | 缺陷 Inactive No response in 30 days | 超过 30 天未活跃 released

Comments

@ConnorCHN
Copy link

💻 系统环境

Windows

📦 部署环境

Vercel / Zeabur / Sealos

🌐 浏览器

Edge

🐛 问题描述

微信截图_20240223181100
微信截图_20240223181119
微信截图_20240223181436

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 ConnorCHN added the 🐛 Bug Something isn't working | 缺陷 label Feb 23, 2024
@lobehubbot
Copy link
Member

👀 @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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@ConnorCHN ConnorCHN changed the title [Bug] [Bug] perplexity :[code: 400 | message: Cannot set both presence_penalty and frequency_penalty.] Feb 23, 2024
@arvinxx
Copy link
Contributor

arvinxx commented Feb 23, 2024

@gijigae please help to check this issue~

@gijigae
Copy link
Contributor

gijigae commented Feb 23, 2024

Thanks @ConnorCHN for reporting the issue! @arvinxx , will add additional validation for models from Perplexity.

@gijigae
Copy link
Contributor

gijigae commented Feb 23, 2024

@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

@lobehubbot lobehubbot added the Inactive No response in 30 days | 超过 30 天未活跃 label Mar 25, 2024
@lobehubbot
Copy link
Member

@ConnorCHN

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 0.156.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 Inactive No response in 30 days | 超过 30 天未活跃 released
Projects
Status: Done
4 participants