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] Visual DialogScript can talk to an AI model natively. A script can send a prompt to a large language model and use its reply — as plain text, or as structured JSON that the script then reads and acts on. The HTTPS request is made internally, so no extra files need to be shipped with a compiled program on Windows.

This is configured once with the AI command and then called with the @AI function.

Provider and model

ai config,anthropic,claude-opus-4-8

The provider is anthropic. The model name is the provider's own identifier. An optional third parameter overrides the API endpoint.

[VDS7] Self-hosted provider. Besides Anthropic's cloud, the AI can also talk to a self-hosted, OpenAI-compatible server (the /v1/chat/completions endpoint, Bearer authentication) — for example a local llama-server. In the IDE, Options - AI Configuration selects the provider (Anthropic or VDS AI) and stores its endpoint, key and model. From a script the equivalent is ai config,vdsia,<model>,<url> followed by ai key,<bearer>. The AI command and @AI function then talk to whichever provider is configured, through the same VDS API.

API key

The API key is never written in the script. It is read from an environment variable (for Anthropic, ANTHROPIC_API_KEY), or supplied at run time with ai key,... (which the IDE fills in from its project or global credentials). This keeps secrets out of your source and out of compiled programs.

A conversation

By default successive calls keep their history, so the model remembers the earlier turns of the conversation. Use ai system,... to set a persistent system instruction, and ai reset to start a fresh conversation.

Text reply

ai config,anthropic,claude-opus-4-8
ai system,You are a concise assistant.
%answer = @ai(Give me one tip for naming variables.)
info %answer

JSON reply

Combined with JSON, the AI can return structured data the script reads directly. ai json sends the prompt and parses the reply straight into a JSON handle:

ai config,anthropic,claude-opus-4-8
%p = Give 3 French cities and their population, as JSON {cities:[{name,pop}]}
%h = @new(json)
ai json,%p,%h
%n = @json(count,%h,cities)
%i = 0
while @less(%i,%n)
  write console,@json(value,%h,cities.%i.name)@lf()
  %i = @succ(%i)
wend

A prompt that contains commas must be passed through a variable (as %p above), because a comma is a parameter separator on the command line.

See also