ragIngest( )
Ingests documents into the RAG vector database. Full pipeline: chunk → embed → save **Workspace lifecycle:** This operation implicitly opens (or creates) the workspace. The workspace remains open until closed.
function ragIngest(params: any): PromiseDescription
Ingests documents into the RAG vector database. Full pipeline: chunk → embed → save
Workspace lifecycle: This operation implicitly opens (or creates) the workspace. The workspace remains open until closed.
Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
params | any | ✓ | The parameters for ingestion |
Returns
PromiseExamples
// Simple ingest
const result = await ragIngest({
modelId,
documents: ["Document 1", "Document 2"],
});
// With progress tracking
const result = await ragIngest({
modelId,
documents: ["Document 1", "Document 2"],
workspace: "my-docs",
onProgress: (stage, current, total) => {
console.log(`[${stage}] ${current}/${total}`);
},
});ragDeleteWorkspace( )
Deletes a RAG workspace and all its data. The workspace must not be currently loaded/in-use.
ragListWorkspaces( )
Lists all RAG workspaces with their open status. Returns all workspaces that exist on disk. The `open` field indicates whether the workspace is currently loaded in memory and holding active resources (Corestore, HyperDB adapter, and possibly a RAG instance).