Open AIService
General-purpose service for interacting with the OpenAI API.
Must be initialized with initialize before use. If not configured (no API key), methods will gracefully return null.
See also
for configuration options
Properties
Functions
Link copied to clipboard
Sends a prompt to the specified model and returns the completion text.
Link copied to clipboard
Generates the punchline of a knock-knock joke using the high-quality model.
Link copied to clipboard
Generates the setup half of a knock-knock joke using the low-cost model.
Link copied to clipboard
Returns the current configuration, or null if not initialized.
Link copied to clipboard
Initializes the OpenAI client with the provided configuration.
Link copied to clipboard
Returns true if the OpenAI client is initialized and ready.