Files
Hammad Bashir fd014edf05 [BUG] Add dep fix for pydantic in thin client (#1033)
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- #799 introduced a max version for pydantic but this change was not
propagated to the thin client. This makes the same change in the thin
client.
 - New functionality
	 - ...

## Test plan
Existing tests for client

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js

## Documentation Changes
None
2023-08-28 22:36:46 +00:00
..
2023-07-17 14:21:34 -07:00
2023-05-31 14:23:10 -07:00
2023-07-17 14:21:34 -07:00

Chroma logo

Chroma - the open-source embedding database.
This package is for the the Python HTTP client-only library for Chroma. This client connects to the Chroma Server. If that it not what you are looking for, you might want to check out the full library.

pip install chromadb-client # python http-client only library

To connect to your server and perform operations using the client only library, you can do the following:

import chromadb
# Example setup of the client to connect to your chroma server
client = chromadb.HttpClient(host="localhost", port=8000)

collection = client.create_collection("all-my-documents")

collection.add(
    documents=["This is document1", "This is document2"],
    metadatas=[{"source": "notion"}, {"source": "google-docs"}], # filter on these!
    ids=["doc1", "doc2"], # unique for each doc
    embeddings = [[1.2, 2.1, ...], [1.2, 2.1, ...]]
)

results = collection.query(
    query_texts=["This is a query document"],
    n_results=2,
    # where={"metadata_field": "is_equal_to_this"}, # optional filter
    # where_document={"$contains":"search_string"}  # optional filter
)

License

Apache 2.0