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
- opts table provider configuration options