mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-26 16:43:35 +00:00
core: fix NameError (#23658)
**Description:** In the chat_models module of the language model, the import statement for BaseModel has been moved from the conditionally imported section to the main import area, fixing `NameError `. **Issue:** fix `NameError `
This commit is contained in:
parent
d2c7379f1c
commit
3904f2cd40
@ -54,7 +54,7 @@ from langchain_core.outputs import (
|
|||||||
RunInfo,
|
RunInfo,
|
||||||
)
|
)
|
||||||
from langchain_core.prompt_values import ChatPromptValue, PromptValue, StringPromptValue
|
from langchain_core.prompt_values import ChatPromptValue, PromptValue, StringPromptValue
|
||||||
from langchain_core.pydantic_v1 import Field, root_validator
|
from langchain_core.pydantic_v1 import BaseModel, Field, root_validator
|
||||||
from langchain_core.runnables import RunnableMap, RunnablePassthrough
|
from langchain_core.runnables import RunnableMap, RunnablePassthrough
|
||||||
from langchain_core.runnables.config import ensure_config, run_in_executor
|
from langchain_core.runnables.config import ensure_config, run_in_executor
|
||||||
from langchain_core.tracers._streaming import _StreamingCallbackHandler
|
from langchain_core.tracers._streaming import _StreamingCallbackHandler
|
||||||
@ -62,7 +62,6 @@ from langchain_core.utils.function_calling import convert_to_openai_tool
|
|||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from langchain_core.output_parsers.base import OutputParserLike
|
from langchain_core.output_parsers.base import OutputParserLike
|
||||||
from langchain_core.pydantic_v1 import BaseModel
|
|
||||||
from langchain_core.runnables import Runnable, RunnableConfig
|
from langchain_core.runnables import Runnable, RunnableConfig
|
||||||
from langchain_core.tools import BaseTool
|
from langchain_core.tools import BaseTool
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user