Autobot::Providers::HttpProvider
Inherits Autobot::Providers::Provider < Reference < Object
HTTP-based LLM provider supporting OpenAI-compatible chat completion APIs.
Works with: OpenAI, DeepSeek, Groq, Moonshot, MiniMax, OpenRouter, AiHubMix, vLLM, and any OpenAI-compatible endpoint.
For Anthropic, uses the Messages API with automatic format conversion.
Constants
ANTHROPIC_API_VERSION = "2023-06-01"
CONNECT_TIMEOUT = 30.seconds
INITIAL_RETRY_DELAY = 2.seconds
Log = ::Log.for(self)
MAX_RETRIES = 3
RATE_LIMIT_STATUS = 429
READ_TIMEOUT = 300.seconds
SERVER_ERROR_MAX = 599
SERVER_ERROR_MIN = 500
USER_AGENT = "Autobot/#{VERSION}"
Constructors
Instance methods
chat(messages : Array(Hash(String, JSON::Any)), tools : Array(Hash(String, JSON::Any)) | Nil = nil, model : String | Nil = nil, max_tokens : Int32 = DEFAULT_MAX_TOKENS, temperature : Float64 = DEFAULT_TEMPERATURE) : Response
Sourceextra_headers
Sourcemodel
Source