Overview of llama.rn API surface
mainThe llama.rn API provides a high-performance interface for running Llama models in React Native environments. The API is organized into several key categories:
- Classes: Core logic is encapsulated in classes like
LlamaContext. - Functions: Global lifecycle and utility functions such as
initLlama,loadLlamaModelInfo, andreleaseAllLlama. - Type Aliases: Extensive typing for parameters and results, including
CompletionParams,ContextParams,EmbeddingParams, and variousNative*types for low-level interaction. - Variables: Global constants like
BuildInfoandRNLLAMA_MTMD_DEFAULT_MEDIA_MARKER.
Developers can use these components to manage model loading, context initialization, text completion, embeddings, and multimodal processing.