firebase / genkit

An open source framework for building AI-powered apps with familiar code-centric patterns. Genkit makes it easy to integrate, test, and deploy sophisticated AI features to Firebase or Google Cloud.
Apache License 2.0
644 stars 88 forks source link

[dotprompt] Always reload .prompt files in dev mode #566

Open mbleigh opened 2 months ago

mbleigh commented 2 months ago

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:

  1. We could stop rebooting the entire server when a .prompt file changes, speeding up iteration
  2. 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.

mbleigh commented 1 month ago

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.

cabljac commented 3 weeks ago

linking https://github.com/firebase/genkit/pull/842