oldweipro / claude-to-chatgpt

Claude 聊天接口适配到 OpenAI API 标准接口。
MIT License
102 stars 18 forks source link

code 500错误(需要修改模型名称) #22

Open cj1357 opened 9 months ago

cj1357 commented 9 months ago

image

cj1357 commented 9 months ago

造成这个错误的原因是模型名称变化了,我修改后测试已经没问题了

参考了https://github.com/KoushikNavuluri/Claude-API/issues/85 需要把请求的模型名称改成"claude-2.1" claude.go 56行

cj1357 commented 9 months ago

image 不过用chatgpt-next-web调用,返回的格式会带身份信息,这个如果能给优化一下就好了😺

spammenotinoz commented 9 months ago

The reason for this error is that the model name has changed, and I have modified the test to be fine

Reference KoushikNavuluri/Claude-API #85 Need to change the model name of the request to "claude-2.1" claude.go line 56

Thanks this works.

cj1357 commented 8 months ago

模型名称又发生了改变,需要换成"claude-2.0" https://github.com/oldweipro/claude-to-chatgpt/blob/182f543586cee4b4688ae6e21ce90df9cc31f212/model/claude.go#L56 注意不是原先的claude-2

参考了https://github.com/KoushikNavuluri/Claude-API/issues/91

caicaicaibeiqie commented 7 months ago

我在使用claude_api的send_message时遇到了同样的错误返回,更新了model问题依然存在,还有什么可能的参数问题吗?

cj1357 commented 7 months ago

我在使用claude_api的send_message时遇到了同样的错误返回,更新了model问题依然存在,还有什么可能的参数问题吗?

好像官方那边又更新了策略,改模型名称解决不了了,不知道怎么解决

caicaicaibeiqie commented 7 months ago

@cj1357 You are right, but I still need to decode the "headers" parameter of "send_message". Problem solved.