|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command > AIC. - Artificial Intelligence Command |
AIC.Ask |
Top |
MiniRobotLanguage (MRL)
AIC.Ask
Chat with GPT (main command)
Intention
The AIC.Ask command sends a text prompt to OpenAI's GPT models and returns the AI-generated response. This is the primary command for conversational AI interactions with ChatGPT.
Syntax
AIC.Ask|$$Prompt[|$$RetVar]
P1 - $$Prompt - The text message/prompt to send to GPT
P2 - $$RetVar (optional) - Variable to store the AI response
Example
' Set your OpenAI API Key
AIC.SetKey|sk-your-api-key
' Set the model (optional)
AIC.SetModel|gpt-4o
' Ask a question
AIC.Ask|What is the capital of France?|$$Answer
DBP.$$Answer
Related Commands
- AIC.SetKey - Set API key
- AIC.SetModel - Set AI model
- AIC.AskCompletion - Legacy completion API