QVAC Logo

@qvac/sdk

API reference — v0.8.0

Overview

@qvac/sdk npm package exposes a function-centric, typed JS API.

Functions

FunctionSummary
cancel()Cancels an ongoing operation.
close()Closes the SDK client connection and releases all associated resources.
completion()Generates completion from a language model based on conversation history.
defineHandler()Helper function to define a handler with full type inference.
definePlugin()Helper function to define a plugin with full type inference.
deleteCache()Deletes KV cache files.
downloadAsset()Downloads an asset (model file) without loading it into memory.
embed()Generates embeddings for a single text using a specified model.
getLogger()Creates or retrieves a namespaced logger instance.
getModelByName()Looks up a model in the built-in catalog by its constant name.
getModelByPath()Looks up a model in the built-in catalog by its registry path.
getModelBySrc()Looks up a model in the built-in catalog by model file ID and blob core key.
getModelInfo()Returns status information for a catalog model, including cache state and loaded instances.
invokePlugin()Invoke a non-streaming plugin handler.
invokePluginStream()Invoke a streaming plugin handler.
loadModel()Loads a machine learning model from a local path, remote URL, or Hyperdrive key.
loggingStream()Opens a logging stream to receive real-time logs.
modelRegistryGetModel()Fetches a single model entry from the registry by its path and source.
modelRegistryList()Returns all available models from the QVAC distributed model registry.
modelRegistrySearch()Searches the model registry with optional filters for model type, engine, and quantization.
ocr()Performs Optical Character Recognition (OCR) on an image to extract text.
ping()Sends a ping request to the server and returns the pong response.
ragChunk()Chunks documents into smaller pieces for embedding.
ragCloseWorkspace()Closes a RAG workspace, releasing in-memory resources (Corestore, HyperDB adapter, RAG instance).
ragDeleteEmbeddings()Deletes document embeddings from the RAG vector database.
ragDeleteWorkspace()Deletes a RAG workspace and all its data.
ragIngest()Ingests documents into the RAG vector database.
ragListWorkspaces()Lists all RAG workspaces with their open status.
ragReindex()Reindexes the RAG database to optimize search performance.
ragSaveEmbeddings()Saves pre-embedded documents to the RAG vector database.
ragSearch()Searches for similar documents in the RAG vector database.
startQVACProvider()Starts a provider service that offers QVAC capabilities to remote peers.
stopQVACProvider()Stops a running provider service and leaves the specified topic.
textToSpeech()Converts text to speech audio using a loaded TTS model.
transcribe()Collects all streaming results into a single string response.
transcribeStream()Streams audio transcription results in real-time, yielding text chunks as they become available.
translate()Translates text from one language to another using a specified translation model.
unloadModel()Unloads a previously loaded model from the server.

Object

ObjectSummary
profilerSingleton object that collects and exports profiling data for SDK operations.

Shared types

Shared types

Common type definitions used across SDK functions.

Errors

Error codes

All errors thrown by the SDK and how to handle them via SDK_CLIENT_ERROR_CODES and SDK_SERVER_ERROR_CODES.

On this page