AskAI Step
Description:
This step fetches responses from the AI step for the questions posed.
Inputs
- aiProvider – AI provider
- actAs - Act as a persona
- prompt - Prompt
- imageFiles - image file attachments
- maxTokens - Max token value
- temperature - Temparature value
- varGlobalStoreResult - variable or global to store the AI response
Returns
- True – expression evaluates to a true result
- False – expression evaluates to a false result
Usage:

Example:
Let’s build and execute the “clsAskAIDef” example. In this example, we provide a chess puzzle, and the “AskAI” step responds with the puzzle name and its solution.
- Create a new definition called “clsAskAIDef" and open the definition in designer mode.
- Drag the “UpdateVariable and AskAI” step to the canvas.
- Connect the dots between the “Start” and “AskAI” steps, as shown above.
- Define a variable or a global to store the result.
- Click the “UpdateVariable” step to configure its “Required” properties. Provide a name for the step. Select the “Optional” tab. Enter the variable name and the image file path on the application server. Select “Yes” if the variable value contains a C# expression to evaluate. Click the Save button.

- The chess puzzle image from the example is included below.

- Click the “AskAI” step to configure its “Required” properties. Provide a name for the step. Select the AI provider from the drop-down list. Enter the text prompt. Specify a variable or a global to store the AI response. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the “AskAI” step to configure its “Optional” properties. Provide a persona description. Set the maximum token value. Set a temperature between 0 and 2 to control the "creativity" of the generated text. Provide the image file path. Click the Save button.

- Click the button to specify the image file path on the application server. A configuration pop-up window appears. Click the Add Row (+) button to insert an empty row. Enter the variable value. Click the Save button. You can add multiple file lists by using the Add Row button.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. The “AskAI” step should fetch the result and store it in the configured variable or global.

Definition Sample:
You may download and extract the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Please verify and complete the import process steps for any missing configurations, such as file path references and database connections. Then, save the definition to confirm the changes.
Click here to download the sample file.