Spaces:
Running
Running
Remove commented-out code and unnecessary dependencies from Chroma model
Browse files- app/models/chroma/__init__.py +23 -23
- app/requirements.txt +0 -3
app/models/chroma/__init__.py
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
-
"""Module for the Vector Database."""
|
2 |
-
from langchain_chroma import Chroma
|
3 |
-
from models.llm import EmbeddingsModel
|
4 |
|
5 |
-
vectorstore = Chroma(
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
)
|
10 |
|
11 |
-
# def create_or_get_collection(collection_name: str):
|
12 |
-
# """
|
13 |
-
# Creates a new collection or gets an existing collection from the Vector Database.
|
14 |
|
15 |
-
# Args:
|
16 |
-
# collection_name (str): The name of the collection.
|
17 |
|
18 |
-
# Returns:
|
19 |
-
# chromadb.Collection: The collection associated with the provided name.
|
20 |
-
# """
|
21 |
-
# chroma_client = chromadb.PersistentClient(path="models/chroma/data")
|
22 |
-
# collection = chroma_client.get_or_create_collection(collection_name)
|
23 |
-
# # try:
|
24 |
-
# # collection = chroma_client.create_collection(collection_name)
|
25 |
-
# # except chromadb.errors.UniqueConstraintError:
|
26 |
-
# # collection = chroma_client.get_collection(collection_name)
|
27 |
-
# return collection
|
|
|
1 |
+
# """Module for the Vector Database."""
|
2 |
+
# from langchain_chroma import Chroma
|
3 |
+
# from models.llm import EmbeddingsModel
|
4 |
|
5 |
+
# vectorstore = Chroma(
|
6 |
+
# embedding_function=EmbeddingsModel("all-MiniLM-L6-v2"),
|
7 |
+
# collection_name="email",
|
8 |
+
# persist_directory="models/chroma/data"
|
9 |
+
# )
|
10 |
|
11 |
+
# # def create_or_get_collection(collection_name: str):
|
12 |
+
# # """
|
13 |
+
# # Creates a new collection or gets an existing collection from the Vector Database.
|
14 |
|
15 |
+
# # Args:
|
16 |
+
# # collection_name (str): The name of the collection.
|
17 |
|
18 |
+
# # Returns:
|
19 |
+
# # chromadb.Collection: The collection associated with the provided name.
|
20 |
+
# # """
|
21 |
+
# # chroma_client = chromadb.PersistentClient(path="models/chroma/data")
|
22 |
+
# # collection = chroma_client.get_or_create_collection(collection_name)
|
23 |
+
# # # try:
|
24 |
+
# # # collection = chroma_client.create_collection(collection_name)
|
25 |
+
# # # except chromadb.errors.UniqueConstraintError:
|
26 |
+
# # # collection = chroma_client.get_collection(collection_name)
|
27 |
+
# # return collection
|
app/requirements.txt
CHANGED
@@ -18,8 +18,6 @@ certifi==2025.1.31
|
|
18 |
cffi==1.17.1
|
19 |
chardet==5.2.0
|
20 |
charset-normalizer==3.4.1
|
21 |
-
chroma-hnswlib==0.7.6
|
22 |
-
chromadb==0.6.3
|
23 |
click==8.1.8
|
24 |
coloredlogs==15.0.1
|
25 |
cryptography==44.0.2
|
@@ -68,7 +66,6 @@ jsonschema==4.23.0
|
|
68 |
jsonschema-specifications==2024.10.1
|
69 |
kubernetes==32.0.1
|
70 |
langchain==0.3.21
|
71 |
-
langchain-chroma==0.2.2
|
72 |
langchain-community==0.3.20
|
73 |
langchain-core==0.3.48
|
74 |
langchain-mongodb==0.5.0
|
|
|
18 |
cffi==1.17.1
|
19 |
chardet==5.2.0
|
20 |
charset-normalizer==3.4.1
|
|
|
|
|
21 |
click==8.1.8
|
22 |
coloredlogs==15.0.1
|
23 |
cryptography==44.0.2
|
|
|
66 |
jsonschema-specifications==2024.10.1
|
67 |
kubernetes==32.0.1
|
68 |
langchain==0.3.21
|
|
|
69 |
langchain-community==0.3.20
|
70 |
langchain-core==0.3.48
|
71 |
langchain-mongodb==0.5.0
|