AIGetCapabilities¶
GET ai/chat/capabilities
Lists the capabilities — server-side behavior profiles of the chat — available to the
current session. Today there is one: stscript.assistant, the assistant
of the script editor.
Call it once per session. Offer the mode only when enabled is true, and send
runtimeId and referenceVersion of the returned runtime with every
AIChatSendMessage of that mode. When the editor ships another
compiler build, its requests are rejected with AI_STSCRIPT_RUNTIME_UNSUPPORTED instead of
being checked by a different version.
Access Control¶
Allowed: client, manager, admin.
Request¶
GET request
GET https://{broker_domain}/ai/chat/capabilities?accountLogin=7777864
Authorization: <JWT_TOKEN>
{
"command": "AIGetCapabilities",
"extID": "1",
"data": { "accountLogin": 7777864 }
}
const { capabilities } = await platform.AIGetCapabilities({ accountLogin });
Parameters¶
| Parameter | Type | Description |
|---|---|---|
accountLogin |
int | Account context. Required for a client session of an account owner |
Response Data¶
{
"protocol": 1,
"capabilities": [{
"id": "stscript.assistant",
"enabled": true,
"protocolVersion": 1,
"operations": ["auto", "generate", "explain", "analyze", "fix", "modify"],
"runtimes": [{
"runtimeId": "stscript-dsl-sha256:3de9a0c52570c0657861ab27d2ca22d3e46a59015e87043ae066c270cc236c99",
"referenceVersion": "reference-60435f5ccaa912ac",
"kinds": ["indicator", "robot"],
"checks": ["parse", "validate", "compile"]
}],
"limits": {
"maxSourceUtf16Units": 64000,
"maxArtifactsPerRun": 1,
"maxRepairAttempts": 2,
"runTimeoutMs": 180000,
"maxDiagnostics": 100
}
}]
}
| Field | Description |
|---|---|
enabled |
false when the capability is switched off by configuration or for the brand, when no agent of this audience supports it, or when the reference is not verified for the deployed compiler |
protocolVersion |
protocol of the capability's fields; not the version of the language |
runtimes |
compiler builds the server can check against. Empty when the capability is not ready |
checks |
what the server check performs. execute is absent: code is never run in this release |
limits |
the limits to enforce in the interface before sending |
The values in the example are real formats, not real versions: always take them from the response.
Errors¶
| Code | Error | Description |
|---|---|---|
400 |
AI_INVALID_DATA |
A client session of an account owner did not pass accountLogin |
403 |
AI_ACCESS_DENIED |
The session type may not use the assistant |