Spaces:
Build error
Build error
Update rag.py
Browse files
rag.py
CHANGED
@@ -62,12 +62,12 @@ def document_splitting(config, docs):
|
|
62 |
|
63 |
def document_storage_chroma(chunks):
|
64 |
Chroma.from_documents(documents = chunks,
|
65 |
-
embedding = OpenAIEmbeddings(),
|
66 |
persist_directory = CHROMA_DIR)
|
67 |
|
68 |
def document_storage_mongodb(chunks):
|
69 |
MongoDBAtlasVectorSearch.from_documents(documents = chunks,
|
70 |
-
embedding = OpenAIEmbeddings(),
|
71 |
collection = collection,
|
72 |
index_name = MONGODB_INDEX_NAME)
|
73 |
|
|
|
62 |
|
63 |
def document_storage_chroma(chunks):
|
64 |
Chroma.from_documents(documents = chunks,
|
65 |
+
embedding = OpenAIEmbeddings(disallowed_special = ()),
|
66 |
persist_directory = CHROMA_DIR)
|
67 |
|
68 |
def document_storage_mongodb(chunks):
|
69 |
MongoDBAtlasVectorSearch.from_documents(documents = chunks,
|
70 |
+
embedding = OpenAIEmbeddings(disallowed_special = ()),
|
71 |
collection = collection,
|
72 |
index_name = MONGODB_INDEX_NAME)
|
73 |
|