Spaces:
Sleeping
Sleeping
| # 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") |