Tool doesnt invoke #6991
Unanswered
lakshya29154
asked this question in
Q&A
Replies: 1 comment 2 replies
-
To invoke a tool in LangChainJS, you should use the
Here's an example of how you might set this up: // Assuming you have a tool instance created somewhere in your code
const toolInstance = new YourToolClass(); // Replace with your actual tool class
// Invoke the tool with the input
const result = await toolInstance.invoke({
input: {
url: "/home/lib/application/pdf",
question: "I am from pdf"
}
});
console.log(result); Make sure that your tool class is correctly set up to handle the |
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.
-
Checked other resources
Commit to Help
Example Code
Description
I am sending the api with payload
{
"input": {
"url": "/home/lib/application/pdf",
"question": "I am from pdf"
}
}
But my tool is not invoking how to invoke this tool
System Info
windows
node - 20
Beta Was this translation helpful? Give feedback.
All reactions