Replies: 1 comment 1 reply
-
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.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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