From the course: Developing RAG Apps with LlamaIndex and Next.js
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Hands-on: Data with LlamaIndex
From the course: Developing RAG Apps with LlamaIndex and Next.js
Hands-on: Data with LlamaIndex
Alright, so I have this new project, new folder directory here called persist, and I added this data directly with Berkshire PDF again, what we've been using so far. And I put the AMV file again, ntsconfig.json. Again this is just to make it its own project for you to be able to separate everything, okay? Very good. And that's it. So what we'll do here is, let's go ahead and create a new file. call persistdata.ts, and I'm going to go ahead and let's go and get all of the imports that we need. So in this case, I'm also getting this storage context from defaults we're going to be using in a second here, as well as the context chat engine. All right, so the first thing we need to do we want to be able to pull the data in and then what we'll do is we are going to save it okay so let's create our main first and make sure that it's ready to go so first we need to set up the storage context so it knows where we're going to generate the files or the database essentially where this will be…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.