Spaces:
Runtime error
Runtime error
File size: 384 Bytes
bcc5b22 ec91ce8 bcc5b22 | 1 2 3 4 5 6 7 8 9 | # Class trung gian xử lý tác vụ tạo VectorIndex từ database
# Nhận vào các tham số: loại db, tên embedding_model
from api.vector_index import chroma
def get_vector_index(db_name, force_new = False):
if db_name == "chroma":
return chroma.ChromaVectorIndex(force_new)
else:
raise NotImplementedError("This type of index is not yet supported") |