Skip to content

Commit f1670bc

Browse files
authored
Merge branch 'main' into sync-oci-enterprise-ai-chat-v0.9.9
2 parents de79e88 + 12d09b4 commit f1670bc

198 files changed

Lines changed: 22967 additions & 1106 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copy this file to .env and replace the placeholder values before running the notebooks.
2+
# Do not commit your real .env file.
3+
4+
# OCI API key authentication profile from ~/.oci/config.
5+
OCI_PROFILE=DEFAULT
6+
OCI_CONFIG_FILE=~/.oci/config
7+
8+
# OCI compartment where Generative AI access is allowed.
9+
OCI_COMPARTMENT_ID=replace_with_compartment_ocid
10+
11+
# Region-specific OCI Generative AI inference endpoint.
12+
GENAI_ENDPOINT=https://inference.generativeai.<region>.oci.oraclecloud.com
13+
14+
# Model IDs available in your tenancy and region.
15+
# For Guide 00 and Guide 01, use a Cohere chat model if CHAT_REQUEST_FORMAT=COHERE.
16+
CHAT_MODEL_ID=replace_with_chat_model_id
17+
EMBED_MODEL_ID=cohere.embed-english-v3.0
18+
19+
# Keep COHERE to stay close to the written OCI SDK guide.
20+
# Use GENERIC only if your chosen chat model requires the generic messages format.
21+
CHAT_REQUEST_FORMAT=COHERE
22+
23+
# Chat generation controls.
24+
# CHAT_MAX_TOKENS is the visible answer budget.
25+
# CHAT_MAX_COMPLETION_TOKENS is the total completion budget, including reasoning.
26+
# Gemini 2.5 models may use many tokens for reasoning before returning visible text.
27+
CHAT_MAX_TOKENS=1024
28+
CHAT_MAX_COMPLETION_TOKENS=8192
29+
CHAT_REASONING_EFFORT=LOW
30+
31+
# Oracle Database 26ai connection used by Guide 01.
32+
# DB_DSN can be a full connect descriptor, wallet alias, or host:port/service_name.
33+
TNS_ADMIN=wallets/genai_workshop_db
34+
DB_USER=replace_with_database_user
35+
# PLEASE CHANGE YOUR_PASSWORD TO A REAL PASSWORD!
36+
DB_PASSWORD=YOUR_PASSWORD
37+
# PLEASE CHANGE YOUR_PASSWORD TO A REAL PASSWORD!
38+
DB_WALLET_PASSWORD=YOUR_PASSWORD
39+
DB_DSN=replace_with_wallet_alias_low_or_medium
40+
DB_DOCS_TABLE=WORKSHOP_GENAI_DOCS
41+
42+
# Local OpenAI-compatible gateway used by Guide 03.
43+
GATEWAY_HOST=localhost
44+
GATEWAY_PORT=8088
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# OCI Generative AI Workshop Files
2+
3+
Run commands in this directory.
4+
5+
1. Install dependencies with `uv sync`.
6+
2. Copy `.env.example` to `.env`.
7+
3. Replace placeholder values in `.env`.
8+
4. Open the notebooks in `notebooks` or start the gateway with:
9+
10+
```bash
11+
uv run python -m uvicorn workshop_gateway.app:app --host localhost --port 8088
12+
```
13+
14+
Copyright (c) 2026 Oracle and/or its affiliates.
15+
16+
Licensed under the Universal Permissive License (UPL), Version 1.0.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"name": "OCI GenAI Gateway - Summarizer Demo",
3+
"nodes": [
4+
{
5+
"parameters": {
6+
"httpMethod": "POST",
7+
"path": "oci-genai-summary",
8+
"responseMode": "responseNode",
9+
"options": {}
10+
},
11+
"id": "b6f5b7d2-df7b-4d0a-b0e9-568fc6acb921",
12+
"name": "Webhook",
13+
"type": "n8n-nodes-base.webhook",
14+
"typeVersion": 2,
15+
"position": [
16+
-460,
17+
0
18+
]
19+
},
20+
{
21+
"parameters": {
22+
"method": "POST",
23+
"url": "http://host.docker.internal:8088/v1/chat/completions",
24+
"sendHeaders": true,
25+
"headerParameters": {
26+
"parameters": [
27+
{
28+
"name": "Content-Type",
29+
"value": "application/json"
30+
},
31+
{
32+
"name": "Authorization",
33+
"value": "Bearer not-used"
34+
}
35+
]
36+
},
37+
"sendBody": true,
38+
"specifyBody": "json",
39+
"jsonBody": "={\n \"model\": \"google.gemini-2.5-flash\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a concise assistant for a integration example. Return a 3-sentence summary.\"\n },\n {\n \"role\": \"user\",\n \"content\": $json.body.text\n }\n ],\n \"temperature\": 0.2,\n \"max_tokens\": 300\n}",
40+
"options": {}
41+
},
42+
"id": "2ff737cf-b299-4ca5-9c83-c4e5e40f3e4d",
43+
"name": "Call OCI GenAI Gateway",
44+
"type": "n8n-nodes-base.httpRequest",
45+
"typeVersion": 4.2,
46+
"position": [
47+
-160,
48+
0
49+
]
50+
},
51+
{
52+
"parameters": {
53+
"respondWith": "json",
54+
"responseBody": "={\n \"summary\": $json.choices[0].message.content,\n \"model\": $json.model,\n \"gateway_response_id\": $json.id\n}",
55+
"options": {}
56+
},
57+
"id": "9beb5173-e486-48b4-a551-a31b0567eeeb",
58+
"name": "Respond to Webhook",
59+
"type": "n8n-nodes-base.respondToWebhook",
60+
"typeVersion": 1.4,
61+
"position": [
62+
140,
63+
0
64+
]
65+
}
66+
],
67+
"connections": {
68+
"Webhook": {
69+
"main": [
70+
[
71+
{
72+
"node": "Call OCI GenAI Gateway",
73+
"type": "main",
74+
"index": 0
75+
}
76+
]
77+
]
78+
},
79+
"Call OCI GenAI Gateway": {
80+
"main": [
81+
[
82+
{
83+
"node": "Respond to Webhook",
84+
"type": "main",
85+
"index": 0
86+
}
87+
]
88+
]
89+
}
90+
},
91+
"pinData": {},
92+
"settings": {
93+
"executionOrder": "v1"
94+
},
95+
"staticData": null,
96+
"tags": [],
97+
"triggerCount": 0,
98+
"updatedAt": "2026-05-11T00:00:00.000Z",
99+
"versionId": "5aa64ad6-6e34-4a76-b096-5cb9f989d4ad"
100+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"text": "Oracle Database can store vectors for semantic search. OCI Generative AI can create embeddings and generate grounded answers. n8n can orchestrate low-code workflows by calling an OpenAI-compatible gateway."
3+
}

0 commit comments

Comments
 (0)