Skip to content

Commit dedeed2

Browse files
1.0.0 release (#2)
* Trust App * Business App * release 1.0.0 * Documentation fixes --------- Co-authored-by: luke_farley <[email protected]> Co-authored-by: Luke Farley <[email protected]>
1 parent 0cff18e commit dedeed2

File tree

486 files changed

+112507
-31342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

486 files changed

+112507
-31342
lines changed

.gitignore

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ __pycache__/
5555
!clientApp/trusted.png
5656
!clientApp/untrusted.png
5757
!/vbcs_oda_archives/vbcs_apps/vbcs-askdata/webApps/nl2sqlbot/resources/images/*
58+
!deployment-docs/docs/deployment/function/*
59+
!deployment-docs/docs/deployment/trust-api-gw/*
60+
!deployment-docs/docs/deployment/adw/*
61+
!deployment-docs/docs/deployment/oda/*
5862

5963
# Added images for documentation (redacted)
6064
!deployment-docs/docs/deployment/business_media/media/*
@@ -74,6 +78,7 @@ __pycache__/
7478

7579
*.ico
7680
!/vbcs_oda_archives/vbcs_apps/vbcs-askdata/webApps/nl2sqlbot/resources/images/*
81+
!/rest/nl2sql-trust/static/*
7782

7883
*.docx
7984

@@ -84,8 +89,10 @@ __pycache__/
8489
*.xlsx
8590
*.zip
8691
/rest/nl2sql-trust/.coverage
87-
*.tgz
8892

93+
*.tgz
94+
# webview binary required to import
95+
!/vbcs_oda_archives/oda/askdata-oda-base/webviewPackages/NL2SQLFeedbackFormService/nl2sql_feedback_spa_form.tgz
8996
# WebSDK should be included in VBCS Applications
9097
/oda/websdk-apache-deploy/
9198

@@ -101,18 +108,14 @@ clientApp/autoprompt/semantic_suggest_runbook.md
101108
deployment-docs/docs/deployment/nginx.md
102109

103110
deployment-docs/docs/deployment/terraform_p.md
104-
deployment-docs/docs/deployment/trust-service.c.md
105-
deployment-docs/docs/deployment/trust-ui.md
106-
deployment-docs/docs/deployment/trust-service.md
111+
107112
deployment-docs/docs/deployment/let_s_encrypt.md
108113
deployment-docs/docs/deployment/let_s_encrypt_orig.md
109114

110115
deployment-docs/docs/rest/
111116
deployment-docs/docs/templates/
112117
deployment-docs/docs/logging.md
113118

114-
deployment-docs/docs/deployment/apex-trust.md
115-
deployment-docs/docs/deployment/apex-trust-lb.md
116119

117120
# File with reference to orahub repo
118121
deployment-docs/mkdocs.yml
@@ -143,37 +146,16 @@ deployment-docs/mkdocs.yml
143146
# Sensitive info
144147
/promotion/
145148

146-
# Adding entire rest trust directory for now, since there's a dependency on dotmap
147-
# can maybe add delta review for next release
148-
rest/
149-
150149
# Random IPs
151150
/rest/nl2sql-trust/conf/dev_trust_config.json
152-
/rest/nl2sql-trust/conf/metadata_v2.json
153-
#/rest/nl2sql-trust/conf/trust_config.json # added placeholders for sensitive info
154151

155-
# Sensitive info
156-
/rest/nl2sql-trust/helpers/config_json_helper.py
157-
/rest/nl2sql-trust/helpers/config_json_helper.py
158-
159-
# Reference to genai dedicated cluster
160-
/rest/nl2sql-trust/helpers/finetune_helper.py
161-
162-
# Couldn't find any reference upon first glance, but I imagine there might be if finetune helper has a reference
163-
/rest/nl2sql-trust/helpers/finetune_db.py
164-
165-
# Reference to OCIDs
166-
/rest/nl2sql-trust/helpers/llm_helper.py
167-
#/rest/nl2sql-trust/helpers/oci_helper_boostrap.py # cleaned up sensitive info
168-
/rest/nl2sql-trust/helpers/oci_helper_json.py
152+
#/rest/nl2sql-trust/conf/trust_config.json # added placeholders for sensitive info
169153

170154
/rest/nl2sql-trust/helpers/test_ca_creation.json
171155

172156
# wallet
173157
/rest/nl2sql-trust/wallet/
174158

175-
# Do we need this ?
176-
/rest/nl2sql-trust/htmlcov
177159

178160
# keys
179161
/rest/nl2sql-trust/openssl/
@@ -230,8 +212,9 @@ rest/
230212
/rest/script/find_by_freeform.bash
231213
/rest/script/find_by_tags.bash
232214

233-
# log file
234-
/rest/script/nl2sql_trust_rest.log
215+
# log files
216+
*.log
217+
*.out
235218

236219
# sensitive info
237220
/rest/script/os_upload.bash

README.md

Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,52 @@ Oracle AskData is a conversational AI platform powered by Oracle Generative AI.
88

99
The solution empowers both non-technical users and SQL experts by simplifying complex queries and freeing up time for deeper analysis and decision-making.
1010

11-
1211
## Getting Started
1312
Please see the [Introduction](deployment-docs/docs/deployment/introduction.md) & [Architecture](deployment-docs/docs/deployment/architecture.md)
1413

15-
For policies see [Defining Policies](deployment-docs/docs/deployment/generic.md#dynamic-groups)
14+
For policies see [Defining Policies](deployment-docs/docs/deployment/generic.md#dynamic-groups).
15+
16+
This solution is broken down into two separate apps, business and trust. It's recommended to start with the business app then build the trust app.
1617

1718
### Prerequisites
19+
1820
The CIS Landing Zone is optional but helps with providing a sandbox environment with best practices
1921

2022
- [Deploy CIS LZ](deployment-docs/docs/deployment/landing_zone.md)
2123

22-
2324
This solution assumes you have access to an OCI tenancy with the admin ability to provision the following resources:
2425

25-
- IDCS/IAM Confidential App
26-
- [Deploy IAM App](deployment-docs/docs/deployment/business_idcs.md)
27-
- Vault
28-
- [Deploy Vault](deployment-docs/docs/deployment/vault.md)
29-
- Business (Client) ADB database
30-
- [Deploy Database](deployment-docs/docs/deployment/database.md)
31-
- Trust ADB database
32-
- [Deploy Database](deployment-docs/docs/deployment/database.md)
33-
- OCI Cache
34-
- [Deploy OCI Cache Cluster](https://docs.oracle.com/en-us/iaas/Content/ocicache/createcluster.htm#top)
35-
- VCN
36-
- Private Subnet
37-
- Public Subnet
38-
- [Deploy a VCN](https://docs.oracle.com/en-us/iaas/Content/Network/Tasks/quickstartnetworking.htm#Virtual_Networking_Quickstart)
39-
- Two VMs
40-
- Engine
41-
- [Deploy Engine Documentation](deployment-docs/docs/deployment/nl2sql_engine.md)
42-
- Bastion/jump host
43-
- To access engine in private subnet
44-
- API Gateway
45-
- [Deploy API Gateway](deployment-docs/docs/deployment/business_api_gateway.md)
46-
- (Optional) If deploying API Gateway privately, see [ADW API Gateway Private Access](deployment-docs/docs/deployment/adw_private.md)
47-
- VBCS
48-
- [Deploy VBCS](deployment-docs/docs/deployment/VBCS.md)
49-
- ODA
50-
- [Deploy ODA](deployment-docs/docs/deployment/oda.md)
51-
## Deployment Steps
52-
53-
1. Configure Business DB
54-
2. Configure Trust DB
55-
3. Configure IDCS App
56-
4. Configure OCI Cache
57-
4. Configure Engine
58-
5. Configure API Gateway
59-
6. Configure ODA Skills
60-
7. Configure VB Apps
26+
### Business App
27+
28+
#### Deployment Steps
29+
30+
1. [Deploy Business Database](deployment-docs/docs/deployment/database.md)
31+
2. [Deploy Trust Database](deployment-docs/docs/deployment/database.md)
32+
3. [Deploy Business IAM App](deployment-docs/docs/deployment/business_idcs.md)
33+
4. [Deploy OCI Cache Cluster](https://docs.oracle.com/en-us/iaas/Content/ocicache/createcluster.htm#top)
34+
5. [Deploy VCN](https://docs.oracle.com/en-us/iaas/Content/Network/Tasks/quickstartnetworking.htm#Virtual_Networking_Quickstart)
35+
6. [Deploy Engine Documentation](deployment-docs/docs/deployment/nl2sql_engine.md)
36+
7. [Deploy Vault](deployment-docs/docs/deployment/vault.md)
37+
8. [Deploy Business API Gateway](deployment-docs/docs/deployment/business_api_gateway.md)
38+
- (Optional) If deploying API Gateway privately, see [ADW API Gateway Private Access](deployment-docs/docs/deployment/adw_private_config.md)
39+
9. [Deploy ODA](deployment-docs/docs/deployment/oda.md)
40+
10. [Deploy VBCS](deployment-docs/docs/deployment/VBCS.md)
41+
42+
### Trust App
43+
44+
[Trust Service Overview](deployment-docs/docs/deployment/trust-service-overview.md)
45+
46+
#### Deployment Steps
47+
48+
1. [Deploy Trust VM](deployment-docs/docs/deployment/trust-service.c.md)
49+
2. [Deploy IDCS/IAM APEX App](https://docs.oracle.com/en/learn/apex-identitydomains-sso/index.html#task-3-create-a-new-web-credential-in-your-oracle-apex-workspace)
50+
- (Required) For IDCS security to the API Gateway, in addition to above configure the following:
51+
- Client Credentials: Enabled
52+
- Allowed operations: Introspect
53+
3. [Deploy Trust API Gateway](deployment-docs/docs/deployment/trust-api-gateway.md)
54+
4. [Deploy APEX](deployment-docs/docs/deployment/apex-trust.md)
55+
- (Optional) For using a private ADW with APEX, see [Configure Private ADW ACL](deployment-docs/docs/deployment/apex-private-adw-lb.md)
56+
- (Optional) If using a private ADW, see [Deploy Private ADB Load Balancer](deployment-docs/docs/deployment/apex-private-adw-lb.md)
6157

6258
### Validation
6359

clientApp/ConfigFile.properties

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,28 @@ file.level=DEBUG
77
console.level=DEBUG
88
logs.path=./logs
99
[FeatureFlags]
10+
feature.dynamicprompt=true
1011
feature.explain=false
1112
feature.intent=false
1213
feature.llmgraphcheck=false
14+
feature.chatgraph=false
1315
[security]
1416
anonymous.flag=true
1517
[DatabaseSection]
16-
#database.user=ttech
17-
database.user=nl2sql_app_data
18-
database.password=<client-database-pw>
19-
database.dsn=<client-database-dsn>
20-
database.config=<client-db-path>
21-
database.walletpsswd=<client-db-wallet-pw>
18+
database.user=xxx
19+
database.password_secret =ocid1.vaultsecret.oc1.us-chicago-1.xxx
20+
database.dsn=askdataclientdb_medium
21+
database.config=./clientdb
22+
database.walletpsswd=xxx
2223
database.debug=Y
2324
database.rbac=N
2425
[KeySection]
2526
key.llm=notused
2627
key.searchapi=notused
2728
token=notused
2829
[RedisSection]
29-
redis.url=<rediss://xyz.redis.us-chicago-1.oci.oraclecloud.com>:6379
30-
url=<xyz>.redis.us-chicago-1.oci.oraclecloud.com
30+
redis.url=rediss://xxx.redis.us-chicago-1.oci.oraclecloud.com:6379
31+
url=xxx.redis.us-chicago-1.oci.oraclecloud.com
3132
port=6379
3233
[GenAISQLGenerator]
3334
sql.dialect=Oracle
@@ -38,22 +39,20 @@ filter.upn=notused
3839
filter.ignoreupntablelist=notused
3940
[vbcs]
4041
# endpoint url should be the root e.g. endpoint.url=https://<your-vb>.oraclecloud.com/ic/builder/rt/
41-
endpoint.url=<vbcs-endpoint-url>
42+
endpoint.url=https://vb-xxx.builder.us-chicago-1.ocp.oraclecloud.com/ic/builder/rt/
4243
# graph url should be relative to endpoint url e.g. <your-graph-app>/1.0/webApps/nl2sql_interactivegraph/
43-
graph_app.url=<graph-app-url>
44+
graph_app.url=interactive_graph_app_v2/1.0/webApps/nl2sql_interactivegraph/
4445
# table graph should also be relative
45-
idata_app.url=<table-graph-url>
46+
idata_app.url=table_graph_app_v2/1.0/webApps/dynamictabledata/
4647
[OCI]
47-
#Sao Paulo
48-
#serviceendpoint.url=https://inference.generativeai.sa-saopaulo-1.oci.oraclecloud.com
4948
#Scenario2
5049
# DAC or DS or GAI
5150
serviceendpoint.active=GAI
5251
serviceendpoint.ds_endpt=<service-endpoint-url>
5352
serviceendpoint.ds_model=<service-endpoint-ds-model>
5453
serviceendpoint.url=https://inference.generativeai.us-chicago-1.oci.oraclecloud.com
55-
serviceendpoint.ocid=<service-endpoint-ocid>
56-
serviceendpoint.model=<service-endpoint-model>
54+
serviceendpoint.ocid=ocid1.compartment.oc1..xxx
55+
serviceendpoint.model=ocid1.generativeaimodel.oc1.us-chicago-1.xxx
5756
serviceendpoint.dac_url=https://inference.generativeai.us-chicago-1.oci.oraclecloud.com
5857
serviceendpoint.dac_ocid=<comp-ocid>
5958
serviceendpoint.dac_endpt=<dac-endpoint-ocid>
@@ -68,10 +67,17 @@ file.embdgs=notused
6867
file.col_embdgs=notused
6968
librarymatch.threshold=0.80
7069
librarymatch.upperthreshold=1.0
71-
[DEFAULT]
72-
# trust db connection
73-
user=xxxxxx
74-
password=xxxxx
75-
dsn= xxxxx
76-
wallet_location=xxxx
77-
wallet_password=xxxxx
70+
[SemanticMatch]
71+
semantic.enabled=true
72+
semantic.fetchlimit=5
73+
semantic.additionalhint=Use ABS only when necessary.
74+
semantic.scorethreshold=0.6
75+
[SemiTrustedPath]
76+
semitrusted.enabled=true
77+
semitrusted.fetchlimit=3
78+
[DEFAULT]
79+
user=admin
80+
password_secret =ocid1.vaultsecret.oc1.us-chicago-1.xxx
81+
dsn=askdatatrustdb_medium
82+
wallet_location=./trustdb
83+
wallet_password=xxx

clientApp/audit_logging.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Copyright (c) 2021, 2025 Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
33

4-
import datetime
5-
from connect_vector_db import create_db_connection, load_config, close_db_connection
4+
from connect_vector_db import create_db_connection, load_config_db, close_db_connection
65
import logging
76

87
logger = logging.getLogger("app_logger")
@@ -14,7 +13,8 @@ def log_audit_test_insert(CERTIFIED_SCORE, PROMPT_TXT, SQL_QUERY, DB_RESPONSE_CO
1413
try:
1514
# Load the database configuration
1615
config_file = 'ConfigFile.properties'
17-
db_config = load_config(config_file)
16+
#db_config = load_config(config_file)
17+
db_config = load_config_db('trust', config_file)
1818

1919
# Create a database connection using the shared function
2020
connection = create_db_connection(db_config)

0 commit comments

Comments
 (0)