How do I accurately pass the output of one chainto another in Langchain? Specifically RetrievalQA to ConversationChain with chainlit
@cl.on_message async def main(message: cl.Message): counter = cl.user_session.get(“counter”, 0) if counter < 1: chain = cl.user_session.get(“chain”) cb = cl.AsyncLangchainCallbackHandler(stream_final_answer=True) cb.answer_reached = True response = await chain.acall({‘query’: message.content}, callbacks=[cb]) cl.user_session.set(“counter”, counter + 1) # Increment the counter # Extract the result if isinstance(response, dict) and ‘result’ in response: res = response[‘result’] else: res = response # […]