ragDeleteEmbeddings( )
Deletes document embeddings from the RAG vector database. **Workspace lifecycle:** This operation requires an existing workspace.
function ragDeleteEmbeddings(params: { ids: string[]; modelId?: string; workspace?: string }, options?: { forceNewConnection?: boolean; profiling?: { enabled?: boolean; includeServerBreakdown?: boolean; mode?: "summary" | "verbose" }; timeout?: number }): PromiseParameters
| Name | Type | Required? | Description |
|---|---|---|---|
params | \{ ids: string[]; modelId?: string; workspace?: string \} | ✓ | The parameters for deleting embeddings |
options | `{ forceNewConnection?: boolean; profiling?: { enabled?: boolean; includeServerBreakdown?: boolean; mode?: "summary" | "verbose" }; timeout?: number }` | ✗ |
Returns
PromiseThrows
| Error | When |
|---|---|
When the operation fails or workspace doesn't exist |
Example
await ragDeleteEmbeddings({
ids: ["doc-1", "doc-2"],
workspace: "my-docs",
});ragCloseWorkspace( )
Closes a RAG workspace, releasing in-memory resources (Corestore, HyperDB adapter, RAG instance). **Workspace lifecycle:** Workspaces are implicitly opened. This function explicitly closes them, releasing memory and file locks. The workspace data remains on disk unless `deleteOnClose` is set to true.
ragDeleteWorkspace( )
Deletes a RAG workspace and all its data. The workspace must not be currently loaded/in-use.