queryVectorItem
codebolt.vectordb.queryVectorItem(key: string): Promise<QueryVectorItemResponse>
Queries a vector item from the vector database based on the provided key.
Parameters
Name | Type | Description |
---|---|---|
key | string | The key of the vector to query the item from. |
Returns:
Promise<QueryVectorItemResponse>
A promise that resolves with the queried vector item.Example
// Example: Querying a single vector item
const queryResponse = await codebolt.vectordb.queryVectorItem("123");
console.log("Query Vector Item Response:", queryResponse);
// Example: Querying multiple vector items
const queryItemsResponse = await codebolt.vectordb.queryVectorItems(["123", "456"], "/database/path");
console.log("Query Vector Items Response:", queryItemsResponse);