FlowStep
This module the FlowStep class, which can call a language model, record run times, and optionally invoke callbacks on the results.
FlowStep
Bases: BaseFlowStep
Represents a specific step in a Flow.
A FlowStep calls a language model using a prompt template, records the run time, and optionally invokes callback functions on the results.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
The name of the flow step. |
required |
llm |
BaseLLM
|
The language model to be used in the flow step. |
required |
prompt_template |
PromptTemplate
|
Template for the prompt to be used with the language model. |
required |
callbacks |
list[BaseCallback]
|
Callbacks to be invoked within the flowstep |
None
|
Attributes:
Name | Type | Description |
---|---|---|
llm |
BaseLLM
|
The language model to be used in the flow step. |
prompt_template |
PromptTemplate
|
Template for the prompt to be used with the language model. |
required_keys |
set[str]
|
The keys required for the flow step to run. |