createClientTools
Unpublished development API. This package is under development and is not available as a published release.
Turns ask tools into function tools for an app-owned session and keeps the calls that wait for
an answer. Create it once, pass tools to the session and the whole object to Chat as
clientTools. Stopping the run aborts a waiting call; nothing is persisted here.
A handler is not told its call ID, so a waiting call is paired with the transcript call of the same name and equal arguments, or else the oldest waiting call of that name. Identical calls are interchangeable, and a view always answers the arguments it was drawn with.
import { createClientTools } from '@threadplane/react/chat';Declaration · overload 1
export declare function createClientTools<const T extends Record<string, AskToolDefinition>>(definitions: T): ClientTools<T>;Type parameters
TRecord<string, AskToolDefinition>
Parameters
definitions· requiredT
Returns
ClientTools<T>