ActionPlannerOptions interface
Options used to configure an ActionPlanner
instance.
Properties
default |
The default prompt to use. |
enable |
If true, the feedback loop will be enabled for streaming responses. |
end |
Optional handler to run when a stream is about to conclude. |
feedback |
The feedback loop type. |
log |
If true, repair attempts will be logged to the console. |
max_repair_attempts | Maximum number of repair attempts to make. |
model | Model instance to use. |
prompts | Prompt manager used to manage prompts. |
start |
Optional message to send a client at the start of a streaming response. |
tokenizer | Optional tokenizer to use. |
Property Details
defaultPrompt
The default prompt to use.
defaultPrompt: string | ActionPlannerPromptFactory<TState>
Property Value
string | ActionPlannerPromptFactory<TState>
Remarks
This can either be the name of a prompt template or a function that returns a prompt template.
enableFeedbackLoop
If true, the feedback loop will be enabled for streaming responses.
enableFeedbackLoop?: boolean
Property Value
boolean
endStreamHandler
Optional handler to run when a stream is about to conclude.
endStreamHandler?: PromptCompletionModelResponseReceivedEvent
Property Value
feedbackLoopType
The feedback loop type.
feedbackLoopType?: "default" | "custom"
Property Value
"default" | "custom"
logRepairs
If true, repair attempts will be logged to the console.
logRepairs?: boolean
Property Value
boolean
Remarks
The default value is false.
max_repair_attempts
Maximum number of repair attempts to make.
max_repair_attempts?: number
Property Value
number
Remarks
The ActionPlanner uses validators and a feedback loop to repair invalid responses returned by the model. This value controls the maximum number of repair attempts that will be made before returning an error. The default value is 3.
model
prompts
startStreamingMessage
Optional message to send a client at the start of a streaming response.
startStreamingMessage?: string
Property Value
string
tokenizer
Optional tokenizer to use.
tokenizer?: Tokenizer
Property Value
Remarks
If not specified, a new GPTTokenizer
instance will be created.