Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left
Apply NowLogin using Social Account
     Continue with GoogleLogin using your credentials
We’ll use a vector store called Chroma to store the documents chunks.
Chroma has three main parameters:
OpenAIEmbeddings
for our project.persist_directory
parameter. If you do not specify this parameter, then the docs will be stored in-memory.Importing Libraries:
from langchain_community.vectorstores import Chroma
from langchain_openai import OpenAIEmbeddings
Define a function get_chroma_client
that creates a chroma vector store instance.:
def get_chroma_client():
return Chroma(
collection_name="website_data",
embedding_function=OpenAIEmbeddings())
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
No hints are availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...