Use AI in actions
Learn how to call an LLM inside of backend actions with our ai object.
Purpose
Method
Parameters:
Usage Examples
// LLM will think of a joke
const joke = await ai.process({ prompt: "Tell me a joke" });// LLM will analyze your image
const analysis = await ai.process({
prompt: "What's in this image?",
imageBase64: "base64", // Image must be in base64 format
contentType: "image/jpeg" // (Optional)
});Prompting Tips
Last updated