We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我正确的填写了api地址及秘钥,并且通过抓包也返回了正确的结果,在nextchat等流式传输中api也可用,但是在本app上,会出现失败: 未能读取数据,因为它的格式不正确。以下是返回的结果: data: {"chatgpt_model":"gpt-4o-mini","choices":[{"delta":{"content":"The translation of ""},"finish_reason":null,"index":0,"logprobs":null}],"conversation_id":"6768d152-419c-8003-abfe-6668020ab470","created":"","id":"aa37f3bd-3b86-4740-b836-5ca20bfac855","object":"chat.completion.chunk","usage":null}
data: {"chatgpt_model":"gpt-4o-mini","choices":[{"delta":{"content":"支持手动设置 OpenAI"},"finish_reason":null,"index":0,"logprobs":null}],"conversation_id":"6768d152-419c-8003-abfe-6668020ab470","created":"","id":"aa37f3bd-3b86-4740-b836-5ca20bfac855","object":"chat.completion.chunk","usage":null}
可重现
点击openai翻译即可重现
com.izual.Easydict 2024-12-23--01-54-46-505.log
可以正确的识别api结果
No response
macos13.7
The text was updated successfully, but these errors were encountered:
Hello Wszhdg, Thank you for your first issue contribution 🎉
Sorry, something went wrong.
目前能怀疑的就是回复的请求头不一致,目前回复的请求头为:Content-Type: text/event-stream; charset=utf-8
Easydict 目前只保证符合 OpenAI 官方接口 数据格式的请求能成功,对于一些奇怪的第三方接口,验证失败是正常的。
你示例中数据格式,明显和官方不符,例如返回的模型字段名应该是 model,而不是 chatgpt_model,另外,created 字段应该是 integer 而不是 string 类型。
{ "chatgpt_model": "gpt-4o-mini", "choices": [ { "delta": { "content": "支持手动设置 OpenAI" }, "finish_reason": null, "index": 0, "logprobs": null } ], "conversation_id": "6768d152-419c-8003-abfe-6668020ab470", "created": "", "id": "aa37f3bd-3b86-4740-b836-5ca20bfac855", "object": "chat.completion.chunk", "usage": null }
No branches or pull requests
请先确认以下事项:
问题描述
我正确的填写了api地址及秘钥,并且通过抓包也返回了正确的结果,在nextchat等流式传输中api也可用,但是在本app上,会出现失败: 未能读取数据,因为它的格式不正确。以下是返回的结果:
data: {"chatgpt_model":"gpt-4o-mini","choices":[{"delta":{"content":"The translation of ""},"finish_reason":null,"index":0,"logprobs":null}],"conversation_id":"6768d152-419c-8003-abfe-6668020ab470","created":"","id":"aa37f3bd-3b86-4740-b836-5ca20bfac855","object":"chat.completion.chunk","usage":null}
data: {"chatgpt_model":"gpt-4o-mini","choices":[{"delta":{"content":"支持手动设置 OpenAI"},"finish_reason":null,"index":0,"logprobs":null}],"conversation_id":"6768d152-419c-8003-abfe-6668020ab470","created":"","id":"aa37f3bd-3b86-4740-b836-5ca20bfac855","object":"chat.completion.chunk","usage":null}
该问题是否可以稳定重现?
可重现
重现步骤
点击openai翻译即可重现
截图
运行日志(zip 文件)
com.izual.Easydict 2024-12-23--01-54-46-505.log
期望结果
可以正确的识别api结果
解决方案(可选)
No response
设备型号 && 系统版本
macos13.7
是否愿意提交 PR 解决该问题?
The text was updated successfully, but these errors were encountered: