You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that Zod struggles to parse API responses at times.
Unexpected token 'D', \"[DONE]\" is not valid JSON",
I've only stumbled across this in our server logs and have not been able to properly reproduce this error.
Has anyone else come across this?
client
const mistral = new Mistral({ apiKey: apiKey, serverURL: customBaseURL });
const result = await mistral.chat.stream({
model,
messages: messages as MistralMessage[],
maxTokens,
});
error
{
"code": "custom",
"message": "malformed json: SyntaxError: Unexpected token 'D', \"[DONE]\" is not valid JSON",
"path": [
"data"
]
}
]
ZodError: [
{
"code": "custom",
"message": "malformed json: SyntaxError: Unexpected token 'D', \"[DONE]\" is not valid JSON",
"path": [
"data"
]
}
]
at get error [as error] (/usr/src/app/apps/someApp/dist/index.js:36801:27)
at _ZodObject.parse (/usr/src/app/apps/someApp/dist/index.js:36905:22)
at decoder (/usr/src/app/apps/someApp/dist/index.js:48267:27)
at parseEvent (/usr/src/app/apps/someApp/dist/index.js:41444:14)
at [Symbol.asyncIterator] (/usr/src/app/apps/someApp/dist/index.js:41341:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.start (/usr/src/app/apps/someApp/dist/index.js:56920:26)
The text was updated successfully, but these errors were encountered:
Hey thanks for reporting the issue.
Could you provide more info, if possible:
model name
queries samples
time window
So we can look if it correlate with a specific change in our API (if you want to not release those info publicly you can go through our platform help center here)
It seems that Zod struggles to parse API responses at times.
Unexpected token 'D', \"[DONE]\" is not valid JSON",
I've only stumbled across this in our server logs and have not been able to properly reproduce this error.
Has anyone else come across this?
client
error
The text was updated successfully, but these errors were encountered: