Calling GPT Methods from Apex
All iDialogue Flow Action classes marked Global
are accessible via Apex.
Open the developer console to view any of the GPT / AI Apex controller classes.
Available Apex GPT Action Classes
- AICompletionAction
- AIDialogueAction
- AIPromptSObjectUtils
- AITranscriptAction
Example
Copy and paste the code example below into the Developer Console->Execute Anonymous window.
View the results in the “Logs” tab. Filter by Debug Only.
Notes
Most Apex classes make a callout to the iDialogue API; which is a proxy to OpenAI for managing conversation memory, intent, caching and security.
Any DML executed before the callout may result in a commit error.