Gemini

Type Alias Gemini 

Source
pub type Gemini = GenericOpenAI<GeminiConfig>;
Available on crate feature gemini only.
Expand description

The Gemini struct encapsulates a Gemini client that implements swiftide_core::SimplePrompt

There is also a builder available.

By default it will look for a GEMINI_API_KEY environment variable. Note that a model always needs to be set, either with Gemini::with_default_prompt_model or via the builder. You can find available models in the Gemini documentation.

Under the hood it uses async_openai, with the Gemini openai mapping. This means some features might not work as expected. See the Gemini documentation for details.

Aliased Type§

pub struct Gemini {
    pub stream_full: bool,
    /* private fields */
}

Fields§

§stream_full: bool

Convenience option to stream the full response. Defaults to true, because nobody has time to reconstruct the delta. Disabling this will make the streamed content only return the delta, for when performance matters. This only has effect when streaming is enabled.

Implementations§

Trait Implementations§

Source§

impl Default for Gemini

Source§

fn default() -> Self

Returns the “default value” for a type. Read more