ragSearch( )
Searches for similar documents in the RAG vector database. **Workspace lifecycle:** This operation requires an existing workspace. If the workspace doesn't exist, returns an empty array.
function ragSearch(params: input): PromiseDescription
Searches for similar documents in the RAG vector database.
Workspace lifecycle: This operation requires an existing workspace. If the workspace doesn't exist, returns an empty array.
Parameters
| Name | Type | Required? | Description |
|---|---|---|---|
params | input | ✓ | The parameters for searching |
Returns
PromiseExamples
const results = await ragSearch({
modelId,
query: "AI and machine learning",
topK: 5,
workspace: "my-docs",
});ragSaveEmbeddings( )
Saves pre-embedded documents to the RAG vector database. Part of the segregated flow: chunk() → embed() → saveEmbeddings() **Workspace lifecycle:** This operation implicitly opens (or creates) the workspace. The workspace remains open until closed.
startQVACProvider( )
Starts a provider service that offers QVAC capabilities to remote peers. The provider's keypair can be controlled via the seed option or QVAC_HYPERSWARM_SEED environment variable.