addVectorItem
codebolt.vectordb.addVectorItem(item: any): Promise<AddVectorItemResponse>
Adds a new vector item to the vector database.
Parameters
Name | Type | Description |
---|---|---|
item | any | The item to add to the vector. |
Returns:
Promise<AddVectorItemResponse>
A promise that resolves when the item is successfully added.Example
const addResponse = await codebolt.vectordb.addVectorItem({ id: "123", vector: [0.1, 0.2, 0.3] });
console.log("Add Vector Response:", addResponse);