OpenAIWebClient constructor

init

Creates an instance of the OpenAI web client.

def __init__(self, model, api_key, organization_id):
    ...
ParameterTypeDescription
modelstrOpenAI language model. Possible values:

- gpt-4o

- gpt-4o-mini

- o1

- o1-mini

- o3

- o3-mini
api_keystrOpenAI API key.
organization_idstrOrganization ID (optional).

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.

See Also