genkit
genkit copied to clipboard
Fixing bugs in prompt rendering
This fixes the bug reported in https://github.com/firebase/genkit/issues/422 where renderPrompt does not preserve the output schema that the prompt function returns.
This also fixes the bug reported in https://github.com/firebase/genkit/issues/757 where Dotprompt.render() only accepts default options. With this change, the render and generate methods will accept any options, unless a model is also passed in the method, in which case it requires the custom options defined by that model.
Checklist (if applicable):
- [ ] Tested (manually, unit tested, etc.)
- [ ] Changelog updated
- [ ] Docs updated