All examples
Language models

A cloud language model with an opaque key

Connect to the native OpenAI Responses adapter using a credential label configured through hidden terminal input.

Download .aner source
llm_cloud.aner
// Configure once in Terminal: aner secrets set openai
// This program sends one paid cloud inference request when run.
import aner.llm
import aner.secrets

let model = llm.client(provider: "openai", model: "gpt-4.1-mini",
    key: secrets.stored("openai"))
let answer = model.generate("Explain why sample weighted gradients matter.",
    max_tokens: 256)
print(answer.text())
print(answer.finish_reason())

Make it your experiment.

With Aner installed, save this program as examples/llm_cloud.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.

Terminal
aner check examples/llm_cloud.aner
aner run examples/llm_cloud.aner

The aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.

Use the compatible native Aner development engine with aner.llm, aner.secrets and VS Code extension 0.1.34 or newer. Checking makes no inference request; running sends the prompt to the explicit provider. Local examples require the named model to be installed or served already. Cloud requests require a configured opaque credential reference and can incur provider charges. See Language model connections and Credentials for supported adapters, HTTPS, timeout, content inspection and storage boundaries.

Iris and Wine are teaching datasets with their own attribution. Example outcomes are not comparative benchmarks or evidence of clinical validity.

Dataset sources & attribution
Install Aner