Bundle OpenAI API client. Supports Chat Completions (GPT-4o, o1, etc.), Embeddings, Image Generation (DALL-E), and function/tool calling. Set OPENAI_API_KEY environment variable before use. Compile with -lib openai.
EndPoint
OpenAI endpoint
Operations
GetApiKey # function
Reads API from 'api_key.dat'
function : GetApiKey() ~ StringReturn
| Type | Description |
|---|---|
| String | API key |
GetBaseUrl # function
Get the base URL
function : GetBaseUrl() ~ StringReturn
| Type | Description |
|---|---|
| String | base |
GetLastError # function
Get the last error
function : GetLastError() ~ StringReturn
| Type | Description |
|---|---|
| String | last error |