add initial testing

This commit is contained in:
William Jeynes
2026-01-27 22:57:49 +00:00
parent fdf8be2414
commit a3201d17a2
11 changed files with 742 additions and 5 deletions
+8
View File
@@ -0,0 +1,8 @@
import type { ToolCall } from "@langchain/core/messages/tool";
import { task } from "@langchain/langgraph";
import { arithmeticToolsByName } from "../tools/arithmetic";
export const toolNode = task({ name: "callTool" }, async (toolCall: ToolCall) => {
const tool = arithmeticToolsByName[toolCall.name];
return tool.invoke(toolCall);
});