Skip to main content

llm_chat_with_usage

Function llm_chat_with_usage 

Source
pub async fn llm_chat_with_usage(
    llm: &LlmConfig,
    system: &str,
    user: &str,
) -> Option<LlmResponse>
Expand description

Sends a chat completion request to the LLM and returns both the content and token usage from the API response.