From 797c9e92c82f8e843b321ec2167bb1678ced03cf Mon Sep 17 00:00:00 2001 From: Ankur Agarwal Date: Mon, 7 Aug 2023 03:41:45 +0530 Subject: [PATCH] #8786 Fixed: Callback handler disconnect in between (#8787) Fixes for #8786 @agola11 - Description: The flow of callback is breaking till the last chain, as callbacks are missed in between chain along nested path. This will help get full trace and correlate parent child relationship in all nested chains. - Issue: the issue #8786 - Dependencies: NA - Tag maintainer: @agola11 - Twitter handle: Agarwal_Ankur --- libs/langchain/langchain/chains/question_answering/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/langchain/langchain/chains/question_answering/__init__.py b/libs/langchain/langchain/chains/question_answering/__init__.py index 6e8976625d..8cb0cad82b 100644 --- a/libs/langchain/langchain/chains/question_answering/__init__.py +++ b/libs/langchain/langchain/chains/question_answering/__init__.py @@ -83,6 +83,7 @@ def _load_stuff_chain( document_variable_name=document_variable_name, verbose=verbose, callback_manager=callback_manager, + callbacks=callbacks, **kwargs, ) @@ -209,6 +210,7 @@ def _load_refine_chain( initial_response_name=initial_response_name, verbose=verbose, callback_manager=callback_manager, + callbacks=callbacks, **kwargs, )