agents.clients.chroma
#
Module Contents#
Classes#
An HTTP client for interaction with a ChromaDB instance running as a server. |
API#
- class agents.clients.chroma.ChromaClient(db: Union[agents.vectordbs.DB, Dict], host: str = '127.0.0.1', port: int = 8000, response_timeout: int = 30, init_on_activation: bool = True, logging_level: str = 'info', **kwargs)#
Bases:
agents.clients.db_base.DBClient
An HTTP client for interaction with a ChromaDB instance running as a server.
- serialize() Dict #
Get client json
- Return type:
Dict
- check_connection() None #
initialize.
- Return type:
None
- initialize() None #
initialize.
- Return type:
None
- add(db_input: Dict[str, Any]) Optional[Dict] #
add data.
- Parameters:
db_input (dict[str, Any])
- Return type:
dict | None
- conditional_add(db_input: Dict[str, Any]) Optional[Dict] #
add data if given ids dont exist. Update metadatas of the ids that exist
- Parameters:
db_input (dict[str, Any])
- Return type:
dict | None
- metadata_query(db_input: Dict[str, Any]) Optional[Dict] #
Query based on given metadata.
- Parameters:
db_input (dict[str, Any])
- Return type:
dict | None
- query(db_input: Dict[str, Any]) Optional[Dict] #
Query based on query string.
- Parameters:
db_input (dict[str, Any])
- Return type:
dict | None
- deinitialize() None #
deinitialize.