Fortinet white logo
Fortinet white logo

Administration Guide

Generating Lua Scripts with Text-to-Script

Generating Lua Scripts with Text-to-Script

The assistant simplifies traffic management by generating functional automation drafts using plain language requirements.

The following example demonstrates how FortiAI can help you create custom scripts to handle specific traffic requirements without requiring deep familiarity with Lua syntax.

Example 1: Writing a Lua script for HTTP/HTTPS virtual servers

If you need to perform custom header manipulations or traffic steering, FortiAI can generate a validated script based on your description. This is useful for quickly creating automation tools for your environment.

Prompt:

Write a lua script to insert a message-id in request header

What FortiAI does:

Produces a code block using correct FortiADC Lua API syntax that can be reviewed and then copied directly into a new script object within the management console.

Generating Lua Scripts with Text-to-Script

Generating Lua Scripts with Text-to-Script

The assistant simplifies traffic management by generating functional automation drafts using plain language requirements.

The following example demonstrates how FortiAI can help you create custom scripts to handle specific traffic requirements without requiring deep familiarity with Lua syntax.

Example 1: Writing a Lua script for HTTP/HTTPS virtual servers

If you need to perform custom header manipulations or traffic steering, FortiAI can generate a validated script based on your description. This is useful for quickly creating automation tools for your environment.

Prompt:

Write a lua script to insert a message-id in request header

What FortiAI does:

Produces a code block using correct FortiADC Lua API syntax that can be reviewed and then copied directly into a new script object within the management console.