Spaces:
Runtime error
Runtime error
Update file
Browse files- api/vector_index/base.py +1 -3
api/vector_index/base.py
CHANGED
|
@@ -1,11 +1,9 @@
|
|
| 1 |
# Class trung gian xử lý tác vụ tạo VectorIndex từ database
|
| 2 |
# Nhận vào các tham số: loại db, tên embedding_model
|
| 3 |
-
from api.vector_index import chroma
|
| 4 |
|
| 5 |
def get_vector_index(db_name, force_new = False):
|
| 6 |
if db_name == "chroma":
|
| 7 |
return chroma.ChromaVectorIndex(force_new)
|
| 8 |
-
if db_name == "milvus":
|
| 9 |
-
return milvus.MilvusVectorIndex(force_new)
|
| 10 |
else:
|
| 11 |
raise NotImplementedError("This type of index is not yet supported")
|
|
|
|
| 1 |
# Class trung gian xử lý tác vụ tạo VectorIndex từ database
|
| 2 |
# Nhận vào các tham số: loại db, tên embedding_model
|
| 3 |
+
from api.vector_index import chroma
|
| 4 |
|
| 5 |
def get_vector_index(db_name, force_new = False):
|
| 6 |
if db_name == "chroma":
|
| 7 |
return chroma.ChromaVectorIndex(force_new)
|
|
|
|
|
|
|
| 8 |
else:
|
| 9 |
raise NotImplementedError("This type of index is not yet supported")
|