From the course: OpenAI API for Python Developers

Unlock the full course today

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

Create a vector store and embeddings (Chroma)

Create a vector store and embeddings (Chroma)

From the course: OpenAI API for Python Developers

Create a vector store and embeddings (Chroma)

- [Instructor] Now after loading and splitting the documents into chunks, we want to create embeddings and load them into the vector store. So in order to be able to create embeddings, you got to make sure that you add to the scope. So I've added here, line 12, the open AI embeddings language model. And right here I have created an instance. So let's go back. We're going to find here the next part of the example, so that is the same basic example that we use. And so the next step will be to create and load embeddings to the Chroma vector store. And we're going to take from this line all the way down to this line. We're going to copy right here, and go back to our example like this. We just need to make a few adjustments. And here basically, so that's going to correspond to the documents, so the chunks of documents. And for the embedding, so let me replace the names. So I'm going to replace with embeddings. I'm going to stay simple. That's just going to be named embeddings, all right?…

Contents