Parameter | Type | Description |
---|---|---|
items | VectorItem[] | Array of vector items to insert or update in the index |
VectorItem
must contain an id
and may optionally include vector
, contents
, and metadata
:
Field | Type | Required | Description |
---|---|---|---|
id | string | Yes | Unique identifier for the vector item |
vector | number[] | Optional | The vector representation (required if no embedding model configured) |
contents | string | Buffer | Optional | Original text or binary content associated with the vector |
metadata | object | Optional | Additional structured data associated with the vector |
Promise<SuccessResponseModel>
: A Promise that resolves to a success response object containing the operation status and message with the count of upserted vectors.
Error
Validation Errors
items
array is empty or contains invalid data.