Skip to main content

analyze

Function analyze 

Source
pub async fn analyze(
    image_b64: &str,
    prompt: &str,
    base_url: &str,
    model: &str,
    api_key: &str,
) -> Result<LlmOutput>
Expand description

Analyze an image using an OpenAI-compatible /chat/completions endpoint.

base_url should include the path prefix (e.g. https://api.openai.com/v1 or http://localhost:11434/v1). The function appends /chat/completions.

api_key may be empty for local servers that require no authentication.