writely icon indicating copy to clipboard operation
writely copied to clipboard

希望可以支持deepseek

Open wptoux opened this issue 1 year ago • 1 comments

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

image 或许一种可能的修复方式是修改如下代码,把默认情况改成使用chat? https://github.com/anc95/writely/blob/3faed52cec9b5f52d8504bfef2f970585233eb3c/src/common/api/openai.ts#L70-L73

wptoux avatar May 11 '24 00:05 wptoux

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

anc95 avatar May 14 '24 05:05 anc95

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

wptoux avatar May 17 '24 00:05 wptoux

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

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

anc95 avatar May 17 '24 03:05 anc95

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

wptoux avatar May 22 '24 01:05 wptoux

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

anc95 avatar May 22 '24 03:05 anc95

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

wptoux avatar May 24 '24 02:05 wptoux

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

anc95 avatar May 24 '24 02:05 anc95

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

anc95 avatar May 29 '24 00:05 anc95