Module telegram-bot-lua.adapters.llm

LLM adapter for OpenAI and Anthropic APIs.

[[

Functions

api.llm.new(opts) create a new LLM client instance.


Functions

api.llm.new(opts)
create a new LLM client instance.

Parameters:

  • opts table provider configuration options
    • provider string LLM provider: 'openai' or 'anthropic'
    • api_key string API key for the provider
    • model string model name (default varies by provider)
    • base_url string custom API base URL

Returns:

    table LLM instance with chat, complete, and embed methods
generated by LDoc 1.5.0 Last updated 2026-04-07 21:37:15