AICI
Microsoft AICI allows constraining the output of an LLM using WASM. In particular, it is possible to send a JavaScript program to describe the prompt.
GenAIScript supports executing scripts and converting the output into an AICI-compatible JavaScript program, which will then generate constrained output.
Let’s take a look at an example.
The execution of this script is converted into an AICI JavaScript program.
And AICI comes back with the following log.
And the text output is 42
.
Metadata
An AICI template should set the aici
provider in the model identifier.
gen
The AICI.gen
function creates a constraint in the prompt flow.
Token
AICI uses AICI_API_KEY
, AICI_API_BASE
and AICI_API_VERSION
(default v1
) to compose the API URL.