3.6 GENERATE Function Signature 2

This function generates a response for a given prompt.

Syntax

APEX_AI.GENERATE (
    p_config_static_id  IN              VARCHAR2 )
    p_prompt            IN              VARCHAR2 )
    RETURN CLOB;

Parameters

Parameter Description
p_config_static_id The static ID of the AI configuration defined under the application's Shared Components.
p_prompt The user prompt.

Example

The following example generates a response using the AI service configured via AI configuration with static ID low_code_expert.

DECLARE
  l_response clob;
BEGIN
  l_response := apex_ai.generate(
    p_config_static_id => 'low_code_expert',
    p_prompt           => 'What is Oracle APEX' );
END;