chat • Rust AI Agent SDK

chat: Send a chat completion request

chat

Async

Method

</div>

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

Send a chat completion request

Signature

python
async def chat(
        &self,
        messages: &[Message],
        tools: Option<&[ToolDefinition]>,
    ) -> Result<LlmResponse>

Parameters

ParamField &[Message]

No description available.

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

No description available.

Returns

PreviousNext