Version Endpointο
This document explains how to retrieve the current version of the Ollama server and confirms the Ollama Toolkit client is at v0.1.8.
Endpointο
GET /api/version
Returns JSON containing the serverβs version details.
Exampleο
curl http://localhost:11434/api/version
Expected output:
{
"version": "0.1.11"
}
(Ollama Toolkit v0.1.8 is compatible with Ollama server >= 0.1.11.)
Python Usage Exampleο
from ollama_toolkit import OllamaClient
client = OllamaClient()
version_info = client.get_version()
print(f"Connected to Ollama server version: {version_info['version']}")
Async Exampleο
import asyncio
from ollama_toolkit import OllamaClient
async def get_version_async():
client = OllamaClient()
version_info = await client.aget_version()
print(f"Async - Connected to Ollama version: {version_info['version']}")
# Run the async function
asyncio.run(get_version_async())