API reference · Kjarni 0.2.7

Namespace Kjarni

Classes

CancelToken

Token to cancel long-running operations.

Chat

High-level chat interface for conversational AI using local decoder models.

ChatConversation

Stateful conversation that maintains chat history automatically. The parent Chat must outlive this object.

ClassificationResult

Result of classifying a single text.

Classifier

Text classification model.

Embedder

Text embedding model.

ImageHit

An image matching a search.

ImageIndex

Photos searched by description, with CLIP. Searching is safe from several threads; adding is not.

IndexInfo

Information about an existing index.

IndexStats

Statistics returned after indexing operations.

Indexer

Document indexer.

Kjarni

Library-wide functions.

KjarniException

Thrown when a call into the native engine fails.

Progress

Progress update during indexing operations.

Reranker

Text reranking model using cross-encoders.

ScanReport

What scanning a directory did.

SearchResult

A single search result.

Searcher

Document searcher for RAG applications.

Summarizer

Summarizes article-length text.

Transcriber

Speech to text with Whisper.

Transcript

The result of transcribing audio.

TranscriptSegment

One timed piece of a transcript, in seconds from the start.

Translator

Translates text between languages.

Structs

ChatTurn

One turn of a conversation, for callers that own the transcript themselves.

GenerationConfig

Generation parameters for decoder models. Use -1 sentinel values to keep model defaults.

RerankResult

Single rerank result

Enums

ChatMode

Preset sampling defaults for a .

ChatTurnRole

The author of a turn in a conversation history.

KjarniDevice

Where a model runs.

KjarniErrorCode

Why a call into the native engine failed, carried by .

KjarniProgressStage

The step an indexing or search operation is on, reported through progress callbacks.

KjarniSearchMode

How a matches a query against an index.

SearchMode

Search mode determining how queries are processed.

Kjarni runs the same engine on every platform: