De interface van VDS Renaissance is in meerdere talen beschikbaar. De officiële documentatie wordt in het Engels onderhouden om één consistente en altijd actuele referentie te garanderen.
@AI
[VDS7]
Syntax
@AI(<prompt>)
@AI(STATUS)
@AI(TOKENS)
@AI(ERROR)
@AI(MODEL)
@AI(CHUNK)
@AI(STREAMING)
@AI(RESPONSE)
Description
This function is the call that talks to the AI model. Used with a prompt, it sends that prompt (together with the current conversation history) and returns the model's reply as text. Configure the provider and model first with the AI command.
%reply = @ai(Summarise this in one sentence: %text)
A prompt containing commas must be passed through a variable, because a comma is a parameter separator.
After a call, the following selectors return information about it:
| @AI(STATUS) | The HTTP status of the last call (200 on success, or an error code). |
| @AI(TOKENS) | The tokens consumed, input and output, joined by the current field separator. |
| @AI(ERROR) | The error message for the last call, or empty on success. |
| @AI(MODEL) | The model actually used for the last call. |
| @AI(CHUNK) | The next fragment of a streamed reply (empty if nothing new). See AI streaming. |
| @AI(STREAMING) | 1 while a streamed reply is still arriving, 0 once it is complete. |
| @AI(RESPONSE) | The text of a streamed reply assembled so far (complete once streaming ends). |
The last three are used with ai stream for progressive replies.
OK
When called with a prompt, OK is set false if the call failed; @AI(error) then gives the reason (for example a missing API key, an unknown model, or an HTTP error).
Example
ai config,anthropic,claude-opus-4-8
%answer = @ai(Name the capital of France.)
if @ok()
info %answer @cr()(@ai(tokens) tokens)
else
info Error: @ai(error)
end