Insert Image Caption
Sends an image to an image captioning model and inserts the returned caption into a field or variable.
See also
Options
-
Account Name is a text expression for the name of the AI account to use. In the current file, use the Configure AI Account script step to set up the account and assign it this name any time before this script step runs.
-
Model is the name of the image captioning model. Specify the model name as a text expression. For supported models, see FileMaker technical specifications.
-
Input is any expression that returns an image as container data to send to the model for captioning.
-
Target specifies the field or variable to insert the returned caption text into. If the variable doesn't exist, this script step creates it (see Using variables).
Compatibility
| Product | Supported |
| FileMaker Pro | Yes |
| FileMaker Go | Yes |
| FileMaker WebDirect | Yes |
| FileMaker Server | Yes |
| FileMaker Cloud | Yes |
| FileMaker Data API | Yes |
| Custom Web Publishing | Yes |
Originated in version
26.0
Description
Image captioning models generate text descriptions of images. The caption returned depends on the model used and the content of the image.
This script step is supported only for Claris AI Model Server as the model provider. (See Configuring AI services in FileMaker Server Help.) Set the Account Name option to an account configured by the Configure AI Account script step for a Custom model provider whose Endpoint is your AI model server. For supported image captioning models, see FileMaker technical specifications.
Notes
-
You must specify a target variable or field. If Target is not specified, this script step returns an error code that can be captured with the Get(LastError) function.
Example 1 - Generate caption for photo in current record
Configures an AI account for Claris AI Model Server. The script then goes to the Products layout, uses the model to generate a caption for the image in the Products::Photo field in the current record, and stores it in the Products::Caption text field.
Configure AI Account [ Account Name: "my-account" ; Model Provider: Custom ; Endpoint: "https://my-server.example.com/llm/v1/" ; Verify SSL Certificates ; API key: Global::API_Key ]
Go to Layout [ "Products" (Products) ; Animation: None ]
Insert Image Caption [ Account Name: "my-account" ; Model: "Salesforce/blip2-opt-2.7b" ; Input: Products::Photo ; Target: Products::Caption ]