Skip to main content

CrispasrChatOnToken

Type Alias CrispasrChatOnToken 

Source
pub type CrispasrChatOnToken = Option<unsafe extern "C" fn(utf8_chunk: *const c_char, user: *mut c_void)>;
Expand description

Fired once per detokenised UTF-8 chunk during a streaming generate. The chunk pointer is valid only for the duration of the call. Option<...> so a null pointer clears the callback (C NULL).

Aliased Type§

pub enum CrispasrChatOnToken {
    None,
    Some(unsafe extern "C" fn(*const i8, *mut c_void)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*const i8, *mut c_void))

Some value of type T.