Mistral ai 返回值语法错误
https://api.mistral.ai/v1/chat/completions
这是错误信息:
Parse error: FormatException: Unterminated string (at character 174)
...del":"mistral-large - latest","choices":[{ "index":0,"delta":{"role":"assistan
^
Data: {"id":"d01010e6d98c4ff8919f7329375fad66","object":"chat.completion.chunk","created":1745421814,"model":"mistral-large - latest","choices":[{"index":0,"delta":{"role":"assistan
希望能修复,感谢!
试试最新版本是否解决?把相关信息填入openai的接口中能否解决?
还是不行,依然返回类似的错误:
Request failed: Exception: Parse error: FormatException: Unterminated string (at character 174)
...del":"mistral-large-latest","choices":[{"index":0,"delta":{"role":"assistan
^
Data: {"id":"89bcbff2627f45e39bee1d747e0894b4","object":"chat.completion.chunk","created":1745740572,"model":"mistral-large-latest","choices":
[{"index":0,"delta":{"role":"assistan
问了下AI,说可能的问题如下。Mistral AI返回回复的方式可能跟其他LLM不太一样。
The most likely cause is that the anx-reader app's code is incorrectly handling the streaming response chunks.
It seems the app received an incomplete chunk of data from the network stream and immediately tried to parse it as complete JSON, leading to the Unterminated string error because the JSON structure was cut off mid-string.
把信息填入Gemini的接口中试试呢?看起来这和Gemini接口比较类似
试过了,也不行。 Qwen新的思考模型也出现类似的错误,不知道是不是同样的问题。
我也试过,deepseek、openai以及openrouter的免费api都不能用。都是这个问题
是的,应该是这个AI的返回方式不是标准的OpenAI兼容的格式导致的,之后修改下,目前我没有这个AI的key所以也没法测试
❓ This question has been automatically marked as stale because it has not had recent activity.
这个问题因为长时间没有活动而被自动标记为 stale。
It will be closed in 7 days if no further activity occurs. To keep it open:
- Provide the requested information or test files
- Add a comment with updates or clarifications
- Remove the stale label
如果没有进一步的活动,它将在 7 天后被关闭。要保持开放状态:
- 提供请求的信息或测试文件
- 添加包含更新或澄清的评论
- 移除 stale 标签
Thank you for your understanding! 感谢您的理解!
🔒 This question has been automatically closed due to lack of response.
这个问题因为缺乏回应而被自动关闭。
If you still need help:
- Provide the missing information and reopen this issue
- Create a new issue with complete details
- Make sure to include all requested information
如果您仍需要帮助:
- 提供缺失的信息并重新打开此 issue
- 创建包含完整详情的新 issue
- 确保包含所有请求的信息
Thank you! 谢谢!
🔒 This issue has been locked because it has been closed for 30 days.
此 issue 已被锁定,因为它已关闭 30 天。
If you believe this issue should be reopened, please create a new issue and reference this one.
如果您认为此 issue 应该重新打开,请创建新的 issue 并引用此问题。