stream_gemini

Function stream_gemini 

Source
pub async fn stream_gemini(
    api_key: &str,
    base_url: &str,
    model: &str,
    prompt: &str,
    tools: Option<&[Value]>,
    tx: Sender<StreamChunk>,
    cancel_token: CancellationToken,
) -> Result<(), AppError>
Expand description

Stream a response from Google Gemini API (Generative Language API).

Gemini uses SSE with alt=sse query parameter and authenticates via API key in the query string (not Bearer token).