mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-31 03:59:25 +00:00
core[patch]: pydantic 2.11 compat (#29963)
Resolves https://github.com/langchain-ai/langchain/issues/29951 Was able to reproduce the issue with Anthropic installing from pydantic `main` and correct it with the fix recommended in the issue. Thanks very much @Viicos for finding the bug and the detailed writeup!
This commit is contained in:
parent
0d3a3b99fc
commit
9ce07980b7
@ -18,6 +18,8 @@ from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|||||||
from typing_extensions import TypeAlias, TypedDict, override
|
from typing_extensions import TypeAlias, TypedDict, override
|
||||||
|
|
||||||
from langchain_core._api import deprecated
|
from langchain_core._api import deprecated
|
||||||
|
from langchain_core.caches import BaseCache
|
||||||
|
from langchain_core.callbacks import Callbacks
|
||||||
from langchain_core.messages import (
|
from langchain_core.messages import (
|
||||||
AnyMessage,
|
AnyMessage,
|
||||||
BaseMessage,
|
BaseMessage,
|
||||||
@ -29,8 +31,6 @@ from langchain_core.runnables import Runnable, RunnableSerializable
|
|||||||
from langchain_core.utils import get_pydantic_field_names
|
from langchain_core.utils import get_pydantic_field_names
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from langchain_core.caches import BaseCache
|
|
||||||
from langchain_core.callbacks import Callbacks
|
|
||||||
from langchain_core.outputs import LLMResult
|
from langchain_core.outputs import LLMResult
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user