genkit
genkit copied to clipboard
[dotprompt] Always reload .prompt files in dev mode
I suggest that when NODE_ENV=development (or GENKIT_ENV=dev) .prompt files should be automatically reloaded from disk before each invocation. This would be beneficial for a few reasons:
- We could stop rebooting the entire server when a
.promptfile changes, speeding up iteration - There would be less chance of "stale prompts" which seems to happen to me relatively frequently though I'm not sure why
To accomplish this I think we need the proxy ref construct proposed in #513, but once we had that it would be pretty trivial.
Update on this: see #744 which is honestly even more annoying than stale prompts because it actually breaks the flow of the server. Let's solve both of these problems.
linking https://github.com/firebase/genkit/pull/842
https://github.com/firebase/genkit/pull/1380