genkit
genkit copied to clipboard
[Go] [Draft] Added input/output validation for flows and actions and model output conformance.
Summary of changes:
- Flattened input schemas so the dev UI can auto-fill values for required fields.
- Made
Partfields exported becauseinferJSONSchemawasn't generating schema for them correctly which failed validation. - Added input validation pre-JSON unmarshaling to
runJSONfor both flows and actions. This is necessary because the unmarshaling throws away unknown/invalid fields and we want to enforce clean correct inputs. TODO: Display this error nicely in dev UI -- right now, it's unreadable and you need to look in the terminal for the actual error. - Added input/output validation to the core
Runmethod for actions andExecutemethod for flows. - Added output conformance to
Generatemethods for model actions.