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

Function GetCollection

pkg/qdrant/collection.go:64–82  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

62}
63
64func GetCollection(name string) (err error) {
65 response := &CommonResponse{}
66
67 body, err := Send(http.MethodGet, collectionApi+"/"+name, nil)
68 if err != nil {
69 common.Logger.Error(err.Error())
70 return
71 }
72
73 err = json.Unmarshal(body, &response)
74 if err != nil {
75 return
76 }
77 if response.Result == nil {
78 return errors.New(response.Status.(map[string]interface{})["error"].(string))
79 }
80 return
81
82}

Callers 2

initFunction · 0.85
TestGetCollectionFunction · 0.85

Calls 1

SendFunction · 0.70

Tested by 1

TestGetCollectionFunction · 0.68