MCPcopy Create free account
hub / github.com/coderabbit214/document-ai / init

Function init

pkg/qdrant/collection.go:22–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22func init() {
23 err := GetCollection(common.GlobalObject.Qdrant.CollectionName)
24 if err == nil {
25 return
26 }
27 createCollectionRequest := CreateCollectionRequest{Vectors: Vectors{
28 Size: 1536,
29 Distance: "Cosine",
30 }}
31 err = CreateCollection(common.GlobalObject.Qdrant.CollectionName, createCollectionRequest)
32 if err != nil {
33 panic("init error:" + err.Error())
34 }
35}
36
37// CreateCollection creates a collection in qdrant
38func CreateCollection(name string, createCollectionRequest CreateCollectionRequest) (err error) {

Callers

nothing calls this directly

Calls 2

GetCollectionFunction · 0.85
CreateCollectionFunction · 0.85

Tested by

no test coverage detected