pub async fn complete(
model: &Model,
context: &Context,
options: Option<StreamOptions>,
) -> Result<AssistantMessage, Error>Expand description
High-level completion and token estimation. High-level complete function that collects all streaming events and returns the final assistant message.
§Arguments
model- The model to usecontext- The conversation contextoptions- Optional streaming options
§Returns
The final assistant message containing all content blocks