From the course: Create Your Own Code Assistant with Llama 2, Node.js, and React.js
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Connecting the database to the API
From the course: Create Your Own Code Assistant with Llama 2, Node.js, and React.js
Connecting the database to the API
- [Instructor] We're back in our terminal, in our code space, still in our backend directory, in our code space, I've opened up the terminal and I'm going to generate another service. To do that. I'm going to call Nest G Service, and this one is going to be called Database Service. We're going to hit enter, and once that's generated, we can go take a look at what we've got. So let's clear the screen, open up our explorer, go to the backend, source, database, database service, and we've got another blank generic service. I'm going to replace that with code I've already written and we'll take a look. So on line one, we're going to import our Prisma Vector store. This is coming from Community Vector stores for Prisma. This will allow us to use Lang Chain to connect to our Prisma database. Then we've got our Injectable and our Config Service. Then we've got our Ollama service. Then we import the Prisma client. Next we're going to create our Injectable class database service. We have a…
Contents
-
-
-
Intro to large language models (LLMs)4m 49s
-
(Locked)
Llama 2 deep dive2m 1s
-
(Locked)
Setting up the Node environment6m 37s
-
(Locked)
Basic server and API3m 10s
-
(Locked)
Setting up the Llama's pen8m 20s
-
(Locked)
Data prep for Llama4m 32s
-
(Locked)
Loading the local code: Feeding the Llama5m 17s
-
(Locked)
Connecting the database to the API3m 4s
-
-
-
-
-