Open theoneLee opened 11 months ago
I run Demo, but I find the Metadata taken from Chroma is inconsistent. Is it a bug?
this is a log:
col, _ := client.CreateCollection(collectionName, metadata, true, embeddingFunction, distanceFunction) documents := []string{ "This is a document about cats. Cats are great.", "this is a document about dogs. Dogs are great.", } ids := []string{ "ID1", "ID2", } metadatas := []map[string]any{ {"key1": "value1"}, {"key2": "value2"}, } _, addError := col.Add(nil, metadatas, documents, ids) if addError != nil { fmt.Printf("Error adding documents: %s", addError) return } countDocs, qrerr := col.Count() if qrerr != nil { fmt.Printf("Error counting documents: %s", qrerr) return } fmt.Printf("countDocs: %v\n", countDocs) //this should result in 2 qr, qrerr := col.Query([]string{"I love dogs"}, 5, nil, nil, nil) if qrerr != nil { fmt.Printf("Error querying documents: %s", qrerr) return } fmt.Printf("qr: %v\n", toJson(qr)) fmt.Printf("qr.Documents[0][0]: %v\n", qr.Documents[0][0]) //this should result in the document about dogs
@theoneLee, this looks weird. Let me have a look.
@theoneLee this should be fixed in v0.1.0
v0.1.0
I run Demo, but I find the Metadata taken from Chroma is inconsistent. Is it a bug?
this is a log: