EXEC DBMS_CLOUD_AI.DROP_PROFILE('PROFILE_GPT-5.5');

BEGIN
  DBMS_CLOUD_AI.CREATE_PROFILE(
    profile_name => 'PROFILE_GPT-5.5',
    attributes   => JSON_OBJECT(
      'provider'           VALUE 'oci',
      'credential_name'    VALUE 'OCI$RESOURCE_PRINCIPAL',
      'model'              VALUE 'openai.gpt-5.5',
      'region'             VALUE 'us-chicago-1',
      'oci_compartment_id' VALUE 'ocid1.compartment.oc1..aaaaaaaa33ogmhasyvcqzuvkrfzo5mavh3q2le7mgwmy74yzpyqi7byxgrlq',
      'temperature'        VALUE 1,
      'max_tokens'         VALUE 8192
    ));
END;
/

set define off
var response CLOB
exec :response := DBMS_CLOUD_AI.GENERATE(prompt => 'Olá', profile_name => 'PROFILE_GPT-5.5', action => 'chat');
print :response

