Skip to content

Commit 25b7c9e

Browse files
Merge pull request #99 from oracle-devrel/iopanait-develop36
There's a new workshop that will be using this. That workshop will al…
2 parents 02920ae + ca6fe75 commit 25b7c9e

File tree

6 files changed

+43
-10
lines changed

6 files changed

+43
-10
lines changed

cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-Select-AI-demonstration/provisioners.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ resource "null_resource" "sqlcl-create-usr" {
66
provisioner "local-exec" {
77
command = <<-EOT
88
9-
echo 'Download the apex application'
9+
echo 'Download the apex applications'
1010
chmod 777 ./scripts/
1111
wget https://objectstorage.us-ashburn-1.oraclecloud.com/p/JnW5Gl5btrPK_vx66MqWktIB_GKmdEkosRDcehPvc5hTGheJdD41pq2PmsBbdUUU/n/c4u04/b/building_blocks_utilities/o/select-ai-apex-demo/f101.sql -P ./scripts/
12+
wget https://objectstorage.us-ashburn-1.oraclecloud.com/p/JnW5Gl5btrPK_vx66MqWktIB_GKmdEkosRDcehPvc5hTGheJdD41pq2PmsBbdUUU/n/c4u04/b/building_blocks_utilities/o/select-ai-apex-demo/f100-genai-project.sql -P ./scripts/
1213
1314
# install the data
1415

cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-Select-AI-demonstration/schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ variables:
216216
description: "Enter your secret API key"
217217
type: string
218218
default: null
219-
required: true
219+
required: false
220220
visible: true
221221
tag:
222222
title: Pick the datasets to load.

cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-Select-AI-demonstration/scripts/init.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ begin
2424
p_schema => 'MOVIESTREAM',
2525
p_url_mapping_type => 'BASE_PATH',
2626
p_auto_rest_auth => TRUE
27-
);
27+
);
2828

29+
-- Allow MOVIESTREAM to use the resource principal
30+
dbms_cloud_admin.enable_resource_principal(username => 'MOVIESTREAM');
31+
2932
end;
3033
/
3134

cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-Select-AI-demonstration/scripts/install-apex-app.sql

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
-- as moviestream
2+
-- Chat ADB app
23
BEGIN
34
admin.workshop.write('setup for app install as moviestream', 2);
45

@@ -20,13 +21,28 @@ BEGIN
2021

2122
END;
2223
/
23-
2424
@./scripts/f101.sql
2525

26-
-- Setup Select AI
26+
-- GenAI Projects App
27+
BEGIN
28+
-- Setting the application id to 100
29+
apex_application_install.set_application_id(100);
30+
apex_application_install.generate_offset();
31+
32+
-- Setting application alias
33+
apex_application_install.set_application_alias('GENAI-PROJECTS');
34+
35+
-- Set Auto Install Supporting Objects
36+
apex_application_install.set_auto_install_sup_obj( p_auto_install_sup_obj => true );
37+
END;
38+
/
39+
@./scripts/f100-genai-project.sql
40+
41+
-- Setup Select AI. Create 2 profiles. One for chat and the other for GenAI projects
2742
begin
28-
admin.workshop.write('Setup ai profile', 2);
43+
admin.workshop.write('Setup ai profile for chat', 2);
2944

45+
-- Chat
3046
dbms_cloud_ai.drop_profile(
3147
profile_name => 'openai_gpt35',
3248
force => true
@@ -49,9 +65,22 @@ begin
4965
]
5066
}'
5167
);
52-
53-
dbms_cloud_ai.set_profile(
54-
profile_name => 'openai_gpt35'
68+
69+
admin.workshop.write('Setup GenAI projects AI profile', 2);
70+
71+
-- GenAI projects
72+
dbms_cloud_ai.drop_profile(
73+
profile_name => 'genai',
74+
force => true
5575
);
76+
77+
dbms_cloud_ai.create_profile(
78+
profile_name => 'genai',
79+
attributes =>
80+
'{"provider": "oci",
81+
"credential_name": "OCI$RESOURCE_PRINCIPAL"
82+
}'
83+
);
84+
5685
end;
5786
/

cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-Select-AI-demonstration/scripts/install-apex-workspace.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ DECLARE
77
l_schema_name VARCHAR2(100) := 'MOVIESTREAM';
88
l_workspace_usr_pwd VARCHAR2(100) := 'watchS0meMovies#';
99
begin
10-
admin.workshop.write('install Ask-Oracle', 1);
10+
admin.workshop.write('install APEX workspace', 1);
1111
admin.workshop.write('add workspace as admin', 2);
1212
apex_instance_admin.add_workspace(
1313
p_workspace_id => null,

0 commit comments

Comments
 (0)