From 8b7f5e1ec02ca651bd06dd91454ff58c2bd978d6 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Wed, 11 Sep 2024 13:38:39 -0400 Subject: [PATCH] core[patch]: Remove non relevant todos (#26332) Clean up TODO(0.3) --- libs/core/langchain_core/language_models/base.py | 4 ---- libs/core/langchain_core/runnables/configurable.py | 1 - libs/core/langchain_core/runnables/history.py | 3 --- 3 files changed, 8 deletions(-) diff --git a/libs/core/langchain_core/language_models/base.py b/libs/core/langchain_core/language_models/base.py index 6832b5fc5f9..0705f9e9f58 100644 --- a/libs/core/langchain_core/language_models/base.py +++ b/libs/core/langchain_core/language_models/base.py @@ -113,10 +113,6 @@ class BaseLanguageModel( Caching is not currently supported for streaming methods of models. """ - # Repr = False is consistent with pydantic 1 if verbose = False - # We can relax this for pydantic 2? - # TODO(0.3): Resolve repr for verbose - # Modified just to get unit tests to pass. verbose: bool = Field(default_factory=_get_verbosity, exclude=True, repr=False) """Whether to print out response text.""" callbacks: Callbacks = Field(default=None, exclude=True) diff --git a/libs/core/langchain_core/runnables/configurable.py b/libs/core/langchain_core/runnables/configurable.py index 112a70efca2..fdcd7d0e959 100644 --- a/libs/core/langchain_core/runnables/configurable.py +++ b/libs/core/langchain_core/runnables/configurable.py @@ -376,7 +376,6 @@ class RunnableConfigurableFields(DynamicRunnable[Input, Output]): Returns: List[ConfigurableFieldSpec]: The configuration specs. """ - # TODO(0.3): This change removes field_info which isn't needed in pydantic 2 config_specs = [] for field_name, spec in self.fields.items(): diff --git a/libs/core/langchain_core/runnables/history.py b/libs/core/langchain_core/runnables/history.py index e6db922730f..472e2d95b6d 100644 --- a/libs/core/langchain_core/runnables/history.py +++ b/libs/core/langchain_core/runnables/history.py @@ -375,9 +375,6 @@ class RunnableWithMessageHistory(RunnableBindingBase): def get_input_schema( self, config: Optional[RunnableConfig] = None ) -> Type[BaseModel]: - # TODO(0.3): Verify that this change was correct - # Not enough tests and unclear on why the previous implementation was - # necessary. from langchain_core.messages import BaseMessage fields: Dict = {}