AIU. - Artificial Intelligence Utility

<< 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

AIU.SetStore

Previous Top Next


MiniRobotLanguage (MRL)

 

AIU.SetStore
Set the Store Configuration for Responses

 

Intention

 

SetStore Command: Configure Response Storage
 
The SetStore command configures how responses are stored or managed in the AI session, typically for operations like AIU.Responses.

This allows control over response persistence or retrieval settings.

It’s part of the AIU - OpenAI API suite.

 

What is the SetStore Command?

 

The SetStore command sets a string parameter defining the storage configuration for AI responses, likely specifying a store ID or mode for response persistence.

This is typically used with AIU.Responses to manage response history or state. Exact values depend on the API implementation, but it’s metadata that doesn’t directly impact token counts or response content.

 

Why Do You Need It?

 

Configuring the store setting is useful for:

Persistence: Enable storage of responses for later retrieval or reference.

Session Management: Link responses to a specific store ID for continuity.

Customization: Adjust how response data is handled based on script needs.

 

How to Use the SetStore Command?

 

Provide a single string parameter specifying the store configuration (e.g., a store ID like "store123").

This setting influences response handling in subsequent API calls, with minimal token impact as metadata. Available models and their prices (as of March 18, 2025, from OpenAI’s pricing page) include:

gpt-4o: $5.00/1M input tokens, $15.00/1M output tokens (multimodal, 128K context).

gpt-4o-mini: $0.15/1M input tokens, $0.60/1M output tokens (cost-effective, 128K context).

gpt-3.5-turbo: $0.50/1M input tokens, $1.50/1M output tokens (dialog-optimized, 16K context).

 

Example Usage

 

AIU.SetStore|store123

AIU.Responses|Tell me a story|$$STO

DBP.Stored Response: $$STO

 

Sets the store configuration to "store123", associating the response with this store ID.

 

Illustration

 

┌──────────────┬────────────────────┐

│ Store ID     │ API Metadata       │

├──────────────┼────────────────────┤

│ store123     │ "store": "store123"│

├──────────────┼────────────────────┤

│ mystore      │ "store": "mystore" │

└──────────────┴────────────────────┘

Illustration of store IDs sent as metadata with responses.

 

Syntax

 

AIU.SetStore|P1

AIU.Set_Store|P1

 

Parameter Explanation

 

P1 - A string specifying the store configuration (e.g., "store123"). Required.

 

Example

 

AIU.SetStore|mystore

AIU.Responses|What’s the time?|$$TIM

DBP.Time Response: $$TIM

ENR.

 

Remarks

 

- No default store is set during initialization; it’s empty until specified.

- Exact store behavior depends on the API backend; typically used with AIU.Responses.

 

Limitations

 

- Requires exactly one parameter; omitting or adding extra parameters triggers an error (%IC_ER_PA).

- The store ID’s validity or format isn’t checked; invalid values may cause API errors.

 

See also:

 

AIU.Get_Store

AIU.Responses

AIU.Set_PreviousResponseId

Responses API Configuration