new-api icon indicating copy to clipboard operation
new-api copied to clipboard

无法使用perplexity api

Open billylicn opened this issue 1 year ago • 5 comments

Routine Checks

  • [X] I have confirmed there are no similar issues currently
  • [X] I have confirmed I have upgraded to the latest version
  • [X] I have thoroughly read the project README, especially the FAQ section
  • [X] I understand and am willing to follow up on this issue, assist with testing and provide feedback
  • [X] I understand and acknowledge the above, and understand that project maintainers have limited time and energy, issues that do not follow the rules may be ignored or closed directly

Issue Description

在使用perplexity AI的api时测试报错错误: 模型 : bad response status code 404, body: 也无法聊天。我确认我使用了正确的apikey api地址填写https://api.perplexity.ai/chat/completions和https://api.perplexity.ai都不行

这里是perplexity 文档 https://docs.perplexity.ai/api-reference/chat-completions-post

Steps to Reproduce

Expected Result

Related Screenshots If none, please delete this section.

billylicn avatar Oct 09 '25 06:10 billylicn

渠道中有没有 perplexity.ai 可能没有支持这个渠道,它的请求url与默认的openai并不一样,所以提示404,openai的是带/v1的,

smecrusher avatar Oct 09 '25 18:10 smecrusher

经测试,在https://api.perplexity.ai/chat/completions加上#可以强制让newapi使用不带v1的地址,https://api.perplexity.ai/chat/completions#可正常调用

billylicn avatar Oct 10 '25 02:10 billylicn

经测试,在https://api.perplexity.ai/chat/completions加上#可以强制让newapi使用不带v1的地址,https://api.perplexity.ai/chat/completions#可正常调用

先这样用喽,现在确实会给加上v1

seefs001 avatar Oct 10 '25 07:10 seefs001

其实有perplexity渠道类型,前端忘记加了,下个版本补一下

Calcium-Ion avatar Oct 10 '25 07:10 Calcium-Ion

最新版已经加上perplexity渠道了,同时加了claude格式转换,不过我们没有pplx的密钥无法测试,有问题可以提新的issue

Calcium-Ion avatar Oct 11 '25 04:10 Calcium-Ion