genkit icon indicating copy to clipboard operation
genkit copied to clipboard

[JS] Refactor "generate" into a pseudo-flow

Open mbleigh opened this issue 1 year ago • 1 comments

Right now generate lives in a liminal space between being some code wrapped around a model action and being a heavier "built-in flow" that handles things like tool loops and eventually retries etc.

I think the latter is more the direction we should take. Ideally generate would be a built-in flow/action such that in a trace you can see:

  1. Each iteration of a tool/reasoning loop as a separate LLM call in the trace
  2. Things like retries and output healing as separate steps as well

The generate methods then become syntactical wrappers around the generate action, transforming the inputs into a serializable form.

mbleigh avatar Jun 13 '24 22:06 mbleigh

@mbleigh I assigned it to yourself to bring it up in a discussion in Discord, and later if turned into an action item we can assign it to someone else

i14h avatar Jul 03 '24 22:07 i14h

Done

chrisraygill avatar Sep 05 '24 17:09 chrisraygill

Is this actually done? Where? @chrisraygill

apascal07 avatar Sep 05 '24 17:09 apascal07