AICI
Microsoft AICI allows to constrain the output of a LLM using WASM. In particular, it is possible to send JavaScript program to describe the prompt.
GenAIScript support executing scripts and converting the output into a AICI compatible JavaScript program, which will them generate constrainted output.
Let’s take a look at an example.
The execution of this script is converted into a 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 constrain in the prompt flow.
Token
AICI uses AICI_API_KEY
, AICI_API_BASE
and AICI_API_VERSION
(default v1
) to compose the API URL.