feat: add LanceDB vector database provider

- Implemented LanceDBProvider for managing vector collections, including methods for creating, deleting, and searching collections.
- Added support for LanceDB configuration in VectorDBConfig.
- Introduced stub for LanceDB provider when not built with the appropriate tag.
- Updated provider initialization to include LanceDB as a supported type.
- Created types and interfaces for vector operations, including Vector, SearchRequest, and SearchResult.
- Added tests for VectorDBConfig unmarshalling and for ensuring proper error handling when LanceDB is not built.
- Updated enums to include LanceDB type and labels.
- Modified frontend enums to reflect the addition of LanceDB.
This commit is contained in:
mlogclub
2026-06-07 17:32:29 +08:00
parent 3439d20537
commit c3387ec4a9
15 changed files with 711 additions and 77 deletions
+4 -2
View File
@@ -3,11 +3,13 @@ package enums
type VectorDBType string
const (
VectorDBTypeQdrant VectorDBType = "qdrant"
VectorDBTypeQdrant VectorDBType = "qdrant"
VectorDBTypeLanceDB VectorDBType = "lancedb"
)
var vectorDBTypeLabelMap = map[VectorDBType]string{
VectorDBTypeQdrant: "Qdrant",
VectorDBTypeQdrant: "Qdrant",
VectorDBTypeLanceDB: "LanceDB",
}
func GetVectorDBTypeLabel(dbType VectorDBType) string {