-
Notifications
You must be signed in to change notification settings - Fork 786
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
对接部分中转 Anthropic 渠道的格式兼容性问题 #227
Comments
Title: About the "re-answer" function Currently, "re-answer" will generate a new reply based on the existing answer. When using the claude model to continue the conversation, it will prompt found multiple "assistant" roles in a row. Can you change the generation logic and replace the original answer with a new one? |
这是 Anthropic 的限制导致的,我猜测您的Anthropic上游应该是以 OpenAI 格式接入的中转。 Chat Nio 的 Anthropic 类型渠道会处理此问题,将所有回答合并为 Anthropic 的可接纳格式。 此错误并不是 Chat Nio 造成,同时也无法解决,请您咨询您的上游让其提供解决方案。
|
The upstream is claude called through the openai format, which is currently the most widely used method. After all, projects such as oneapi are used for transfer. Many front-end projects such as lobechat will not have this problem when calling the same API. I wonder how they solved it. Is it not possible for chatnio? |
能否判断并仅对OpenAI格式的Claude模型的回答进行处理,使其成为可被Claude模型接纳的格式。 ps:在这里交流一下对本项目的一些看法 但目前项目后台渠道管理页面是与oneapi类项目看齐的,需要根据不同厂商模型单独配置渠道,不能无脑对接oneapi,否则使用效果不理想(例如Claude、mj)。这对作为面向c端用户的项目来说,运营成本太高了。(即便是中转商也不能保证每个模型都使用的自建渠道,而非对接的经oneapi转发的上游) 本项目定义为“下一代 AI 一站式 B/C 端解决方案”,但目前提供api中转服务的oneapi类项目生态已很完善,中转供应商人手一个。因此建议,开发重点优先放到C端功能完善,以及对oneapi类项目的适配上。 由衷希望项目越做越好😘 @zmh-program |
Is it possible to determine and process only the answers of the Claude model in the OpenAI format so that they become a format acceptable to the Claude model. ps: Share some views on this project here However, the current project backend channel management page is in line with oneapi projects. Channels need to be configured separately according to different manufacturers' models. You cannot connect to oneapi without thinking, otherwise the use effect will not be ideal (such as Claude, mj). For a project targeting c-end users, the operating cost is too high. (Even the transit agent cannot guarantee that each model uses a self-built channel instead of the connected upstream forwarded by oneapi) This project is defined as a "next-generation AI one-stop B/C solution", but currently the oneapi project ecology that provides api transfer services is already complete, and the transfer supplier has one at hand. Therefore, it is recommended that the development focus should be given to improving the C-side functions and adapting to oneapi projects. I sincerely hope that the project will get better and better😘 @zmh-program |
这其实是 One API 的设计不完善,并且 One 二开的开源的 New API 修复了此漏洞。如果 Chat Nio 考虑插手的话,因为 One API 是以 OpenAI 格式接入的,如果 chatnio 对 openai 格式进行处理,那么所有 openai 格式的渠道都会应用此规则,原本不是 claude 也会变成 claude 的 prompt 格式,或者有什么好的建议? |
This is actually due to the imperfect design of One API, and the open source New API of One has fixed this vulnerability. If Chat Nio considers getting involved, because the One API is accessed in the OpenAI format, if chatnio processes the openai format, then all channels in the openai format will apply this rule, and the original ones that are not claude will also become claude's prompt format, or Any good suggestions? |
因为 chatnio 不知道上游 one api 他接入的是不是 anthropic 渠道类型变成的 openai 格式,只能知道这只是一个 openai 类型的渠道。 |
Because chatnio doesn’t know whether the upstream one api is connected to the openai format from the anthropopic channel type, it can only know that this is just an openai type channel. |
你没有好办法我就更不懂了,我只需要提问题,你要考虑的就多了,哈哈哈 |
If you don’t have a good solution, I don’t understand it even more. I just need to ask questions, and you have a lot to think about, hahaha. |
或者 我可以在openai类型的渠道里加个【应用 Anthropic 中转格式兼容】 |
Or I can add [application Anthropic transfer format compatible] to the openai type channel. |
可以解决问题就行诶 |
As long as it can solve the problem |
同样也可以参考一下 #237 的方案,将上游换成one hub/new api/shell api, 现在只有one api有这个bug |
此为上游问题,可以加钱对您特殊的上游渠道做单独处理。 |
This is an upstream issue, and you can add money to handle your special upstream channel individually. |
目前“重新回答”会在现有回答的基础上生成一条新的回复,在使用claude模型时继续对话,会提示found multiple "assistant" roles in a row。
能否改变生成逻辑,用新回复替换原有回答
The text was updated successfully, but these errors were encountered: