Chat Stream • Rust AI Agent SDK

chat_stream: Stream a chat completion (returns chunks)

chat_stream

Async

Method

</div>

This is a method of the LlmProvider class in the llm module.

Stream a chat completion (returns chunks)

Signature

python
async def chat_stream(
        &self,
        messages: &[Message],
        tools: Option<&[ToolDefinition]>,
    ) -> Result<Box<dyn futures::Stream<Item = Result<String>> + Send + Unpin>>

Parameters

ParamField &[Message]

No description available.

ParamField Option&lt;&[ToolDefinition]&gt;

No description available.

Returns

PreviousNext