langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
92.02k stars 14.64k forks source link

DOC: <Issue related to /v0.2/docs/how_to/custom_tools/> #24475

Open owaist37 opened 1 month ago

owaist37 commented 1 month ago

URL

https://python.langchain.com/v0.2/docs/how_to/custom_tools/

Checklist

Issue with current documentation:

https://python.langchain.com/v0.2/docs/how_to/custom_tools/ Using any of the code for the tools on this page leads to a TypeError. For example using the code from https://python.langchain.com/v0.2/docs/how_to/custom_tools/#tool-decorator will give a TypeError: args_schema must be a subclass of pydantic BaseModel. Got: <class 'pydantic.v1.main.multiplySchema'> error. The same will happen for the rest of the functions that have been defined in the documentation.

Idea or request for content:

No response

baskaryan commented 1 month ago

What versions of langchain-core, pydantic, and python are you using? Unable to reproduce with latest langchain-core, pypdantic==1.10.17, and py3.11

owaist37 commented 1 month ago

pydantic==1.10.2 langchain==0.2.9 angchain-aws==0.1.11 langchain-community==0.2.7

python version is 3.10.14

keenborder786 commented 1 month ago

Please your langchain version 0.2.1.0

owaist37 commented 1 month ago

Hi updating langchain to 0.2.1.0 did not fix the issue but upgrading to python3.11 did

eyurtsev commented 1 month ago

@owaist37 include the output of: python -m langchain_core.sys_info. We're missing the langchain-core version from your report.