Creates a tool that allows the LLM to run JavaScript code. It is run in a stateful JavaScript environment, with no access to the internet, the DOM, or any function that you have not explicitly defined.
API
export declare function useToolJavaScript(
{ runtime }: UseToolJavaScriptOptions ,
): Chat.Tool <
"javascript",
{
code: string;
},
unknown
>;useToolJavaScript
Chat.Tool<'javascript', {
code: string;
}, unknown>@param{ runtime, }:UseToolJavaScriptOptions@returnsChat.Tool<'javascript', {
code: string;
}, unknown>