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.
Setting up the Llama's pen
From the course: Create Your Own Code Assistant with Llama 2, Node.js, and React.js
Setting up the Llama's pen
- [Instructor] In our Codespace, still in our backend directory, we are going to create a new service for our custom configuration. To do that, we're going to run the command nest g service and we're going to give it the name and custom-config. Hit enter and wait for that to complete. Let's clear the screen and take a look at what we've done. In our explorer, in our source folder, we now have a custom-config directory and we've automatically updated our app module to have the custom-config service. So let's look at what it's given us. We've got this new CustomConfig class. Let's add some code to it. We're going to completely replace this injectable with a regular export. We're going to import cosmicconfig. Then we're going to load our configuration from a file we defined. I called mine kuzco. Then we're going to search for path to find that file. If we can find that file, we'll log out the results. If there are results, we'll return the configuration. If not, we'll return a default…
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
-
-
-
-
-