mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-27 14:26:48 +00:00
core[patch]: call RunnableConfigurableFields.model_rebuild() (#26118)
To fix a test in `langchain`
This commit is contained in:
@@ -18,6 +18,7 @@ from typing import (
|
|||||||
Union,
|
Union,
|
||||||
cast,
|
cast,
|
||||||
)
|
)
|
||||||
|
from typing import Mapping as Mapping
|
||||||
from weakref import WeakValueDictionary
|
from weakref import WeakValueDictionary
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict
|
from pydantic import BaseModel, ConfigDict
|
||||||
@@ -453,6 +454,9 @@ class RunnableConfigurableFields(DynamicRunnable[Input, Output]):
|
|||||||
return (self.default, config)
|
return (self.default, config)
|
||||||
|
|
||||||
|
|
||||||
|
RunnableConfigurableFields.model_rebuild()
|
||||||
|
|
||||||
|
|
||||||
# Before Python 3.11 native StrEnum is not available
|
# Before Python 3.11 native StrEnum is not available
|
||||||
class StrEnum(str, enum.Enum):
|
class StrEnum(str, enum.Enum):
|
||||||
"""String enum."""
|
"""String enum."""
|
||||||
|
Reference in New Issue
Block a user