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

希望可以支持deepseek #70

Closed
wptoux opened this issue May 11, 2024 · 8 comments
Closed

希望可以支持deepseek #70

wptoux opened this issue May 11, 2024 · 8 comments

Comments

@wptoux
Copy link

wptoux commented May 11, 2024

Deepseek模型可以国内访问,比gpt-3.5效果好,而且成本更低。当前问题是model设置成deepseek-chat时,调用的不是chat接口,导致返回异常。

image
或许一种可能的修复方式是修改如下代码,把默认情况改成使用chat?

const isChat =
isWritelyService ||
settings.model.includes('turbo') ||
settings.model === 'gpt-4'

@anc95
Copy link
Owner

anc95 commented May 14, 2024

To be compatible with OpenAI, you can also use https://api.deepseek.com/v1 as the base_url. But note that the v1 here has NO relationship with the model's version.

试试改成 https://api.deepseek.com/v1

@wptoux
Copy link
Author

wptoux commented May 17, 2024

To be compatible with OpenAI, you can also use https://api.deepseek.com/v1 as the base_url. But note that the v1 here has NO relationship with the model's version.

试试改成 https://api.deepseek.com/v1

这个v1接口可能下线了。

image

@anc95
Copy link
Owner

anc95 commented May 17, 2024

https://api.deepseek.com/v1/chat/completions

我看你的截图里请求中少了一个 chat

@wptoux
Copy link
Author

wptoux commented May 22, 2024

image
v1/chat和chat的返回是一样的,似乎都是因为请求传的不是chat接口需要的messages,而是prompt。

@anc95
Copy link
Owner

anc95 commented May 22, 2024

image 是不是你的插件版本不对,应该一直用的是 messages

@wptoux
Copy link
Author

wptoux commented May 24, 2024

image
我看这个逻辑,似乎是只有gpt-4,名字里带turbo的,还有是writely service的,是走chat接口。

@anc95
Copy link
Owner

anc95 commented May 24, 2024

@wptoux 哦对,谢谢,我处理一下

@anc95
Copy link
Owner

anc95 commented May 29, 2024

@wptoux 商店已经更新了,你那边再试一试

@anc95 anc95 closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants