Skip to content

Grace

mash.grace · AI

NoteLimited on SaaS
  • Needs Grace set up on this Foldr. Without it every call stops the script with "Grace isn't configured".
  • On SaaS each call spends Grace credits, and calls stop when the allowance for the billing period is used up.

Ask Grace for contextual judgement at runtime

grace.ask(prompt: string, input?: mixed) → string

Ask Grace a free-text question and return her reply as a string.

grace.classify(prompt: string, options: array, input?: mixed)

Ask Grace to pick one value from a fixed list of options.

grace.decide(prompt: string, input?: mixed) → bool

Ask Grace for a yes/no decision.

grace.structured(prompt: string, schema: array, input?: mixed)

Ask Grace for a JSON value matching a schema. Schema is a JSON-Schema-shaped dict (type, enum, properties, required, items).