ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
74.88k stars 58.95k forks source link

[Bug] claude角色bug #5104

Open wk222 opened 1 month ago

wk222 commented 1 month ago

📦 Deployment Method

Docker

📌 Version

2.13.1

💻 Operating System

Windows, Other Linux

📌 System Version

11

🌐 Browser

Edge

📌 Browser Version

121

🐛 Bug Description

因为我是通过oneapi,把chatgpt nextweb的openai GPT模型重定向成claude3.5 来使用,会遇到之前解决过的claude角色bug。 能不能让dockercompose 的yml 使用openai 形式的key和url同时可以使用claude3.5模型以及他特殊的角色管理,谢谢

{ "error": { "message": "messages: Unexpected role \"system\". The Messages API accepts a top-level system parameter, not \"system\" as an input message role. (request id: 202407251632314853703071740834)", "type": "invalid_request_error", "param": "", "code": null } } { "error": { "message": "messages: Unexpected role \"system\". The Messages API accepts a top-level system parameter, not \"system\" as an input message role. (request id: 2024072517231349157195880867053)", "type": "invalid_request_error", "param": "", "code": null } }

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

nextchat-manager[bot] commented 1 month ago

Please follow the issue template to update description of your issue.

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug]

lloydzhou commented 1 month ago

那通过将oneapi配置到ANTHROPIC_URL上面,走claude的逻辑,请求也通过ANTHROPIC_URL发到oneapi的接口试试呢?

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


How about configuring oneapi to ANTHROPIC_URL, following claude's logic, and sending requests to the oneapi interface through ANTHROPIC_URL?

wk222 commented 1 month ago

会出现url无效的问题{ "error": { "message": "Invalid URL (POST /v1/messages)", "type": "invalid_request_error", "param": "", "code": "" } } 如果能让custom model比如我用的claude3.5-sunset,指定url不默认走ANTHROPIC的格式而是走Openai Api的请求格式,可能就ok了。。

那通过将oneapi配置到ANTHROPIC_URL上面,走claude的逻辑,请求也通过ANTHROPIC_URL发到oneapi的接口试试呢?

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


There will be a problem with invalid url { "error": { "message": "Invalid URL (POST /v1/messages)", "type": "invalid_request_error", "param": "", "code": "" } } If you can make a custom model, such as the claude3.5-sunset I use, specify that the url does not follow the ANTHROPIC format by default but uses the Openai Api request format, it may be ok. . How about configuring oneapi to ANTHROPIC_URL, following claude's logic, and sending requests to the oneapi interface through ANTHROPIC_URL?

wk222 commented 1 month ago

nvalid URL (POST /v1/messages)", "type": "invalid_request_e

我把custom models 设置成claude-3-5-sonnet-20240620@OpenAI 暂时解决了,谢谢大佬

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


invalid URL (POST /v1/messages)", "type": "invalid_request I set the custom models to claude-3-5-sonnet-20240620@OpenAI and it solved the problem temporarily. Thank you, boss.

wk222 commented 1 month ago

nvalid URL (POST /v1/messages)", "type": "invalid_request_e

我把custom models 设置成claude-3-5-sonnet-20240620@OpenAI 暂时解决了,谢谢大佬

Sorry ,this situation occurr again { "error": { "message": "messages: first message must use the \"user\" role (request id: 202407281003344418736418246550)", "type": "invalid_request_error", "param": "", "code": null } }

image

wk222 commented 1 month ago

nvalid URL (POST /v1/messages)", "type": "invalid_request_e

我把custom models 设置成claude-3-5-sonnet-20240620@OpenAI 暂时解决了,谢谢大佬

Sorry ,this situation occurr again { "error": { "message": "messages: first message must use the "user" role (request id: 202407281003344418736418246550)", "type": "invalid_request_error", "param": "", "code": null } }

image

确实是,用自定义模型的方法,接口类型是openai,能够正常发送请求给oneapi,模型名称设置成正常claude3.5的名称,但是不会根据名称套用claude的角色解决方案,还是会出现角色bug