QVAC Logo

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): Promise

Description

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

NameTypeRequired?Description
paramsanyThe parameters for ingestion

Returns

Promise

Examples

// 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}`);
  },
});

On this page