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
Describe the bug
Every now and then, a type validation error is thrown for eval_duration.
AI_TypeValidationError: Type validation failed: Value: {"model":"gemma2:2b","created_at":"2025-02-10T18:30:57.020119Z","message":{"role":"assistant","content":""},"done_reason":"stop","done":true,"total_duration":150417167,"load_duration":33204875,"prompt_eval_count":96,"prompt_eval_duration":114000000,"eval_count":1}.
Error message: [
{
"code": "invalid_type",
"expected": "number",
"received": "undefined",
"path": [
"eval_duration"
],
"message": "Required"
}
]
at _TypeValidationError2.wrap (chunk-AHZXJXRI.js?v=9eef44bb:407:87)
at safeValidateTypes (chunk-AHZXJXRI.js?v=9eef44bb:874:34)
at safeParseJSON (chunk-AHZXJXRI.js?v=9eef44bb:909:30)
at Object.transform (ollama-ai-provider.js?v=9eef44bb:555:13)Caused by: ZodError: [
{
"code": "invalid_type",
"expected": "number",
"received": "undefined",
"path": [
"eval_duration"
],
"message": "Required"
}
]
at get error (chunk-AALBOWSK.js?v=9eef44bb:510:23)
at Object.validate (chunk-AHZXJXRI.js?v=9eef44bb:846:101)
at safeValidateTypes (chunk-AHZXJXRI.js?v=9eef44bb:868:31)
at safeParseJSON (chunk-AHZXJXRI.js?v=9eef44bb:909:30)
at Object.transform (ollama-ai-provider.js?v=9eef44bb:555:13)
To Reproduce
Send same set of messages multiple times (i.e. try sending where there is no new user message). Following is a sample payload:
{"model":"gemma2:2b","options":{"temperature":0},"messages":[{"content":"tell me an interesting fact","role":"user"},{"content":"Did you know that there's a species of jellyfish that's essentially immortal? \n\nThe **Turritopsis dohrnii**, also known as the \"immortal jellyfish,\" can revert back to its polyp stage after reaching sexual maturity, effectively starting its life cycle all over again. This means it can potentially live forever! 🤯\n\n\nLet me know if you want to hear another interesting fact! 😊\n","role":"assistant"}]}
Expected behavior
It shouldn't throw a validation error Screenshots
Additional context
This is only reproducible if there is no new new message attached in the messages array. I'm using this to implement "continue" behavior.
The text was updated successfully, but these errors were encountered:
Describe the bug
Every now and then, a type validation error is thrown for
eval_duration
.To Reproduce
Send same set of messages multiple times (i.e. try sending where there is no new user message). Following is a sample payload:
Expected behavior
It shouldn't throw a validation error
Screenshots
Additional context
This is only reproducible if there is no new new message attached in the messages array. I'm using this to implement "continue" behavior.
The text was updated successfully, but these errors were encountered: