1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! This module provides integration with `Gemini`'s API, enabling the use of language models within
//! the Swiftide project. It includes the `Gemini` struct for managing API clients and default
//! options for prompt models. The module is conditionally compiled based on the "groq" feature
//! flag.
use crateopenai;
use GeminiConfig;
/// 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.
pub type Gemini = GenericOpenAI;
pub type GeminiBuilder = GenericOpenAIBuilder;
pub type GeminiBuilderError = GenericOpenAIBuilderError;
pub use ;