Header menu logo Nao

OpenAICompatibleProvider Type

LLM provider for any server that speaks the OpenAI-compatible `POST /v1/chat/completions` API. OpenAI itself, vLLM, llama.cpp's server and most local OpenAI-compatible runtimes share the exact same wire format — only the base URL, model name and (optional) bearer API key differ — so a single client covers them all instead of one near-identical implementation per vendor.

Constructors

Constructor Description

OpenAICompatibleProvider(name, baseUrl, model, apiKey)

Full Usage: OpenAICompatibleProvider(name, baseUrl, model, apiKey)

Parameters:
    name : string
    baseUrl : string
    model : string
    apiKey : string option

Returns: OpenAICompatibleProvider
name : string
baseUrl : string
model : string
apiKey : string option
Returns: OpenAICompatibleProvider

Type something to start searching.