core[patch]: call RunnableConfigurableFields.model_rebuild() (#26118)

To fix a test in `langchain`
This commit is contained in:
ccurme
2024-09-05 16:59:52 -04:00
committed by GitHub
parent e02b093d81
commit 5bbd5364f1

View File

@@ -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."""