From fdc2a0e9ef012291fd44c89e0902629db64a4ae7 Mon Sep 17 00:00:00 2001 From: anindyam1969 Date: Mon, 11 Dec 2023 11:44:12 +0530 Subject: [PATCH] Merged main with fork --- libs/core/langchain_core/runnables/history.py | 2 -- libs/core/tests/unit_tests/runnables/test_history.py | 1 - 2 files changed, 3 deletions(-) diff --git a/libs/core/langchain_core/runnables/history.py b/libs/core/langchain_core/runnables/history.py index 98c6b1a09123e..e0bb9281ffd5e 100644 --- a/libs/core/langchain_core/runnables/history.py +++ b/libs/core/langchain_core/runnables/history.py @@ -197,8 +197,6 @@ def get_input_schema( fields[self.input_messages_key] = (Sequence[BaseMessage], ...) else: fields["__root__"] = (Sequence[BaseMessage], ...) - if self.history_messages_key: - fields[self.history_messages_key] = (Sequence[BaseMessage], ...) return create_model( # type: ignore[call-overload] "RunnableWithChatHistoryInput", **fields, diff --git a/libs/core/tests/unit_tests/runnables/test_history.py b/libs/core/tests/unit_tests/runnables/test_history.py index c5f02c931337a..49f68825ba239 100644 --- a/libs/core/tests/unit_tests/runnables/test_history.py +++ b/libs/core/tests/unit_tests/runnables/test_history.py @@ -178,7 +178,6 @@ def test_output_dict() -> None: def test_get_input_schema_input_dict() -> None: class RunnableWithChatHistoryInput(BaseModel): input: Union[str, BaseMessage, Sequence[BaseMessage]] - history: Sequence[BaseMessage] runnable = RunnableLambda( lambda input: {