|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Session and Storage Management > AIU. - Artificial Intelligence Utility |
MiniRobotLanguage (MRL)
AIU.SetPreviousResponseId
Set the ID of the Previous Response
Intention
SetPreviousResponseId Command: Linking to Past Responses
The SetPreviousResponseId command sets the ID of a previous AI response, enabling context continuity or reference in operations like AIU.Chat or AIU.Responses.
This is useful for threading conversations or debugging.
It’s part of the AIU - OpenAI API suite.
This command assigns a string identifier to reference a prior AI response, typically a unique ID from a previous interaction.
It facilitates tracking or linking responses in a session.
Setting a previous response ID is essential for:
•Context Continuity: Maintain conversational threads by referencing past responses.
•Debugging: Track specific responses in a sequence.
•Session Management: Link responses across multiple AI calls.
The command requires one parameter: a string representing the previous response ID.
The setting persists until changed by another AIU.SetPreviousResponseId call or reset via Init_AIU().
Example Usage
AIU.Chat|Hello, how are you?|$$RES
' Assume response ID is "resp_001"
AIU.SetPreviousResponseId|resp_001
AIU.Chat|Tell me more|$$MOR
This sets "resp_001" as the previous response ID, linking it to the next chat request.
Illustration
┌────────────────────────┐
│ Previous Response ID │
├────────────────────────┤
│ resp_001 │
└────────────────────────┘
The ID set for referencing a previous response.
Syntax
AIU.SetPreviousResponseId|P1
AIU.Set_PreviousResponseId|P1
Parameter Explanation
P1 - (Required) A string representing the ID of the previous response (e.g., "resp_001").
Example
AIU.SetPreviousResponseId|chat_123
AIU.Chat|Continue the conversation|$$CON
DBP.Continued: $$CON
ENR.
Remarks
- The ID is a user-defined string, not necessarily validated against actual responses.
- Context linking depends on the AI implementation supporting response IDs.
Limitations
- Requires exactly one parameter; omitting or adding extra parameters triggers an error.
- Effectiveness depends on the AI model's ability to use the ID.
See also:
• AIU.Chat