llama-cpp-bindings 0.7.0

llama.cpp bindings for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::ffi::NulError;
use std::string::FromUtf8Error;

#[derive(Debug, thiserror::Error)]
pub enum JsonSchemaToGrammarError {
    #[error("schema string contains an interior NUL byte: {0}")]
    SchemaContainsNulByte(#[from] NulError),
    #[error("JSON schema is invalid: {message}")]
    InvalidSchema { message: String },
    #[error("not enough memory")]
    NotEnoughMemory,
    #[error("{message}")]
    Reported { message: String },
    #[error("grammar returned by json_schema_to_grammar is not valid UTF-8")]
    GrammarNotUtf8(#[from] FromUtf8Error),
}