ActionPlannerOptions interface
Options used to configure an ActionPlanner
instance.
Properties
default |
The default prompt to use. |
end |
Optional handler to run when a stream is about to conclude. |
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.
endStreamHandler
Optional handler to run when a stream is about to conclude.
endStreamHandler?: PromptCompletionModelResponseReceivedEvent
Property Value
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.