Ask options — timeouts, params, system message
Three knobs shape how an ask reaches the provider: how long an invocation may take, which wire parameters go with the request, and what extra system text every prompt carries.
Timeouts
Section titled “Timeouts”import { openai } from "@nola-lang/providers";import { defineConfig } from "@nola-lang/runtime";
export default defineConfig({ providers: { default: openai({ model: "gpt-5-mini" }) }, ask: { timeoutMs: 60_000 }, // per-invocation; 0 disables});ask.timeoutMsis the default per-invocation timeout (60 000 ms when unset). It is the root frame’s abort signal: when it elapses, every provider call in that invocation receives the signal.0disables it..withTimeout(ms)on the intent an infer function returns overrides it for that invocation — see Intent methods.- The timeout bounds provider round trips only. Once a call intent’s arguments are filled, the callee’s own promise runs to completion, the same as a plain
await fn()in your code.
Params
Section titled “Params”Wire-tuning knobs travel with the intent:
export infer function tagline(.product: string) { return ask (..`a creative tagline`<string>).withParams({ temperature: 0.9, maxOutputTokens: 200, providerOptions: { reasoning: { effort: "low" } }, // passed through to the provider untouched });}temperatureandmaxOutputTokensare typed;providerOptionsis an opaque, JSON-serializable bag of provider-specific knobs passed through to the provider’scomplete()untouched.- Merge rule: patch fields win per field, and
providerOptionsmerges per key rather than being replaced wholesale — both when chaining.withParams()and along the frame chain (nearest wins). - Params are part of the ask fingerprint: two asks that differ only in params never share a replay or cache entry — see Record and replay.
System message
Section titled “System message”import { openai } from "@nola-lang/providers";import { defineConfig } from "@nola-lang/runtime";
export default defineConfig({ providers: { default: openai({ model: "gpt-5-mini" }) }, system: { message: "Answer in British English." },});system.message is extra system-prompt text composed after the Nola protocol preamble on every ask. Use it for global tone and policy; use instruction markers and prompt templates for anything specific to one function or one ask.
Next: Environments and secrets