Skip to content

How to input multiple inputs in RunnableWithMessageHistory of LangChain? #25466

Answered by dosubot bot
JANGSOONMYUN asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there, @JANGSOONMYUN! I'm here to help you out 🤖

To correctly handle multiple inputs with RunnableWithMessageHistory in LangChain, you need to ensure that the RunnableWithMessageHistory is configured properly with the necessary keys for input messages, history messages, and any additional configuration required by the session history factory.

Here is an example of how to set up and invoke RunnableWithMessageHistory with multiple inputs:

from typing import List
from langchain_core.chat_history import BaseChatMessageHistory
from langchain_core.messages import BaseMessage, AIMessage, HumanMessage
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@JANGSOONMYUN
Comment options

@dosubot
Comment options

@jiange91
Comment options

@vsocrates
Comment options

Answer selected by JANGSOONMYUN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants