Appendix: Download Instructions

This lab consists of tasks that need to be executed on a case-by-case basis. If you are directed to this lab at any point of time, choose the appropriate task that needs to be executed to proceed.

Objectives

In this lab, you will:

  • Download and install the final export of the app.

Task 1: Import the App into an APEX Workspace

  1. Navigate to App Builder and click Import.

    "Page Designer"

  2. Drag and drop your downloaded zip file, then click Next.

    "Page Designer"

  3. Click Install Application.

    "Page Designer"

  4. Click Next.

    "Page Designer"

  5. Click Install Supporting Objects.

    "Page Designer"

Task 2: Update Web Credentials in Oracle APEX and Configure Generative AI

Web credentials are used to authenticate connection to external REST services, or REST Enabled SQL services from APEX.

Creating Web Credentials securely stores and encrypts authentication credentials for use by Oracle APEX components and APIs. Credentials cannot be retrieved back in clear text. Credentials are stored at the workspace level and therefore are visible to all applications.

To update the Web Credential in Oracle APEX:

  1. You need access to an OCI API Key Pair. To generate an OCI Key pair, refer to Lab 3: Task 1 : Generate API keys using OCI Console

Skip this step if you already have the API key.

  1. On the Workspace home page, click App Builder.

    Click App Builder

  2. Click Workspace Utilities.

    Click Workspace Utilities

  3. Select Web Credentials.

    Click Web Credentials

  4. Click apex_ai_cred.

    Create Web Credentials

  5. Enter the following details using the configuration file you copied while generating an API key in OCI Console.

    • Name: apex_ai_cred

    • Authentication Type: OCI Native Authentication

    • OCI User ID: Enter the OCID of the Oracle Cloud user Account. You can find the OCID in the Configuration File Preview generated during the API Key creation. Your OCI User ID looks similar to ocid1.user.oc1..aaaaaaaa******wj3v23yla

    • OCI Private Key: Open the private key (.pem file) downloaded in the previous task. Copy and paste the API Key.

      Private key file

    • OCI Tenancy ID: Enter the OCID for Tenancy. Your Tenancy ID looks similar to ocid1.tenancy.oc1..aaaaaaaaf7ush****cxx3qka

    • OCI Public Key Fingerprint: Enter the Fingerprint ID. Your Fingerprint ID looks similar to a8:8e:c2:8b:fe:****:ff:4d:40

    Web Credentials page

  6. Click Apply Changes.

To Enable Generative AI in Oracle APEX:

  1. Click Workspace Utilities.

    "Page Designer"

  2. Click Generative AI.

    "Page Designer"

  3. Click OCI Gen AI.

    "Page Designer"

  4. In the Compartment ID field, enter your Compartment ID and click Apply Changes. (Refer to the Documentation to fetch your Compartment ID.)

    "Page Designer"

Task 3: Configure Vector Search using Search Configurations

  1. To load the ONXX Model, refer to Lab 7: Task 2: Load the ONNX Model.

  2. Expand App Builder, then select All Workspace Utilities and click Workspace Utilities.

    "Page Designer"

  3. Click Vector Providers.

    "Page Designer"

  4. Click DB ONXX Model

    "Page Designer"

  5. Enter/select the following and click Apply Changes.

    • Under Local Embedding:

      • For ONNX Model Owner: Select your Parsing Schema

      • ONNX Model Name: DOC_MODEL

    "Page Designer"

  6. Expand SQL Workshop and select SQL Commands.

    "Page Designer"

  7. Copy and paste the SQL code below, then click Run.

    update HIGH_SCHOOL_INFO set chunk_v = apex_ai.get_vector_embeddings(p_value => chunk_c, p_service_static_id => 'db_onnx_model');

    "Page Designer"

  8. All set. Now, run the application and see it in action! Follow Lab 6: Run the Application to run the app.

Acknowledgments

  • Author - Apoorva Srinivas, Senior Product Manager
  • Last Updated By/Date - Apoorva Srinivas, Senior Product Manager, February 2025

How to Translate This Page

You must be on the livelabs.oracle.com domain to use translations.
They are not available on apexapps.oracle.com.

For the best translation experience, we recommend Google Chrome.

  1. Right-click anywhere on the page and choose “Translate to
    [Your Language]”
    .
  2. If that option doesn’t appear, click the ⋮ three-dot menu in the
    top-right corner of Chrome.
  3. Select “Translate” from the dropdown.
  4. Then, click the translate icon Translate icon in the address bar.
  5. If needed, click the ⋮ three-dot menu within the Google
    Translate popup and choose your preferred language.