Spaces:
Sleeping
Sleeping
Update chroma_utils.py
Browse files- chroma_utils.py +2 -0
chroma_utils.py
CHANGED
@@ -6,7 +6,9 @@ from typing import List
|
|
6 |
from langchain_core.documents import Document
|
7 |
import os
|
8 |
from langchain_google_genai import GoogleGenerativeAIEmbeddings
|
|
|
9 |
|
|
|
10 |
|
11 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200, length_function=len)
|
12 |
embedding_function = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
|
|
6 |
from langchain_core.documents import Document
|
7 |
import os
|
8 |
from langchain_google_genai import GoogleGenerativeAIEmbeddings
|
9 |
+
load_dotenv()
|
10 |
|
11 |
+
os.environ["GOOGLE_API_KEY"]=os.getenv("GOOGLE_API_KEY")
|
12 |
|
13 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200, length_function=len)
|
14 |
embedding_function = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|