Reputation: 1
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)
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
Reputation: 529
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:
Upvotes: 1