In this blog post, I will explain how we can configure the Gen AI service of Oracle APEX using the Open AI LLM model.
Introduction: We can bring Gen AI capabilities based on large language models (LLms) to our applications built using Oracle APEX. The Gen AI service can be accessed through REST APIs, and by using the powerful REST Data Source capabilities of APEX, we can incorporate the advanced technology into our applications with a low-code approach.
Pre-Requisites:
STEP 1: Create Web Credentials in Oracle APEX
Log into APEX workspace and from the APEX home page, click App Builder.
Now Click on Workspace Utilities.
Now click on Web Credentials.
Click Create.
Name = Open AI
Static ID = Open AI
Authentication Type = HTTP Header
Credentials Name = Authorization
Credential Secret = Bearer <Your Open AI API Key> (note that there is space between Bearer and api key)
Valid for URL = https://api.openai.com /v1
STEP 2: Now we have Web Credential we are ready to configure Gen AI service in APEX.
Again go to Application Builder and click on Workspace Utilities and this time click on Gen AI Services.
AI Provider = Open AI ( as I am using Open AI, if you using other provider, select accordingly)
Name = ES Open AI Service (The name will be shown in the Generative AI Services overview page.)
Static ID = ES_OpenAI (The static ID is used when using the service with the APEX_AI package (APEX_AI.CHAT).)
Enable used by App builder
Make sure in the credential section web credentials are selected that we created in Step 1.
STEP 3: Now We click on SQL Workshop –> SQL Commands and see that we have the APEX Wizard button enabled now.
Click on APEX Assistant and accept, it will open APEX Wizard.
So we successfully configure Gen AI service with Apex.
In the next blog, I will show you how to use this Apex assistant.