From the course: Level up LLM applications development with LangChain and OpenAI

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Solution: Deploy a RESTful API

Solution: Deploy a RESTful API

- So we have created two routes and for this challenge I'd like you to create another route in order to deploy and run another chain. And this chain, it's going to be this one. So that we use to, search queries using a vector search index. So let's go back up to see how it is set up. So we are using this PDF document as editor source, and then we index the documents by using MongoDB Atlas vector search. So of course you need to make sure that all the credentials are properly configured right here. So you need an Atlas connection string, a collection name, and the name of your database. Okay, so let's go back. So we also have a prompt which is defined and we're going to run this chain from the server. We're going to create a route to deploy this runnable. So you just need to make sure that this is added to the scope here of the server. And so now we create a new route, we're going to copy from line 49 to 53 and add a new route right below. And so this chain is called retrieval chain…

Contents