How to check Langserve Rest API swagger for ConversationalRetrievalChain with memory. #8

Closed
opened 2026-02-16 00:18:03 -05:00 by yindo · 8 comments
Owner

Originally created by @NageshMashette on GitHub (Oct 25, 2023).

memory = ConversationBufferWindowMemory(k=4, memory_key="chat_history", return_messages=True)
qa = ConversationalRetrievalChain.from_llm(
llm,
db.as_retriever(search_kwargs={"k": 3}),
memory=memory
)

I created RAG QA with ConversationalRetrievalChain with memory, and did

app = FastAPI()
from langserve import add_routes
add_routes(app, qa)

its executed and given api also swagger UI also available how to test and in which endpoint i need to pass user question to get the response.

Originally created by @NageshMashette on GitHub (Oct 25, 2023). memory = ConversationBufferWindowMemory(k=4, memory_key="chat_history", return_messages=True) qa = ConversationalRetrievalChain.from_llm( llm, db.as_retriever(search_kwargs={"k": 3}), memory=memory ) I created RAG QA with ConversationalRetrievalChain with memory, and did app = FastAPI() from langserve import add_routes add_routes(app, qa) its executed and given api also swagger UI also available how to test and in which endpoint i need to pass user question to get the response.
yindo closed this issue 2026-02-16 00:18:03 -05:00
Author
Owner

@eyurtsev commented on GitHub (Oct 25, 2023):

Hi @NageshMashette,

  1. Docs are available here: localhost:800/docs. Check the examples directory to see client and server combinations. I suggest using the python RemoteRunnable client to interact with the server.
  2. The chain that you've implementing will NOT work correctly for what I'd consider server use since it has a single global state for the memory that will be shared between all users. We'll be releasing more documentation on how to set this up in the upcoming 1-2 weeks.
@eyurtsev commented on GitHub (Oct 25, 2023): Hi @NageshMashette, 1) Docs are available here: `localhost:800/docs`. Check the examples directory to see client and server combinations. I suggest using the python RemoteRunnable client to interact with the server. 2) The chain that you've implementing will NOT work correctly for what I'd consider server use since it has a single global state for the memory that will be shared between all users. We'll be releasing more documentation on how to set this up in the upcoming 1-2 weeks.
Author
Owner

@eyurtsev commented on GitHub (Oct 25, 2023):

Closing as this is not an issue but a question

@eyurtsev commented on GitHub (Oct 25, 2023): Closing as this is not an issue but a question
Author
Owner

@NageshMashette commented on GitHub (Oct 25, 2023):

https://github.com/langchain-ai/langserve/blob/main/examples/conversational_retrieval_chain/client.ipynb
without memory also im facing issue , i fallowed client code provided in example folder.

i used
**from langserve import RemoteRunnable
remote_runnable = RemoteRunnable("http://localhost:8000/")

await remote_runnable.ainvoke({"question": "Hi how are you?", "chat_history": ""})**

HTTPStatusError: Client error '404 Not Found' for url 'http://localhost:8000/invoke'
For more information check: https://httpstatuses.com/404 for {"detail":"Not Found"}

@NageshMashette commented on GitHub (Oct 25, 2023): https://github.com/langchain-ai/langserve/blob/main/examples/conversational_retrieval_chain/client.ipynb without memory also im facing issue , i fallowed client code provided in example folder. i used **from langserve import RemoteRunnable remote_runnable = RemoteRunnable("http://localhost:8000/") await remote_runnable.ainvoke({"question": "Hi how are you?", "chat_history": ""})** HTTPStatusError: Client error '404 Not Found' for url 'http://localhost:8000/invoke' For more information check: https://httpstatuses.com/404 for {"detail":"Not Found"}
Author
Owner

@murali-innerfit commented on GitHub (Oct 28, 2023):

faced same issue .After updating to latest version of langserve its started working for me.

@murali-innerfit commented on GitHub (Oct 28, 2023): faced same issue .After updating to latest version of langserve its started working for me.
Author
Owner

@NageshMashette commented on GitHub (Oct 30, 2023):

faced same issue .After updating to latest version of langserve its started working for me.

are you able to execute with memory?

@NageshMashette commented on GitHub (Oct 30, 2023): > faced same issue .After updating to latest version of langserve its started working for me. are you able to execute with memory?
Author
Owner

@navjotmakkar commented on GitHub (Feb 3, 2024):

Has anyone tried to combine conversation memory with langchain chain that is served using langserve?

@navjotmakkar commented on GitHub (Feb 3, 2024): Has anyone tried to combine conversation memory with langchain chain that is served using langserve?
Author
Owner

@eyurtsev commented on GitHub (Feb 3, 2024):

I don't recommend using the old memory abstractions. Instead take a look at the examples in the readme there are examples that show how to handle conversation history including multi user support.

@eyurtsev commented on GitHub (Feb 3, 2024): I don't recommend using the old memory abstractions. Instead take a look at the examples in the readme there are examples that show how to handle conversation history including multi user support.
Author
Owner

@NageshMashette commented on GitHub (Feb 6, 2024):

thanks @eyurtsev ok let me try it.

@NageshMashette commented on GitHub (Feb 6, 2024): thanks @eyurtsev ok let me try it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langserve#8