Interface: ToolLoopConfig
Defined in: packages/core/src/utils/tool-loop.ts:17
Deprecated
The AI SDK handles tool loops internally via streamText() with maxSteps.
Use Baleybot.create() with tools instead. Will be removed in the next major version.
Properties
argsField?
optionalargsField?:string
Defined in: packages/core/src/utils/tool-loop.ts:29
Field in bot response that contains tool arguments (default: 'arguments')
botName?
optionalbotName?:string
Defined in: packages/core/src/utils/tool-loop.ts:35
Bot name for streaming events
conversationKey?
optionalconversationKey?:string
Defined in: packages/core/src/utils/tool-loop.ts:19
Key in state where conversation history is stored (default: 'conversationHistory')
onToolExecuted?
optionalonToolExecuted?: (toolName,args,result,ctx) =>void
Defined in: packages/core/src/utils/tool-loop.ts:31
Custom callback after tool execution
Parameters
toolName
string
args
any
result
any
ctx
Returns
void
processOptions?
optionalprocessOptions?:ProcessOptions
Defined in: packages/core/src/utils/tool-loop.ts:33
ProcessOptions for streaming events
toolCallValue?
optionaltoolCallValue?:string
Defined in: packages/core/src/utils/tool-loop.ts:25
Value that indicates a tool call (default: 'tool_call')
toolNameField?
optionaltoolNameField?:string
Defined in: packages/core/src/utils/tool-loop.ts:27
Field in bot response that contains tool name (default: 'tool_name')
turnsKey?
optionalturnsKey?:string
Defined in: packages/core/src/utils/tool-loop.ts:21
Key in state where tool execution results are stored (default: 'turns')
typeField?
optionaltypeField?:string
Defined in: packages/core/src/utils/tool-loop.ts:23
Field in bot response that indicates tool call (default: 'type')