Skip to main content

Interface: UseToolsProps

batteries/use-tools.UseToolsProps

Properties to be passed to the UseTools component.

Properties

fallback

fallback: Node

A fallback response to use if the AI doesn't think any of the tools are relevant.

Defined in

packages/ai-jsx/src/batteries/use-tools.tsx:137


query

query: string

A query the AI will use to decide which tool to use, and what parameters to invoke it with.

Defined in

packages/ai-jsx/src/batteries/use-tools.tsx:132


tools

tools: Record<string, Tool>

The tools the AI can use.

Defined in

packages/ai-jsx/src/batteries/use-tools.tsx:127


userData

Optional userData: string

User data the AI can use to determine what parameters to invoke the tool with.

For instance, if the user's query can be "what's the weather like at my current location", you might pass userData as { "location": "Seattle" }.

Defined in

packages/ai-jsx/src/batteries/use-tools.tsx:144