ContentProvider

Trait ContentProvider 

Source
pub trait ContentProvider {
    // Required method
    fn content(&self) -> String;
}
Expand description

The LLM responses have multiple different fields and nests of objects to get to the actual text completion returned. This trait can be applied to the choice level objects to extract the completion text.

To avoid an optional, if no completion text is found, the ContentProvider::content should return an empty string.

Required Methods§

Source

fn content(&self) -> String

Implementations on Foreign Types§

Source§

impl ContentProvider for Choice

Source§

fn content(&self) -> String

Implementors§