diff options
Diffstat (limited to 'pkg/aflow/flow.go')
| -rw-r--r-- | pkg/aflow/flow.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkg/aflow/flow.go b/pkg/aflow/flow.go index 6325b2fd2..b4cbe2201 100644 --- a/pkg/aflow/flow.go +++ b/pkg/aflow/flow.go @@ -22,8 +22,9 @@ import ( // Actions are nodes of the graph, and they consume/produce some named values // (input/output fields, and intermediate values consumed by other actions). type Flow struct { - Name string // Empty for the main workflow for the workflow type. - Root Action + Name string // Empty for the main workflow for the workflow type. + Model string // The default Gemini model name to execute this workflow. + Root Action *FlowType } @@ -35,6 +36,12 @@ type FlowType struct { extractOutputs func(map[string]any) map[string]any } +// See https://ai.google.dev/gemini-api/docs/models +const ( + BestExpensiveModel = "gemini-3-pro-preview" + GoodBalancedModel = "gemini-3-flash-preview" +) + var Flows = make(map[string]*Flow) // Register a workflow type (characterized by Inputs and Outputs), @@ -88,6 +95,7 @@ func registerOne[Inputs, Outputs any](all map[string]*Flow, flow *Flow) error { actions: make(map[string]bool), state: make(map[string]*varState), } + ctx.requireNotEmpty(flow.Name, "Model", flow.Model) provideOutputs[Inputs](ctx, "flow inputs") flow.Root.verify(ctx) requireInputs[Outputs](ctx, "flow outputs") |
