langchainjs
langchainjs copied to clipboard
TavilySearch construct args act incorrectly when invoked
Checked other resources
- [x] I added a very descriptive title to this issue.
- [x] I searched the LangChain.js documentation with the integrated search.
- [x] I used the GitHub search to find a similar question and didn't find it.
- [x] I am sure that this is a bug in LangChain.js rather than my code.
- [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
const tool = new TavilySearch({
maxResults: 3,
includeAnswer: true,
});
console.log(tool.includeAnswer);//true
(async () => {
const res = await tool.invoke({
query: search,
});
console.log("result:", res.answer);//❌null
})();
Error Message and Stack Trace (if applicable)
No response
Description
The parameters I entered during construction did not work,not only the includeAnswer, the maxResults is also default(5) when response back but i set it 3
System Info
"@langchain/community": "^0.3.41", "@langchain/core": "^0.3.47", "@langchain/langgraph": "^0.2.64", "@langchain/openai": "^0.5.5", "@langchain/tavily": "^0.1.1", node:22.x
Hi @benjamincburns I think latest changes for this package are not published to npm. Can you please check??
@anadi45 my apologies for the oversight - you're correct - will try to get it out today!
Hi everyone, is this issue closed, or should I start working on it?
I think this issue has been solved.
I think this issue has been solved.
Thanks for confirming! Happy to re-open if folks still encounter problems here.