Skip to main content
Technical Preview

Overview

A client-mode connector for a curated slice of the Ollama API focused on IIoT / edge alarm text into local LLMs (no cloud): Default BASE_ADDRESS is http://127.0.0.1:11434 with USE_SSL "false" (no trailing slash). For an HTTPS reverse proxy, set USE_SSL "true" and point BASE_ADDRESS at https://your-host. Topics use ai/ollama/<object>/<verb>. REQUEST_TIMEOUT is 120 for cold model load + inference. See the base guide: REST API Connectors.
Auth: none required for local Ollama. A reverse proxy may require Authorization: Bearer &lt;token&gt; — add that header and map Hub secrets into MQTT api_token if needed.

Basic Syntax

Full deployable file: OllamaRestApi.lot in the factory package (no ADD METADATA).

Topics

Configuration

  1. Run Ollama locally (e.g. docker run -d -p 11434:11434 ollama/ollama) and pull a model (ollama pull tinyllama).
  2. Set BASE_ADDRESS to http://127.0.0.1:11434 (or your LAN/Docker host). Keep USE_SSL "false" for plain HTTP; use HTTPS + USE_SSL "true" behind a reverse proxy.
  3. For edge alarm classification: publish to ai/ollama/generate/post with "stream": false and optional "format": "json" / JSON schema.
  4. For chat-style prompts: publish to ai/ollama/chat/post with a messages array and "stream": false.
  5. Use GetTags as a cheap health / model-list smoke before production workloads.
  6. Optional OpenAI-shaped clients can use GetModels / PostChatCompletions under /v1/....

References

Last modified on October 21, 2026