Replies: 1 comment 2 replies
-
I request if possible for someone to have a look and check if I am making any mistake |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Do we have any example of LanGraph (especially Reflection Pattern) that uses custom Tools created by deriving from DynamicStructuralTool.
Below is the code that I have and getting the error "Error: ToolNode only accepts AIMessages as input."
`import { DynamicStructuredTool } from "@langchain/core/tools";
import { AzureChatOpenAI } from "@langchain/openai";
import { z } from 'zod';
import { ToolNode } from "@langchain/langgraph/prebuilt";
import { Annotation, END, MemorySaver, START, StateGraph } from "@langchain/langgraph";
import { BaseMessage, HumanMessage } from "@langchain/core/messages";
export async function TestCustomToolsWithLangGraph(userInputText: string) {
dotenv.config();
console.log("User Query: ", userInputText);
}
TestCustomToolsWithLangGraph("Write code to create a 3D solid cube");`
Beta Was this translation helpful? Give feedback.
All reactions