-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WMSID:11620 -- Files for adding Brown Button support (#161)
* Removing unused files and folders Removing folder as discussed with Milton, the files are not in use. * Removing unused files Removing unused files and folder * WMSID:11620 -- Files for Brown Button Adding files for supporting Brown Button to WMSID:11620 - AI Vector Search - Complete RAG application with Oracle AI Vector Search and PLSQL
- Loading branch information
Showing
30 changed files
with
373 additions
and
83 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Lab 0: Setup to access OCI Generative AI Service | ||
|
||
## Introduction | ||
|
||
In this lab you will setup access from ADB to OCI GenAI service. | ||
|
||
*Estimated Lab Time*: 10 minutes | ||
|
||
### Objectives: | ||
* Learn the basic components of security authentication and authorization to use 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 | ||
|
||
1. Open the OCI Console, click the **Profile** icon, then select **User Settings**. | ||
|
||
![](images/new-profilename.png " ") | ||
|
||
2. The User Details page opens. Under Resources, on the lower left side of the page, select **API Keys** | ||
|
||
![](images/selectapikeys.png " ") | ||
|
||
3. Click the **Add API Key** button | ||
|
||
![](images/add-api-key.png " ") | ||
|
||
4. The Add API Key dialog box opens. Select option: **Generate API Key Pair** | ||
|
||
![](images/add-api-key-dialog1.png " ") | ||
|
||
5. Click the **Download Private Key** button and save the file to your local computer. Remember the location where you saved the private key file (username-date.pem). | ||
|
||
![](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. | ||
|
||
![](images/api-configfilepreview.png " ") | ||
|
||
7. Click **Close** on the *Configuration File Preview* dialog | ||
|
||
## **Task 2:** Copy your Compartment OCID | ||
|
||
1. Go to the OCI Console and use the hamburger menu to select **Identity & Security**, then, under *Identity*, select **Compartments**. | ||
![](./images/i-s-compartments.png " ") | ||
|
||
2. The *Compartments* page is displayed and lists all of the compartments. If you are using a new trial tenancy, you will have a root compartment. Click the name of the compartment where you will running this lab. | ||
|
||
3. On the *Compartment details* page, click **Copy** next to the compartment OCID. | ||
![](./images/compartment-copy.png " ") | ||
|
||
4. Save the compartment OCID for use later. | ||
|
||
## **Task 3:** Create policy to enable access to OCI GenAI | ||
|
||
Create an OCI policy to enable access to OCI GenAI service. | ||
Create a policy that will allow you to use OCI GenAI within your previously defined compartment. Make sure your policy uses the compartment where your database is deployed. The policy will be necessary for the database to interact with OCI Generative AI. | ||
|
||
1. From the Console, open the Navigation menu and click Identity & Security. Under Identity, click Policies. | ||
|
||
2. Click on Create policy and paste the following into the appropriate fields: | ||
|
||
Note: Slide the Show manual editor control to display the text field in order to paste the policy. | ||
|
||
Name: PublicGenAI | ||
|
||
Description: Public Gen AI Policy | ||
|
||
Compartment: select your own compartment | ||
|
||
Policy: allow any-user to manage generative-ai-family in compartment \<your compartment> | ||
|
||
3. Click Create. | ||
|
||
![](images/create-policy.png " ") | ||
|
||
Note: This policy allows any database in the specified compartment to access OCI Generative AI service. In a production environment, ensure your policy's scope is minimally inclusive. | ||
|
||
## **Task :4** Create the credentials for ADB to access OCI GenAI service | ||
|
||
1. Open a terminal window in your noVNC remote desktop | ||
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 | ||
|
||
``` | ||
<copy> | ||
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; | ||
/ | ||
</copy> | ||
``` | ||
4. Go to /home/oracle/AIdemo | ||
5. sqlplus vector/vector@freepdb1 | ||
6. SQL> @dropcred.sql | ||
7. SQL> @create_cred.sql | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# 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). | ||
|
||
*Estimated Lab Time:* 10 minutes | ||
|
||
### Objectives | ||
- Download ORM stack | ||
- Configure an existing Virtual Cloud Network (VCN) | ||
|
||
### Prerequisites | ||
This lab assumes you have: | ||
- An Oracle Free Tier or Paid Cloud account | ||
|
||
## Task 1: Download Oracle Resource Manager (ORM) stack zip file | ||
1. Click on the link below to download the Resource Manager zip file you need to build your environment: [ai-plsql-rag-ll-orm-mkplc-freetier.zip](https://oraclepartnersas.objectstorage.us-ashburn-1.oci.customer-oci.com/p/6Yg5KxmyFSWXouVoBS2yN77St1pCv3AhW7MjW6cetDpssjb37BXFUpqdrKS5ddcN/n/oraclepartnersas/b/aivs-ash/o/ai-plsql-rag-ll-orm-mkplc-freetier.zip) | ||
|
||
2. Save in your downloads folder. | ||
|
||
We strongly recommend using this stack to create a self-contained/dedicated VCN with your instance(s). Skip to *Task 3* to follow our recommendations. If you would rather use an exiting VCN then proceed to the next step as indicated below to update your existing VCN with the required Egress rules. | ||
|
||
## Task 2: Adding Security Rules to an Existing VCN | ||
This workshop requires a certain number of ports to be available, a requirement that can be met by using the default ORM stack execution that creates a dedicated VCN. In order to use an existing VCN the following ports should be added to Egress rules | ||
|
||
| Port |Description | | ||
| :------------- | :------------------------------------ | | ||
| 22 | SSH | | ||
| 6080 | noVNC Remote Desktop | | ||
|
||
1. Go to *Networking >> Virtual Cloud Networks* | ||
2. Choose your network | ||
3. Under Resources, select Security Lists | ||
4. Click on Default Security Lists under the Create Security List button | ||
5. Click Add Ingress Rule button | ||
6. Enter the following: | ||
- Source CIDR: 0.0.0.0/0 | ||
- Destination Port Range: *Refer to above table* | ||
7. Click the Add Ingress Rules button | ||
|
||
## Task 3: Setup Compute | ||
Using the details from the two Tasks above, proceed to the lab *Environment Setup* to setup your workshop environment using Oracle Resource Manager (ORM) and one of the following options: | ||
- Create Stack: *Compute + Networking* | ||
- Create Stack: *Compute only* with an existing VCN where security lists have been updated as per *Task 2* above | ||
|
||
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 |
1 change: 0 additions & 1 deletion
1
plsql-rag-23ai/transcripts/transcript_1_Overview_DBMS_VECTOR_CHAIN.mp4.json
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
plsql-rag-23ai/transcripts/transcript_1_Overview_DBMS_VECTOR_CHAIN.txt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
plsql-rag-23ai/transcripts/transcript_2_Vectorize_PDF_Chunks.mp4.json
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
plsql-rag-23ai/transcripts/transcript_2_Vectorize_PDF_Chunks.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="Oracle LiveLabs gives you access to Oracle's products to run a wide variety of labs and workshops; allowing you to experience our best technology, live!"> | ||
<title>Oracle LiveLabs</title> | ||
|
||
<script src="https://oracle-livelabs.github.io/common/redwood-hol/js/jquery-1.11.0.min.js"></script> | ||
<script src="https://oracle-livelabs.github.io/common/redwood-hol/js/jquery-ui-1.10.4.custom.js"></script> | ||
<script src="https://oracle-livelabs.github.io/common/redwood-hol/js/main.min.js"></script> | ||
|
||
<link rel="stylesheet" href="https://oracle-livelabs.github.io/common/redwood-hol/css/style.min.css" /> | ||
<link rel="shortcut icon" href="https://oracle-livelabs.github.io/common/redwood-hol/img/favicon.ico" /> | ||
</head> | ||
|
||
<body> | ||
<header class="hol-Header" role="banner"> | ||
<div class="hol-Header-wrap"> | ||
<div class="hol-Header-logo"><span>Oracle LiveLabs</span></div> | ||
<a href="https://developer.oracle.com/livelabs" target="_blank" id="livelabs" title="Oracle LiveLabs"></a> | ||
<div class="hol-Header-actions"> | ||
<button id="openNav" class="hol-Header-button hol-Header-button--menu rightNav" aria-label="Open Menu" | ||
title="Open Menu"> | ||
<span class="hol-Header-toggleIcon"></span> | ||
</button> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
<div id="container"> | ||
<div id="leftNav"> | ||
<div id="toc"></div> | ||
</div> | ||
<div id="contentBox"> | ||
<main class="hol-Content" id="module-content"></main> | ||
</div> | ||
</div> | ||
|
||
<footer class="hol-Footer"> | ||
<a class="hol-Footer-topLink" href="#top">Return to Top</a> | ||
<div id="footer-banner"><div class="footer-row"> | ||
<div class="footer-content"><ul class="footer-links"> | ||
<li><a href="https://docs.oracle.com/pls/topic/lookup?ctx=en/legal&id=cpyr" target="_blank" aria-label="Open a new window to Oracle legal notices" data-lbl="copyright">© Oracle</a></li> | ||
<li><a href="https://www.oracle.com/corporate/index.html" target="_blank" aria-label="Open a new window to learn more about oracle" data-lbl="about-oracle">About Oracle</a></li> | ||
<li><a href="https://www.oracle.com/corporate/contact/" target="_blank" aria-label="Open a new window to contact oracle" data-lbl="contact-us">Contact Us</a></li> | ||
<li class="footer-links-break"></li> | ||
<li><a href="https://docs.oracle.com/en/browseall.html" target="_blank" aria-label="Open a new window to products a-z" data-lbl="products-a-z">Products A-Z</a></li> | ||
<li><a href="https://www.oracle.com/legal/privacy/" target="_blank" aria-label="Open a new window to read more about Oracle terms of use and privacy" data-lbl="terms-of-use-and-privacy">Terms of Use & Privacy</a></li> | ||
<li><a href="https://www.oracle.com/legal/privacy/privacy-policy.html#11" target="_blank" aria-label="Open a new window to read more about manaing Oracle cookie preferences" data-lbl="cookie-preferences">Cookie Preferences</a></li> | ||
<li><a href="https://www.oracle.com/legal/privacy/marketing-cloud-data-cloud-privacy-policy.html#adchoices" target="_blank" aria-label="Open a new window to ad choices" data-lbl="ad-choices">Ad Choices</a></li> | ||
<li class="footer-links-break"></li><li class="last"><a href="https://docs.oracle.com/pls/topic/lookup?ctx=en/legal&id=cpyr" target="_blank" aria-label="Open a new window to Oracle legal notices" data-lbl="copyright">© Oracle</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</footer> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"workshoptitle": "AI Vector Search - Complete RAG application with Oracle AI Vector Search and PLSQL", | ||
"help": "livelabs-help-db_us@oracle.com", | ||
"tutorials": [ | ||
{ | ||
"title": "Introduction", | ||
"description": "Introduction", | ||
"filename": "../../introduction/introduction.md" | ||
}, | ||
{ | ||
"title": "Lab 0: Set up access to OCI Generative AI Service", | ||
"description": "Configure access to OCI Generative AI Service.", | ||
"filename": "../../lab0/lab0.md" | ||
}, | ||
{ | ||
"title": "Lab 1: Build and Run the RAG Application with Oracle AI Vector Search and PLSQL", | ||
"description": "Hands-on lab for building and running the RAG Application.", | ||
"filename": "../../lab1/lab1.md" | ||
}, | ||
{ | ||
"title": "Lab 2: Run the RAG application with an interactive UI", | ||
"description": "Run the Streamlit RAG Application.", | ||
"filename": "../../lab2/lab2.md" | ||
}, | ||
{ | ||
"title": "Need Help?", | ||
"description": "Solutions to Common Problems and Directions for Receiving Live Help", | ||
"filename": "https://oracle-livelabs.github.io/common/labs/need-help/need-help-freetier.md" | ||
} | ||
] | ||
} |
Oops, something went wrong.