Skip to content

LLM Effect

This page is auto-generated from src/stdlib.rs. Do not edit it by hand — your changes will be overwritten on the next CI run. To add or update a built-in operation, edit the StdLib::new() registry in src/stdlib.rs.

Deprecated: LLM.ask is deprecated. Use perform Inference.ask(prompt) instead. Both are synonyms resolving to Effect::Inference. (RFC 0010)

The LLM effect provides the following built-in operations, wired through the generic PerformAsync effect dispatch. The compiler emits a single PerformAsync bytecode with the effect-op string "LLM.ask"; the VM routes it to the registered LLM client via the runtime’s effect handler.

Operation Signature Description
LLM.ask ask(prompt: String) -> String Send the prompt to the configured LLM client and return the reply; suspends non-blockingly when the runtime supports it.

Implementation site: Runtime Host