Closed Praj-23 closed 9 months ago
@Praj-23, have a look here https://github.com/chroma-core/chroma/blob/main/chromadb/test/client/test_database_tenant.py
@Praj-23, did the test example address your question?
Yes, that resolved my issue Thank you
Hello,
Sorry to re-open this issue. Just to be sure the AdminClient
has two methodes create_tenant
and create_database
. They create database and tenant if I use chromadb on standalone mode.
But if I want to use chroma db in server/client mode (so with a HttpClient
) how can I create a db and tenant in the server ?
A second question related create_tenant
and create_database
raise error if the tenant or database already exist. Is there a simple why to ignore the instruction if the object already exist, or should I do a try/except to catch the Exception ?
@etiennebonnafoux try the solution from https://cookbook.chromadb.dev/strategies/multi-tenancy/naive-multi-tenancy/#user-per-tenant it works for me. You use get_tenant
in the try block and create_tenant
in the except block.
I wanted to create a collection with different tenant and database other than the default one, how can I do that?