genkit
genkit copied to clipboard
[Go] Add `DefineSchema` and add support for referencing in Dotprompt
Describe the bug You should be able to define a schema in code and let it be referenced in Dotprompt files instead of defining an inline schema.
Please confirm my understanding before implementation:
- In genkit, add a func DefineSchema(r *registry.Registry, name string, structType any) error{...}
- In dotprompt, add a method (dp *Dotprompt) ResolveSchemaReferences(meta PromptMetadata) (PromptMetadata, error) {...}
Yes that sounds roughly correct.