mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-07-22 17:25:22 -04:00
f2af82058f
- **Description:** I encountered an issue while running the existing sample code on the page https://python.langchain.com/docs/modules/agents/how_to/agent_iter in an environment with Pydantic 2.0 installed. The following error was triggered: ```python ValidationError Traceback (most recent call last) <ipython-input-12-2ffff2c87e76> in <cell line: 43>() 41 42 tools = [ ---> 43 Tool( 44 name="GetPrime", 45 func=get_prime, 2 frames /usr/local/lib/python3.10/dist-packages/pydantic/v1/main.py in __init__(__pydantic_self__, **data) 339 values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data) 340 if validation_error: --> 341 raise validation_error 342 try: 343 object_setattr(__pydantic_self__, '__dict__', values) ValidationError: 1 validation error for Tool args_schema subclass of BaseModel expected (type=type_error.subclass; expected_class=BaseModel) ``` I have made modifications to the example code to ensure it functions correctly in environments with Pydantic 2.0.
Website
This website is built using Docusaurus 2, a modern static website generator.
Installation
$ yarn
Local Development
$ yarn start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Build
$ yarn build
This command generates static content into the build directory and can be served using any static contents hosting service.
Deployment
Using SSH:
$ USE_SSH=true yarn deploy
Not using SSH:
$ GIT_USER=<Your GitHub username> yarn deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.
Continuous Integration
Some common defaults for linting/formatting have been set for you. If you integrate your project with an open-source Continuous Integration system (e.g. Travis CI, CircleCI), you may check for issues using the following command.
$ yarn ci