Sync Method Issue on "Building RAG Agents with LLMs" course

Hi I was doing the “Building RAG Agents with LLM” course but I got this issue where the issue was that I can only use sync methods for output puller. Can someone help me here. What are some of issues I should focus my attention towards? @vkudlay



Here is some of my other code:

In addition, when I enable the retriever route and put in the retrieval chain instead of the standard llm in this form:

I receive this error:

What’s the next approach I should go for? @vkudlay

image
In addition, I tried RemoteRunnable by using a dictionary and my code got stuck in a loop

@vkudlay @TomNVIDIA Can you please help me out with this issue? What things should I look into as I am totally stumped

Thank you for your time

Sorry, this will require the DLI engineer to toubleshoot.

Hey @rijul.chaddha. Great effort!

Before going on, I will note that you do not need to reimplement all of these processing structures that are running server-side. The frontend microservice is already running them, so you should be able to just supply the routes and that populate the chains_dict in the running server. With that said, it sounds like you’re doing this as an exercise, so let me try to address the specific errors.

“OutputPuller only supports sync methods.” This likely has to do with the fact that you’re sending a chain which includes the output_puller over the langserve interface. output_puller does not do try to do everything necessary to fully interop with all of LC-stack, and langserve is making some assumptions about async capabilities since the endpoints need to be invoked as requests come in.

“HTTPStatusError.” I feel like the actual error message got lopped off somehow. Looking at your code, it does seem odd that you have an output-puller over the retriever. The retriever adds the input" and “context” keys to the state, but the output-puller assumes a stream of “output”-keyed values.

Hello @vkudlay, thank you for the reply! I was able to complete the course successfully