Class: InMemoryVectorStore
Defined in: packages/agentos/src/rag/vector_stores/InMemoryVectorStore.ts:67
Implements the IVectorStore interface using in-memory data structures.
Provides a simple, fast vector store primarily for development and testing.
Implements
Implements
Constructors
Constructor
new InMemoryVectorStore():
InMemoryVectorStore
Defined in: packages/agentos/src/rag/vector_stores/InMemoryVectorStore.ts:77
Constructs an InMemoryVectorStore instance.
Note: The store is not ready for use until initialize is called.
Returns
InMemoryVectorStore
Methods
checkHealth()
checkHealth():
Promise<{details?:any;isHealthy:boolean; }>
Defined in: packages/agentos/src/rag/vector_stores/InMemoryVectorStore.ts:423
Async
Checks the operational health of the vector store provider. This might involve pinging the service, checking connection status, or verifying authentication.
Returns
Promise<{ details?: any; isHealthy: boolean; }>
A promise that resolves with the health status.
details can include specific error messages or status information.
Implementation of
collectionExists()
collectionExists(
collectionName):Promise<boolean>
Defined in: packages/agentos/src/rag/vector_stores/InMemoryVectorStore.ts:206
Async
Checks if a collection with the given name exists in the vector store.
Parameters
collectionName
string
The name of the collection to check.
Returns
Promise<boolean>
A promise that resolves with true if the collection exists, false otherwise.
Throws
If the check fails for reasons other than existence (e.g., connection issue).
Implementation of
createCollection()
createCollection(
collectionName,dimension,options?):Promise<void>
Defined in: packages/agentos/src/rag/vector_stores/InMemoryVectorStore.ts:164
Creates or replaces an in-memory collection.
Parameters
collectionName
string
dimension
number
options?
Returns
Promise<void>
Implementation of
delete()
delete(
collectionName,ids?,options?):Promise<DeleteResult>
Defined in: packages/agentos/src/rag/vector_stores/InMemoryVectorStore.ts:370
Async
Deletes documents from a specified collection by their IDs or by a metadata filter.