Skip to main content

summarize_text

Function summarize_text 

Source
pub async fn summarize_text(
    api_key: &str,
    model: &str,
    system_prompt: &str,
    messages: &[AgentMessage],
    thinking_level: ThinkingLevel,
    model_config: Option<ModelConfig>,
) -> Result<String, String>
Expand description

Call yoagent’s provider for a simple text completion (no tools, no streaming).

Uses the provided model_config (base URL, compat flags, etc.) and thinking_level instead of hardcoded values. When model_config is None, falls back to the default OpenCode Go endpoint for backward compatibility.