APEX and GPT-3

APEX and GPT-3

It's Kinda like ChatGPT

Michska and I built a quick application that uses the OpenAI GPT-3 REST API to show results through an APEX application. It's a quick and easy build. You can play with it here: https://apex.oracle.com/pls/apex/r/anton/ait99-gpt-3/gpt-3

Just put your email as a username, you won't need a password.


If you just want to get the application up and running, do the following:

  1. Download the APEX application export file (f_gpt-3.sql) from here: https://github.com/ainielse/rando

  2. Import into your APEX (22.2 or higher) workspace.

  3. Sign up for an OpenAI account here: https://openai.com/api/

  4. Create a new secret key

  5. When you imported the APEX application it created a web credential: Credentials for OpenAI - GP3. You need to enter the SECRET KEY you just created to that credential. The format is
    Bearer blah-bla-bl-blah
    Bearer [Your SECRET KEY]

  6. That's it...Run your application

You're a visual learner

Check out the YouTube video about it: https://www.youtube.com/watch?v=wDmngdO5lDw

Potential Pitfalls

Your database may have restrictions about what networks you can access (Network ACLs). Check out my ACL post:

If you get an error complaining about TLS/SSL certificates, here is a script for getting all of the certs you are likely to need into your wallet: