Overview
A client-mode connector for a curated slice of the OpenAI API focused on IIoT / edge alarm text into LLMs:
Default
BASE_ADDRESS is https://api.openai.com (no trailing slash). Topics use ai/openai/<object>/<verb>.
See the base guide: REST API Connectors.
Auth:
Authorization: Bearer <OpenAI API key>. Prefer Hub secrets (GET SECRET "OPENAI_API_KEY") mapped into MQTT api_token. Never commit real sk-... keys.Factory live smoke is blocked until an OpenAI API key is supplied. Point secrets / MQTT JSON at your project before production use.
Basic Syntax
OpenAiRestApi.lot in the factory package (no ADD METADATA).
Topics
Configuration
- Set
BASE_ADDRESStohttps://api.openai.com. - Store an OpenAI API key in Hub secrets (
OPENAI_API_KEY); map into MQTTapi_token. - For alarm classification: publish to
ai/openai/responses/postwith a Responses body usingtext.formatJSON schema (or use Chat Completions withresponse_format). - For semantic search / similarity: publish to
ai/openai/embeddings/postwith a tinyinputstring and an embeddings model. - Use
GetModelsas a cheap auth smoke before production workloads.

