mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-16 09:34:30 -04:00
Sample code in RunnableWithMessageHistory not working through langserve #172
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @harris on GitHub (May 4, 2024).
I am using the code from the sample section of the
RunnableWithMessageHistory. it works perfectly if I invoke the chain manually by calling in python code directly. It DOES NOT work when calling through the langserve API. hopefully I am not mistaken but i believe the dictionary parsing in langserve probably not able to recognize the dict properly. Attach is the error I am encountering also.This works:
with the samples from the
RunnableWithMessageHistoryfileHowever, it will fail if call through the api through langserve.
This produces the following errors:
@harris commented on GitHub (May 4, 2024):
one thing I notice is the input in
BasePromptTemplate::invokewould get parsed properly withabilitywhileBasePromptTemplate::ainvokewould not include it.@harris commented on GitHub (May 4, 2024):
I am able to bypass the input_schema validation so the data would flow through in this PR: https://github.com/langchain-ai/langserve/pull/631
please let me know the proper fix.
@ZohaibRamzan commented on GitHub (Jun 10, 2024):
looking for the solution!!! Anyone able to manage session id based chat history(each user specific) or pipeline state(langgraph) if we deploy through langserve