AIO.SetMetadata

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIO. - OpenRouter AI >

AIO.SetMetadata

AIO.SetMetadata

Previous Top Next


MiniRobotLanguage (MRL)

 

AIO.SetMetadata|`JSON
Set Request Metadata

 

Purpose

 

Sets custom metadata for the AI request. This metadata can be used for tracking, logging, routing, or any application-specific purpose. The metadata is passed with each subsequent API request.

 

Syntax

 

AIO.SetMetadata|`JSON

 

Parameters

 

`JSON - A JSON object containing key-value pairs of metadata. Both keys and values should be strings.

 

JSON Format

 

{"session_id":"abc123","user_id":"user456","request_type":"summary"}

 

Notes

 

- Metadata is sent with each API request until cleared

- Useful for request tracking and analytics

- Cleared when AIO.Init is called

 

Example

 

' Set request metadata for tracking

AIO.SetMetadata|{"job_id":"batch_001","priority":"high"}

 

' Subsequent requests include this metadata

AIO.Chat|Process this request|`Result

 

Related Commands

 

AIO.SetTrace - Set trace metadata

AIO.Init - Initialize AIO system