From 69a8ef269388608c394303d40754c240b0549b04 Mon Sep 17 00:00:00 2001 From: YHW Date: Fri, 15 Mar 2024 03:39:46 +0900 Subject: [PATCH] core: Runnable pass kwargs to _astream_log_implementation in astream_log (#19055) - **Description:** When calling the `_stream_log_implementation` from the `astream_log` method in the `Runnable` class, it is not handing over the `kwargs` argument. Therefore, even if i want to customize APIHandler and implement additional features with additional arguments, it is not possible. Conversely, the `astream_events` method normally handing over the `kwargs` argument. - **Issue:** https://github.com/langchain-ai/langchain/issues/19054 - **Dependencies:** - **Twitter handle:** if your PR gets announced, and you'd like a mention, we'll gladly shout you out! Co-authored-by: hyungwookyang --- libs/core/langchain_core/runnables/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/core/langchain_core/runnables/base.py b/libs/core/langchain_core/runnables/base.py index 8123aba94b2..7624828c3f1 100644 --- a/libs/core/langchain_core/runnables/base.py +++ b/libs/core/langchain_core/runnables/base.py @@ -815,6 +815,7 @@ class Runnable(Generic[Input, Output], ABC): diff=diff, stream=stream, with_streamed_output_list=with_streamed_output_list, + **kwargs, ): yield item