mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-29 07:19:59 +00:00
**Description:** This is a document change regarding integration with package `langchain-anthropic` for newly released websearch tool ([Claude doc](https://docs.anthropic.com/en/docs/build-with-claude/tool-use/web-search-tool)). Issue 1: The sample in [Web Search section](https://python.langchain.com/docs/integrations/chat/anthropic/#web-search) did not run. You would get an error as below: ``` File "my_file.py", line 170, in call model_with_tools = model.bind_tools([websearch_tool]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/langchain_anthropic/chat_models.py", line 1363, in bind_tools tool if _is_builtin_tool(tool) else convert_to_anthropic_tool(tool) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/langchain_anthropic/chat_models.py", line 1645, in convert_to_anthropic_tool input_schema=oai_formatted["parameters"], ~~~~~~~~~~~~~^^^^^^^^^^^^^^ KeyError: 'parameters' ``` This is because websearch tool is only recently supported in langchain-anthropic==0.3.13`, in [0.3.13 release](https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-anthropic%3D%3D0%22&expanded=true) mentioning: > anthropic[patch]: support web search (https://github.com/langchain-ai/langchain/pull/31157) Issue 2: The current doc has outdated package requirements for Websearch tool: "This guide requires langchain-anthropic>=0.3.10". Changes: - Updated the required `langchain-anthropic` package version (0.3.10 -> 0.3.13). - Added notes to user when using websearch sample. I believe this will help avoid future confusion from readers. **Issue:** N/A **Dependencies:** N/A **Twitter handle:** N/A
LangChain Documentation
For more information on contributing to our documentation, see the Documentation Contributing Guide