Skip to content

Commit

Permalink
Revert "Update compatibility guide for pydantic (#9396)" (#9417)
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan authored Aug 17, 2023
1 parent b11c233 commit 0c4683e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/extras/guides/pydantic_compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ the case of inheritance and in the case of passing objects to LangChain.
**YES**

```python
from langchain.pydantic_v1 import root_validator, validator
from pydantic.v1 import root_validator, validator

class CustomTool(BaseTool): # BaseTool is v1 code
x: int = Field(default=1)
Expand Down Expand Up @@ -84,7 +84,7 @@ CustomTool(

```python
from langchain.tools.base import Tool
from langchain.pydantic_v1 import BaseModel, Field # <-- Uses v1 namespace
from pydantic.v1 import BaseModel, Field # <-- Uses v1 namespace

class CalculatorInput(BaseModel):
question: str = Field()
Expand Down

0 comments on commit 0c4683e

Please sign in to comment.