Skip to content

Commit c9b045b

Browse files
author
Sicheng Pan
committed
Remove api from client
1 parent ba9d22f commit c9b045b

File tree

6 files changed

+2
-83
lines changed

6 files changed

+2
-83
lines changed

Diff for: chromadb/api/__init__.py

-18
Original file line numberDiff line numberDiff line change
@@ -461,24 +461,6 @@ def get_or_create_collection(
461461
"""
462462
pass
463463

464-
@abstractmethod
465-
def _fork(
466-
self,
467-
collection_id: UUID,
468-
new_name: str
469-
) -> Collection:
470-
"""[Internal] Fork the current collection under a new name. The returning collection should contain identical data to the current collection.
471-
This is an experimental API that only works for Hosted Chroma for now.
472-
473-
Args:
474-
new_name: The name of the new collection.
475-
476-
Returns:
477-
Collection: A new collection with the specified name and containing identical data to the current collection.
478-
"""
479-
pass
480-
481-
482464
@abstractmethod
483465
def set_tenant(self, tenant: str, database: str = DEFAULT_DATABASE) -> None:
484466
"""Set the tenant and database for the client. Raises an error if the tenant or

Diff for: chromadb/api/async_api.py

-21
Original file line numberDiff line numberDiff line change
@@ -455,27 +455,6 @@ async def get_or_create_collection(
455455
"""
456456
pass
457457

458-
@abstractmethod
459-
async def _fork(
460-
self,
461-
collection_id: UUID,
462-
new_name: str,
463-
embedding_function: Optional[
464-
EmbeddingFunction[Embeddable]
465-
] = ef.DefaultEmbeddingFunction(), # type: ignore
466-
data_loader: Optional[DataLoader[Loadable]] = None,
467-
) -> AsyncCollection:
468-
"""[Internal] Fork the current collection under a new name. The returning collection should contain identical data to the current collection.
469-
This is an experimental API that only works for Hosted Chroma for now.
470-
471-
Args:
472-
new_name: The name of the new collection.
473-
474-
Returns:
475-
Collection: A new collection with the specified name and containing identical data to the current collection.
476-
"""
477-
pass
478-
479458
@abstractmethod
480459
async def set_tenant(self, tenant: str, database: str = DEFAULT_DATABASE) -> None:
481460
"""Set the tenant and database for the client. Raises an error if the tenant or

Diff for: chromadb/api/async_client.py

-21
Original file line numberDiff line numberDiff line change
@@ -268,27 +268,6 @@ async def _modify(
268268
database=self.database,
269269
)
270270

271-
@override
272-
async def _fork(
273-
self,
274-
collection_id: UUID,
275-
new_name: str,
276-
embedding_function: Optional[
277-
EmbeddingFunction[Embeddable]
278-
] = ef.DefaultEmbeddingFunction(), # type: ignore
279-
data_loader: Optional[DataLoader[Loadable]] = None,
280-
) -> AsyncCollection:
281-
model = await self._server._fork(
282-
collection_id=collection_id,
283-
new_name=new_name,
284-
)
285-
return AsyncCollection(
286-
client=self._server,
287-
model=model,
288-
embedding_function=embedding_function,
289-
data_loader=data_loader,
290-
)
291-
292271
@override
293272
async def delete_collection(
294273
self,

Diff for: chromadb/api/client.py

-21
Original file line numberDiff line numberDiff line change
@@ -235,27 +235,6 @@ def _modify(
235235
new_configuration=new_configuration,
236236
)
237237

238-
@override
239-
def _fork(
240-
self,
241-
collection_id: UUID,
242-
new_name: str,
243-
embedding_function: Optional[
244-
EmbeddingFunction[Embeddable]
245-
] = ef.DefaultEmbeddingFunction(), # type: ignore
246-
data_loader: Optional[DataLoader[Loadable]] = None,
247-
) -> Collection:
248-
model = self._server._fork(
249-
collection_id=collection_id,
250-
new_name=new_name,
251-
)
252-
return Collection(
253-
client=self._server,
254-
model=model,
255-
embedding_function=embedding_function,
256-
data_loader=data_loader,
257-
)
258-
259238
@override
260239
def delete_collection(
261240
self,

Diff for: chromadb/api/models/AsyncCollection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ async def modify(
258258

259259
async def fork(
260260
self,
261-
new_name: str
261+
new_name: str,
262262
) -> "AsyncCollection":
263263
"""Fork the current collection under a new name. The returning collection should contain identical data to the current collection.
264264
This is an experimental API that only works for Hosted Chroma for now.

Diff for: chromadb/api/models/Collection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def modify(
264264

265265
def fork(
266266
self,
267-
new_name: str
267+
new_name: str,
268268
) -> "Collection":
269269
"""Fork the current collection under a new name. The returning collection should contain identical data to the current collection.
270270
This is an experimental API that only works for Hosted Chroma for now.

0 commit comments

Comments
 (0)