5.16.6 Configuring Generative AI Attributes

Configure the attributes on the AI page to make Generative AI capabilities available to runtime applications.

To include Generative AI capabilities (such as an AI Assitant) in a runtime application, you must edit the Application Definition and configure attributes on the AI page. To learn more, see Including Generative AI in Applications.

Tip:

Before you can configure attributes on the AI page, you must define Generative AI Services in Workspace Utilities. If no Generative AI Services are available, the No AI Services available message appears. Click Configure to access the Generative AI Service page.

5.16.6.1 Accessing the AI Page

Access the AI page from the Application home page.

To access the AI page:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.

    The Application home page appears.

  3. On the Application home page, click Edit Application Definition to the right of the application name.
  4. Click the AI tab.
  5. Edit the appropriate attributes.
  6. Click Apply Changes to save your changes.

5.16.6.2 AI Page

The AI page contains one region, Generative AI.

Generative AI

Use Generative AI attributes to configure AI capabilities for an application. A Generative AI Service must be configured in the workspace. If no Generative AI Service exists, you can configure one from this page.

Generative AI attributes include:

  • Service - Select the default AI Service for this application.

    If no Generative AI services are available, the No AI Services available message appears. Click Configure to access the Generative AI Service page and create one.

    Generative AI Services can be also configured from Workspace Utilities.

    To learn more, see Managing Generative AI in APEX and Creating Generative AI Service Objects.

  • Request Handler Procedure - Enter the name of the PL/SQL procedure to be called before each request is sent to the AI service within the current application.

    The procedure can mask data, log requests, enforce application policy, detect prompt injection, or alter the outgoing request after component-specific request handling has completed.

    Application AI Request Handler procedures must implement the following interface:

    procedure <name of procedure> (
        p_param  in            apex_ai.t_chat_request_handler_param,
        p_result in out nocopy apex_ai.t_chat_request_handler_result )
    
  • Response Handler Procedure - Enter the name of the PL/SQL procedure to be called after each AI service response within the current application.

    The procedure can mask data, log responses, enforce application policy, or alter the incoming response before component-specific response handling runs. It is not responsible for executing tool calls.

    Application AI Response Handler procedures must implement the following interface:

    procedure <name of procedure> (
        p_param  in            apex_ai.t_chat_response_handler_param,
        p_result in out nocopy apex_ai.t_chat_response_handler_result )