Configuring the OCI Vector Provider in APEX

In this blog, I configure the OCI Vector Provider in APEX and then test it out in SQL Workshop.
Alternative you can install ONNX on Autonomous DB quite easily by following this guide. If you want it on Premise then you first need to install DBMS_CLOUD and then follow this guide.
Prerequisites
Create OCI Credentials in APEX using this guide
23ai DB Optional/Recommended if you are storing vectors.
Instructions
In APEX click App Builder > Workspace Utilities > Vector Provider > Create
Complete the screen as follows

The Compartment ID should be your Tenancy ID which you can get from this Guide
Select the Region as per your Tenancy Region. Note: In my case, I choose eu-frankfurt-1
Click Save
Testing
Use SQL Workshop > SQL Commands
In SQL Commands use this to test
DECLARE l_vector vector; BEGIN l_vector := apex_ai.get_vector_embeddings( p_value => 'What is Oracle APEX', p_service_static_id => 'OCI_VECTOR' ); dbms_output.put_line (TO_CHAR(l_vector)); END;It should look like this

ENJOY!
What's the picture? A mass of tree roots near Hookstone Trails. Visit Yorkshire!
About the author
With around 20 years on the job, Matt is one of the most experienced software developers at Pretius. He likes meeting new people, traveling to conferences, and working on different projects.
He’s also a big sports fan (regularly watches Leeds United, Formula 1, and boxing), and not just as a spectator – he often starts his days on a mountain bike, to tune his mind.
Comments
Join the discussionNo comments yet. Be the first to comment.






