mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-27 06:18:05 +00:00
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:
@@ -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.'''
|
||||
|
@@ -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):
|
||||
@@ -62,7 +62,7 @@ class __ModuleName__Tool(BaseTool):
|
||||
.. code-block:: python
|
||||
|
||||
# TODO: output of invocation
|
||||
""" # noqa: E501
|
||||
""" # noqa: E501
|
||||
|
||||
# TODO: Set tool name and description
|
||||
name: str = "TODO: Tool name"
|
||||
|
Reference in New Issue
Block a user