core[patch]: remove redundant imports (#28861)

`Graph` has been imported at Line: 62
This commit is contained in:
Wang Ran (汪然) 2024-12-23 23:31:23 +08:00 committed by GitHub
parent 8d9907088b
commit e5c9da3eb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 3 deletions

View File

@ -534,8 +534,6 @@ class Runnable(Generic[Input, Output], ABC):
def get_graph(self, config: Optional[RunnableConfig] = None) -> Graph:
"""Return a graph representation of this Runnable."""
from langchain_core.runnables.graph import Graph
graph = Graph()
try:
input_node = graph.add_node(self.get_input_schema(config))

View File

@ -279,7 +279,7 @@ def _create_subset_model_v2(
fn_description: Optional[str] = None,
) -> type[pydantic.BaseModel]:
"""Create a pydantic model with a subset of the model fields."""
from pydantic import ConfigDict, create_model
from pydantic import create_model
from pydantic.fields import FieldInfo
descriptions_ = descriptions or {}