The Chroma component is a data component that allows users to build and search vector datasets.
It can carry out the following tasks:
#Release Stage
Alpha
#Configuration
The component definition and tasks are defined in the definition.json and tasks.json files respectively.
#Setup
In order to communicate with Chroma, the following connection details need to be
provided. You may specify them directly in a pipeline recipe as key-value pairs
within the component's setup
block, or you can create a Connection from
the Integration Settings
page and reference the whole setup
as setup: ${connection.<my-connection-id>}
.
Field | Field ID | Type | Note |
---|
API Key (required) | api-key | string | Fill in your Chroma API key |
Chroma URL Endpoint (required) | url | string | Fill in your Chroma hosted public URL endpoint with port, e.g http://1.2.3:8000 |
#Supported Tasks
#Batch Upsert
Upsert multiple vector items into a collection, existing items will be updated
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_BATCH_UPSERT |
Collection Name (required) | collection-name | string | The name of the collection to upsert the item into |
Array ID (required) | array-id | array[string] | The array of id |
Array Metadata (required) | array-metadata | array[object] | The array of vector metadata |
Array Vector (required) | array-vector | array[array] | The array of vector values |
Array Document | array-document | array[string] | The array of document string values |
Array URI | array-uri | array[string] | The array of uri |
Output | ID | Type | Description |
---|
Status | status | string | Batch add status |
#Upsert
Upsert a vector item into a collection, existing item will be updated
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_UPSERT |
Collection Name (required) | collection-name | string | The name of the collection to upsert the item into |
ID (required) | id | string | The ID of the item |
Metadata (required) | metadata | object | The vector metadata |
Vector (required) | vector | array[number] | An array of dimensions for the vector value |
Document | document | string | The document string value |
URI | uri | string | The uri of the item |
Output | ID | Type | Description |
---|
Status | status | string | Add status |
#Query
Perform a vector search on a collection
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_QUERY |
Collection Name (required) | collection-name | string | The name of the collection to perform vector similarity search on |
Vector (required) | vector | array[number] | An array of dimensions for the vector query. |
N Results (required) | n-results | integer | The N amount of items to return from the vector search operation |
Filter | filter | object | The metadata filter to be applied to the data with Chroma where filter, please refer to using-where-filters |
Filter Document | filter-document | string | The document content filter to be applied to the data, please refer to filtering-by-document-contents |
Fields | fields | array[string] | The fields to be returned from the vector search operation |
Output | ID | Type | Description |
---|
Result | result | object | Result of the vector search operation |
Status | status | string | Vector search status |
Output Objects in Query
Result
Field | Field ID | Type | Note |
---|
IDs | ids | array | The ids returned from the vector search operation |
Items | items | array | The items returned from the vector search operation |
Metadata | metadata | array | The metadata returned from the vector search operation |
Vectors | vectors | array | The vectors returned from the vector search operation |
#Delete
Delete vector items from a collection
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_DELETE |
Collection Name (required) | collection-name | string | The name of the collection to delete the object from |
ID | id | string | The ID of the item |
Filter | filter | object | The metadata filter to be applied to the data with Chroma where filter, please refer to using-where-filters |
Filter Document | filter-document | string | The document content filter to be applied to the data, please refer to filtering-by-document-contents |
Output | ID | Type | Description |
---|
Status | status | string | Delete status |
#Create Collection
Create a collection
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_CREATE_COLLECTION |
Collection Name (required) | collection-name | string | The name of the collection to create |
Config | metadata | object | The metadata of the collection. Please refer to creating-inspecting-and-deleting-collection |
Configuration | configuration | object | The configuration of the collection. Please refer to creating-inspecting-and-deleting-collection |
Get or Create | get-or-create | boolean | If true, the collection will be created if it does not exist |
Output | ID | Type | Description |
---|
Status | status | string | Create collection status |
#Delete Collection
Delete a collection
Input | ID | Type | Description |
---|
Task ID (required) | task | string | TASK_DELETE_COLLECTION |
Collection Name (required) | collection-name | string | The name of the collection to delete |
Output | ID | Type | Description |
---|
Status | status | string | Delete collection status |