ug-lua-llm

Unified Lua client for cloud LLM APIs, local Ollama models, and OpenAI-compatible endpoints

$ luarocks install ug-lua-llm

ug-lua-llm gives Lua applications one interface for chat, streaming,
tool calling, and embeddings across OpenAI, Anthropic (Claude), Google
(Gemini), xAI (Grok), Groq, OpenRouter, DeepSeek, Mistral, and local
Ollama models. Any service implementing the OpenAI Chat Completions API
can be used directly, without waiting for a named adapter.

Responses are normalized to consistent fields while the untouched
provider payload stays available, and provider-native APIs remain
reachable. Also includes structured and redacted errors, retries with
exponential backoff and jitter, rate-limit handling, cancellation,
lifecycle hooks, reasoning and extended-thinking options, configurable
logging, and endpoint conformance checks.

Supports Lua 5.1 through 5.4.

Versions

0.1.1-113 hours ago3 downloads
0.1.0-123 hours ago5 downloads

Dependencies

dkjson >= 2.6
http >= 0.4
lua >= 5.1, < 5.5
LuaSocket >= 3.0rc1-2

Manifests