version


Description:

public async string version (Cancellable? cancellable = null) throws Error

Gets the version of the Ollama server.

Calls the /api/version endpoint to retrieve the server version. Useful for verifying connectivity during bootstrap. Uses a short timeout (10 seconds) since version checks should be quick.

Parameters:

cancellable

Optional cancellable for cancelling the request

Returns:

Version string from the server (e.g., "0.12.6")

Exceptions:

Error

if the request fails or response is invalid

Since:

1.0