peng zhang
peng zhang

Reputation: 1

Chroma database embeddings is none

I am using Chromadb server, and when I added data and used get query, I found that there were no embeddings.

chroma_client = chromadb.HttpClient(host='localhost', port='8000')

collection = chroma_client.get_or_create_collection(name="my_collectionvvv")


collection.add(
    documents=["This is a document", "This is another document"],
    metadatas=[{"source": "my_source"}, {"source": "my_source"}],
    ids=["id1", "id2"]
)
# client = chromadb.PersistentClient(path="/Users/guitai/chromadb")

results = collection.query(
    query_texts=["document"],
    n_results=2,
    include=["embeddings", "documents", "metadatas","distances"]
)
results1 = collection.get(
    ids=['id1'],
    include=["embeddings", "documents", "metadatas"]
)
print(results)
print(results1)

enter image description here

chroma_client = chromadb.Client()

this is right, but chromadb server can not save embeddings.

python=3.9 chromadb=0.4.3

Upvotes: 0

Views: 399

Answers (1)

If you visit docs.trychroma.com, you'll find that they've excluded embeddings, likely to improve performance.

Here's an image from the doc:

enter image description here


Upvotes: 1

Related Questions