Skip to main content

detect_wire_api

Function detect_wire_api 

Source
pub async fn detect_wire_api(
    base_url: Option<String>,
) -> Result<Option<WireApiDetection>>
Expand description

Detect which wire API the running Ollama server supports based on its version. Returns Ok(None) when the version endpoint is missing or unparsable; callers should keep the configured default in that case.

Adapted from OpenAI Codex’s codex-ollama/src/lib.rs