Expand description
The openvino-genai crate provides high-level, ergonomic, safe Rust bindings to OpenVINO GenAI. See the repository README for more information, such as build instructions.
Most interaction with OpenVINO GenAI begins with instantiating an LlmPipeline:
let pipeline = openvino_genai::LlmPipeline::new("path/to/model", "CPU")
.expect("to create an LLM pipeline");Structs§
- Chat
History - A chat history for multi-turn conversations.
- Decoded
Results - Results from LLM text generation.
- Generation
Config - Configuration for text generation.
- Json
Container - A JSON container for structured data exchange with the GenAI C API.
- LlmPipeline
- A pipeline for generating text using large language models.
- Perf
Metrics - Performance metrics from a generation operation.
- Streamer
- A streaming callback that receives tokens as they are generated.
- Tool
Call - A single tool call requested by the model.
- VlmDecoded
Results - Results from VLM text generation.
- VlmPipeline
- A pipeline for generating text from text+image inputs using Vision-Language Models.
- Whisper
Decoded Result Chunk - A timestamped chunk from Whisper speech recognition results.
- Whisper
Decoded Results - Results from Whisper speech recognition.
- Whisper
Generation Config - Configuration for Whisper speech recognition.
- Whisper
Pipeline - A pipeline for speech recognition using Whisper models.
Enums§
- Chat
Message - A chat message with typed variants for each role.
- Inference
Error - See
ov_status_e; enumerates errors returned by the OpenVINO GenAI implementation. - Loading
Error - Enumerate the ways that library loading can fail.
- Setup
Error - Enumerate setup failures: in some cases, this library will call library-loading code that may
fail in a different way (i.e.,
LoadingError) than the calls to the OpenVINO GenAI libraries (i.e.,InferenceError). - Streaming
Status - The status returned from a streaming callback to control generation.