OpenAICompatibleWebClient constructor

init

Creates an instance of the OpenAI-compatible web client.

def __init__(self, model, api_key, base_url):
    ...
ParameterTypeDescription
modelstrModel name supported by the LLM provider.
api_keystrAPI key (token).
base_urlstrBase URL of the OpenAI-compatible LLM.

Exceptions

ExceptionDescription
RuntimeError(Proxy error(ArgumentException))API key value can’t be None or empty.
RuntimeError(Proxy error(ArgumentException))Text model value can’t be None or empty.
RuntimeError(Proxy error(ArgumentException))Base URL value can’t be None or empty.

See Also