Use AI in actions
Learn how to call an LLM inside of backend actions with our ai object.
Purpose
Use an LLM to generate text or analyze an image. Text generation with prompt alone; image analysis with prompt and imageBase64.
Method
await ai.process(options)
Parameters:
prompt
(string, required)imageBase64
(string, optional)contentType
(string, optional, default: "image/jpeg")
Usage Examples
Prompting Tips
You should tell the chat to “use ai”, for example:
Use AI to tell me a joke
Last updated