(field_typing): introduce BaseChatModel to field_typing module for better organization and structure

📝 (constants): add BaseChatModel to LANGCHAIN_BASE_TYPES dictionary for consistency and completeness
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-19 20:23:15 -03:00
commit 23763f8795
2 changed files with 4 additions and 1 deletions

View file

@ -7,6 +7,7 @@ from .constants import (
BaseLLM,
BaseLoader,
BaseMemory,
BaseChatModel,
BaseOutputParser,
BasePromptTemplate,
BaseRetriever,
@ -80,4 +81,5 @@ __all__ = [
"TextSplitter",
"Tool",
"VectorStore",
"BaseChatModel",
]

View file

@ -1,5 +1,5 @@
from typing import Callable, Dict, Text, Union
from langchain_core.language_models.chat_models import BaseChatModel
from langchain.agents.agent import AgentExecutor
from langchain.chains.base import Chain
from langchain.memory.chat_memory import BaseChatMemory
@ -48,6 +48,7 @@ LANGCHAIN_BASE_TYPES = {
"BaseOutputParser": BaseOutputParser,
"BaseMemory": BaseMemory,
"BaseChatMemory": BaseChatMemory,
"BaseChatModel": BaseChatModel,
}
# Langchain base types plus Python base types
CUSTOM_COMPONENT_SUPPORTED_TYPES = {