diff --git a/src/funcchain/schema/types.py b/src/funcchain/schema/types.py index 1c2cf12..0bd26df 100644 --- a/src/funcchain/schema/types.py +++ b/src/funcchain/schema/types.py @@ -1,14 +1,12 @@ -from typing import Callable, Optional, Union +from typing import Callable, Union from langchain_core.chat_history import BaseChatMessageHistory from langchain_core.language_models import BaseChatModel -from langchain_core.messages import AIMessage, HumanMessage +from langchain_core.messages import AIMessage, BaseMessage from langchain_core.runnables import Runnable UniversalChatModel = Union[BaseChatModel, str, None] -ChatHandler = Runnable[HumanMessage, AIMessage] +ChatRunnable = Runnable[list[BaseMessage], AIMessage] ChatHistoryFactory = Callable[..., BaseChatMessageHistory] - -OptionalChatHistoryFactory = Optional[ChatHistoryFactory]