AIC. - Artificial Intelligence Command

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command >

AIC. - Artificial Intelligence Command

AIC.AskWithHistory

Top


MiniRobotLanguage (MRL)

 

AIC.AskWithHistory

Ask with conversation history context

 

Intention

 

The AIC.AskWithHistory command sends a prompt to OpenAI including the full conversation history. The AI can reference previous messages in the history for context-aware responses.

 

Syntax

 

AIC.AskWithHistory|$$Prompt[|$$RetVar]

 

P1 - $$Prompt - The current prompt/question

P2 - $$RetVar (optional) - Variable to store the response

 

Example

 

' Set up conversation history

AIC.AddToHistory|user|My name is John

AIC.AddToHistory|assistant|Hello John!

 

' Ask with history - AI remembers my name

AIC.AskWithHistory|What's my name?|$$Answer

DBP.$$Answer ' Output: Your name is John

 

Related Commands

 

- AIC.AddToHistory - Add to history

- AIC.AskHistoryClipboard - History from clipboard

- AIC.SetHistDim - Set history dimensions