langchain-cli[patch]: Update to work with langchain 0.3 (#26403)

Update to work with pydantic 2 / langchain 0.3
This commit is contained in:
Eugene Yurtsev
2024-09-12 16:51:28 -04:00
committed by GitHub
parent 41a632a2ae
commit 85f673c7ea
2 changed files with 4 additions and 4 deletions

View File

@@ -116,7 +116,7 @@ class Chat__ModuleName__(BaseChatModel):
Tool calling:
.. code-block:: python
from langchain_core.pydantic_v1 import BaseModel, Field
from pydantic import BaseModel, Field
class GetWeather(BaseModel):
'''Get the current weather in a given location'''
@@ -144,7 +144,7 @@ class Chat__ModuleName__(BaseChatModel):
from typing import Optional
from langchain_core.pydantic_v1 import BaseModel, Field
from pydantic import BaseModel, Field
class Joke(BaseModel):
'''Joke to tell user.'''

View File

@@ -5,8 +5,8 @@ from typing import Optional, Type
from langchain_core.callbacks import (
CallbackManagerForToolRun,
)
from langchain_core.pydantic_v1 import BaseModel
from langchain_core.tools import BaseTool
from pydantic import BaseModel
class __ModuleName__Input(BaseModel):