Skip to content

How can the client record historical messages without calling the LangChain environment #686

Answered by Ricardo-yyz
Ricardo-yyz asked this question in Q&A
Discussion options

You must be logged in to vote

Resolved. I compose this input and the server's reply into a key-value pair on the client, and then append it to the history list and send it back to the server, and the server defines a init function in the original class input to convert the returned data into a List composed of HumanMessage and AIMessage, so as to achieve the purpose of retaining historical messages without calling langchain related libraries on the server. If there is any other way, I would be happy to know.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Ricardo-yyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant