diff --git a/plsql-rag-23ai/lab0/images/add-api-key-fingerprint.png b/plsql-rag-23ai/lab0/images/add-api-key-fingerprint.png index ddba2e4..a388bd6 100644 Binary files a/plsql-rag-23ai/lab0/images/add-api-key-fingerprint.png and b/plsql-rag-23ai/lab0/images/add-api-key-fingerprint.png differ diff --git a/plsql-rag-23ai/lab0/images/api-configfilepreview.png b/plsql-rag-23ai/lab0/images/api-configfilepreview.png index bbb0aa1..c763f2a 100644 Binary files a/plsql-rag-23ai/lab0/images/api-configfilepreview.png and b/plsql-rag-23ai/lab0/images/api-configfilepreview.png differ diff --git a/plsql-rag-23ai/lab0/images/tenancy-ocid.png b/plsql-rag-23ai/lab0/images/tenancy-ocid.png index 499e06a..f642b33 100644 Binary files a/plsql-rag-23ai/lab0/images/tenancy-ocid.png and b/plsql-rag-23ai/lab0/images/tenancy-ocid.png differ diff --git a/plsql-rag-23ai/lab0/lab0.md b/plsql-rag-23ai/lab0/lab0.md index fc6803d..2f258d9 100644 --- a/plsql-rag-23ai/lab0/lab0.md +++ b/plsql-rag-23ai/lab0/lab0.md @@ -4,6 +4,8 @@ In this lab you will setup access from ADB to OCI GenAI service. +Oracle's GenAI service is an LLM service from Oracle Cloud Infrastructure (OCI). The OCI GenAI service provides access to several LLMs that you can pick from. To enable client applications to access these services, authentication is required. This is accomplished through public and private api keys. The public key is created in the user cloud account, while the corresponding private key is stored on the server where the application runs. + *Estimated Lab Time*: 10 minutes ### Objectives: @@ -12,10 +14,6 @@ In this lab you will setup access from ADB to OCI GenAI service. ### Prerequisites: * You need an Oracle Cloud tenancy and the ability to grant privileges to groups - -## **Introduction** -Oracle's GenAI service is an LLM service from Oracle Cloud Infrastructure (OCI). The OCI GenAI service provides access to several LLMs that you can pick from. To enable client applications to access these services, authentication is required. This is accomplished through public and private api keys. The public key is created in the user cloud account, while the corresponding private key is stored on the server where the application runs. - ## **Task 1:** Get your credential information to access OCI APIs ### Fingerprint and private key @@ -39,7 +37,7 @@ Oracle's GenAI service is an LLM service from Oracle Cloud Infrastructure (OCI). ![](images/add-api-key-dialog2.png " ") -1. Click the **Add** button in the **Add API Key** dialog. The *Configuration File Preview* dialog opens. Follow the instructions in the **Note** to copy the contents of the text box into a file. +6. Click the **Add** button in the **Add API Key** dialog. The *Configuration File Preview* dialog opens. Follow the instructions in the **Note** to copy the contents of the text box into a file. ![](images/api-configfilepreview.png " ") @@ -88,30 +86,30 @@ Note: This policy allows any database in the specified compartment to access OCI 2. Change directory to /home/oracle/AIdemo 3. Using an editor such as vi, edit and replace the credential information below with your information in the file create_credential.sql: - user\_ocid - tenancy\_ocid - compartment_ocid - private\_key - Important Note: Put the private key all on a single line. - fingerprint - -``` - -declare - jo json_object_t; -begin - jo := json_object_t(); - jo.put('user_ocid','ocid1.user.oc1..aabbalbbaa1112233aabb...'); - jo.put('tenancy_ocid','ocid1.tenancy.oc1..aaaaalbbbb1112233aaaab...'); - jo.put('compartment_ocid','ocid1.compartment.oc1..ababalabab1112233ababa...'); - jo.put('private_key','AAAaaaBBB11112222333...AAA111AAABBB222aaa1a...'); - jo.put('fingerprint','01:1a:a1:aa:12:a1:12:1a:ab:12:01:ab:...'); - dbms_vector.create_credential( - credential_name => 'GENAI_CRED', - params => json(jo.to_string)); -end; -/ - -``` + * user\_ocid + * tenancy\_ocid + * compartment_ocid + * private\_key - *(Important Note: Put the private key all on a single line.)* + * fingerprint + + ``` + + declare + jo json_object_t; + begin + jo := json_object_t(); + jo.put('user_ocid','ocid1.user.oc1..aabbalbbaa1112233aabb...'); + jo.put('tenancy_ocid','ocid1.tenancy.oc1..aaaaalbbbb1112233aaaab...'); + jo.put('compartment_ocid','ocid1.compartment.oc1..ababalabab1112233ababa...'); + jo.put('private_key','AAAaaaBBB11112222333...AAA111AAABBB222aaa1a...'); + jo.put('fingerprint','01:1a:a1:aa:12:a1:12:1a:ab:12:01:ab:...'); + dbms_vector.create_credential( + credential_name => 'GENAI_CRED', + params => json(jo.to_string)); + end; + / + + ``` 4. Go to /home/oracle/AIdemo 5. sqlplus vector/vector@freepdb1 6. SQL> @dropcred.sql diff --git a/plsql-rag-23ai/prepare-setup/prepare-setup.md b/plsql-rag-23ai/prepare-setup/prepare-setup.md index 16f507c..b5551f1 100644 --- a/plsql-rag-23ai/prepare-setup/prepare-setup.md +++ b/plsql-rag-23ai/prepare-setup/prepare-setup.md @@ -1,7 +1,7 @@ # Prepare Setup ## Introduction -This lab will show you how to download the Oracle Resource Manager (ORM) stack zip file needed to setup the resource needed to run this workshop. This workshop requires a compute instance running the *Oracle Database 19c on LiveLabs* Marketplace image and a Virtual Cloud Network (VCN). +This lab will show you how to download the Oracle Resource Manager (ORM) stack zip file needed to setup the resource needed to run this workshop. This workshop requires a compute instance running the *Oracle Database 23ai on LiveLabs* Marketplace image and a Virtual Cloud Network (VCN). *Estimated Lab Time:* 10 minutes @@ -48,4 +48,4 @@ You may now [proceed to the next lab](#next). ## Acknowledgements * **Author** - Rene Fontcha, LiveLabs Platform Lead, NA Technology * **Contributors** - Meghana Banka -* **Last Updated By/Date** - Rene Fontcha, LiveLabs Platform Lead, NA Technology, October 2021 \ No newline at end of file +* **Last Updated By/Date** - Rajeev Rumale, Database Product Management, August 2024 \ No newline at end of file diff --git a/plsql-rag-23ai/workshops/freetier/manifest.json b/plsql-rag-23ai/workshops/freetier/manifest.json index d3be3ea..ab5c22e 100644 --- a/plsql-rag-23ai/workshops/freetier/manifest.json +++ b/plsql-rag-23ai/workshops/freetier/manifest.json @@ -15,7 +15,7 @@ { "title": "Prepare Setup", "description": "How to download your ORM stack and update security rules for an existing VCN", - "publisheddate": "09/28/2020", + "publisheddate": "08/20/2024", "filename": "../../prepare-setup/prepare-setup.md" }, {