Skip to main content

stream_gemini

Function stream_gemini 

Source
pub async fn stream_gemini<B>(
    broker: &B,
    model: impl Into<String>,
    project: Option<String>,
    system_prompt: Option<String>,
    turns: &[ChatTurn],
    tools: &[ToolSpec],
    cancel: CancellationToken,
) -> Result<Pin<Box<dyn Stream<Item = Result<GeminiStreamEvent, StreamError>> + Send>>, StreamError>
where B: CredentialBroker + ?Sized,
Expand description

Start a broker-proxied streaming turn against Code Assist and yield decoded events as they arrive. The returned stream is Send + 'static so it can be forwarded through the runtime’s event bus.