How does Genkit determine which JSON spec to use? #702
Unanswered
ariel-pettyjohn
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Ah-ha, I think this is just because I wrapped the string literals as Zod literals in the enum but I'm matching against a plain string. I'll double-check tomorrow and update in case anyone else slips on this banana in the future. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, I really thought this was working as I expected before, but now I can't get enum/union types to validate. Can anyone give me a sanity check?
I have a simple flow that's supposed to identify the type of some text. For example, given the input
true
I would expect the responseboolean
.I get a FAILED_PRECONDITION error though:
It seems to have correctly identified "true" as boolean here, but still fails validation. Is this the expected behavior, because I expected it would validate for any string literal in the enum?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions