This commit is contained in:
Bagatur
2024-09-03 17:42:22 -07:00
parent 559d8a4d13
commit 6aac2eeab5
2 changed files with 5 additions and 5 deletions

View File

@@ -805,7 +805,7 @@ class ChatFireworks(BaseChatModel):
from typing import Optional
from langchain_fireworks import ChatFireworks
from langchain_core.pydantic_v1 import BaseModel, Field
from pydantic import BaseModel, Field
class AnswerWithJustification(BaseModel):
@@ -836,7 +836,7 @@ class ChatFireworks(BaseChatModel):
.. code-block:: python
from langchain_fireworks import ChatFireworks
from langchain_core.pydantic_v1 import BaseModel
from pydantic import BaseModel
class AnswerWithJustification(BaseModel):
@@ -923,7 +923,7 @@ class ChatFireworks(BaseChatModel):
.. code-block::
from langchain_fireworks import ChatFireworks
from langchain_core.pydantic_v1 import BaseModel
from pydantic import BaseModel
class AnswerWithJustification(BaseModel):
answer: str

View File

@@ -20,8 +20,8 @@ result=$(git -C "$repository_path" grep -E '^import pydantic|^from pydantic')
if [ -n "$result" ]; then
echo "ERROR: The following lines need to be updated:"
echo "$result"
echo "Please replace the code with an import from langchain_core.pydantic_v1."
echo "Please replace the code with an import from pydantic."
echo "For example, replace 'from pydantic import BaseModel'"
echo "with 'from langchain_core.pydantic_v1 import BaseModel'"
echo "with 'from pydantic import BaseModel'"
exit 1
fi