Skip to content

Commit cb1b839

Browse files
authored
Merge pull request #5 from oracle-devrel/markdown-updates
Markdown updates
2 parents f455214 + b7122b9 commit cb1b839

File tree

1 file changed

+84
-48
lines changed

1 file changed

+84
-48
lines changed

README.md

Lines changed: 84 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,37 @@ Oracle JET(Preact) allows you to craft pixel-perfect UIs which are fast, lightwe
1010

1111
Oracle's Generative AI service allows developers to unlock a better user experience for chat systems, question-and-answer solutions, and much more. This project provides a front end to that service so you can experiment and get a sense of the immense power of Oracle Generative AI. This is an excellent starting point on your AI journey, and experienced developers will be able to quickly port their LLMs to leverage this powerful service.
1212

13-
![alt text here](images/demo.gif)
13+
Check out [demo here](https://youtu.be/hpRoQ93YeaQ)
1414

15-
Check [demo here](https://youtu.be/hpRoQ93YeaQ)
15+
![alt text here](images/demo.gif)
1616

1717
## Getting Started
1818

19-
### 0. Set up
19+
### 0. Prerequisites and setup
20+
21+
- Oracle Cloud Infrastructure (OCI) Account
22+
- Oracle Cloud Infrastructure (OCI) Generative AI Service - [Getting Started with Generative AI](https://docs.oracle.com/en-us/iaas/Content/generative-ai/getting-started.htm)
23+
- Oracle Cloud Infrastructure Documentation - [Generative AI](https://docs.oracle.com/en-us/iaas/Content/generative-ai/home.htm)
24+
- Oracle Cloud Infrastructure (OCI) Generative AI Service SDK - [Oracle Cloud Infrastructure Python SDK](https://pypi.org/project/oci/)
25+
- Node v16 - [Node homepage](https://nodejs.org/en)
26+
- Oracle JET v15 - [Oracle JET Homepage](https://www.oracle.com/webfolder/technetwork/jet/index.html)
2027

2128
Follow the links below to generate a config file and a key pair in your ~/.oci directory
2229

2330
- [SDK config](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm)
2431
- [API signing key](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm)
2532
- [CLI install](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#configfile)
2633

27-
After completion, you should have the following 2 things in your `~/.oci directory `
28-
29-
a. A config file(where key file point to private key:key_file=`~/.oci/oci_api_key.pem`)
30-
b. A key pair named `oci_api_key.pem` and `oci_api_key_public.pem`
31-
Now make sure you change the reference of the key file in the config file (where the key file points to private key:key_file=/YOUR_DIR_TO_KEY_FILE/oci_api_key.pem)
34+
After completion, you should have the following 2 things in your `~/.oci directory`
3235

36+
- A config file(where key file point to private key:key_file=`~/.oci/oci_api_key.pem`)
37+
- A key pair named `oci_api_key.pem` and `oci_api_key_public.pem`
38+
- Now make sure you change the reference of the key file in the config file
3339
- Append OCI Generative-AI service compartment and endpoint URL
34-
`vim service/python/server.py`
40+
41+
```console
42+
vim service/python/server.py
43+
```
3544

3645
```Python
3746
#TODO: Update this section with your tenancy details
@@ -52,14 +61,20 @@ generative_ai_inference_client = (
5261
### 1. (Optional) Modify websocket ports
5362

5463
- In the root of the project directory run to edit ports
55-
`vim app/web/components/content/index.tsx`
64+
65+
```console
66+
vim app/web/components/content/index.tsx
67+
```
5668

57-
```Javascript
58-
const gateway = `ws://${window.location.hostname}:1234`;
69+
```js
70+
const gateway = ws://${window.location.hostname}:1234;
5971
```
6072

6173
- Update default port in Python websocket server:
62-
`vim service/python/server.py`
74+
75+
```console
76+
vim service/python/server.py
77+
```
6378

6479
```Python
6580
async def start_server():
@@ -71,50 +86,75 @@ async def start_server():
7186
- Upload your oci_api_key_public.pem to console:
7287
[API signing key](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#three)
7388

74-
### 3. Make sure you have Python installed on your machine
89+
### 3. Install all dependencies
7590

76-
- In cli run the following command to validate the Python version
77-
`python --version`
91+
We suggest you install dependencies in a virtual environment to avoid conflicts on your system.
7892

79-
You should see similar output:
93+
- Navigate to the server root folder
8094

81-
```shell
82-
Python 3.8.3
95+
```console
96+
cd service/python
8397
```
8498

85-
### 4. Install all dependencies
99+
- Create a virtual environment:
100+
101+
```console
102+
python3 -m venv venv
103+
```
86104

87-
We suggest you install dependencies in a virtual environment to avoid conflicts on your system.
105+
- Activate your virtual environment:
106+
107+
```console
108+
. venv/bin/activate
109+
```
110+
111+
- Upgrade pip:
112+
113+
```console
114+
pip3 install --upgrade pip
115+
```
88116

89-
- Navigate to the server root folder
90-
`cd service/python`
91-
- Create a virtual environment:
92-
`python3 -m venv venv`
93-
- Activate your virtual environment:
94-
`. venv/bin/activate`
95-
- Upgrade pip:
96-
`pip3 install --upgrade pip`
97-
- Install requirements:
98-
`pip3 install -r requirements.txt`
117+
- Install requirements:
118+
119+
```console
120+
pip3 install -r requirements.txt
121+
```
99122

100-
## 5. Start the websocket server app
123+
## 4. Start the websocket server app
101124

102125
Once dependencies are installed and your service credentials are updated you can run server.py
103126

104-
- `python3 server.py`
127+
```console
128+
python3 server.py
129+
```
130+
131+
## 5. Start JET Client
132+
133+
- Open app directory:
105134

106-
## 6. Start JET Client
135+
```console
136+
cd ../../app
137+
```
107138

108-
- Open app directory:
109-
`cd ../../app ` or `cd app/` in the root folder
110139
- Install dependencies:
111-
`npm install`
112-
- Run local version:
113-
`npx ojet serve`
140+
141+
```console
142+
npm install
143+
```
144+
145+
- Run local version:
146+
147+
```console
148+
npx ojet serve
149+
```
150+
114151
- Or package for web deployment
115-
`npx ojet build web`
116152

117-
Ask question to generate LLM response.
153+
```console
154+
npx ojet build web
155+
```
156+
157+
You can now ask question to generate LLM based response.
118158
![alt text here](images/QandA.png)
119159

120160
Note that sample app can generate markdown.
@@ -140,12 +180,6 @@ endpoint = "https://generativeai.aiservice.<Region>.oci.oraclecloud.com"
140180
generative_ai_client = oci.generative_ai.generative_ai_client.GenerativeAiClient(config=config, service_endpoint=endpoint, retry_strategy=oci.retry.NoneRetryStrategy(), signer=signer)
141181
```
142182

143-
### Prerequisites
144-
145-
- OCI Account
146-
- OCI Generative AI Service
147-
- Oracle JET/Node
148-
149183
## Notes/Issues
150184

151185
Additional Use Cases like summarization and embedding coming soon.
@@ -165,13 +199,15 @@ To change output parameters edit server.py
165199
- [AI for Developers](https://developer.oracle.com/technologies/ai.html)
166200

167201
## Contributing
202+
168203
This project is open source. Please submit your contributions by forking this repository and submitting a pull request! Oracle appreciates any contributions that are made by the open-source community.
169204

170205
## License
206+
171207
Copyright (c) 2024 Oracle and/or its affiliates.
172208

173209
Licensed under the Universal Permissive License (UPL), Version 1.0.
174210

175211
See [LICENSE](LICENSE) for more details.
176212

177-
ORACLE AND ITS AFFILIATES DO NOT PROVIDE ANY WARRANTY WHATSOEVER, EXPRESS OR IMPLIED, FOR ANY SOFTWARE, MATERIAL OR CONTENT OF ANY KIND CONTAINED OR PRODUCED WITHIN THIS REPOSITORY, AND IN PARTICULAR SPECIFICALLY DISCLAIM ANY AND ALL IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. FURTHERMORE, ORACLE AND ITS AFFILIATES DO NOT REPRESENT THAT ANY CUSTOMARY SECURITY REVIEW HAS BEEN PERFORMED WITH RESPECT TO ANY SOFTWARE, MATERIAL OR CONTENT CONTAINED OR PRODUCED WITHIN THIS REPOSITORY. IN ADDITION, AND WITHOUT LIMITING THE FOREGOING, THIRD PARTIES MAY HAVE POSTED SOFTWARE, MATERIAL OR CONTENT TO THIS REPOSITORY WITHOUT ANY REVIEW. USE AT YOUR OWN RISK.
213+
ORACLE AND ITS AFFILIATES DO NOT PROVIDE ANY WARRANTY WHATSOEVER, EXPRESS OR IMPLIED, FOR ANY SOFTWARE, MATERIAL OR CONTENT OF ANY KIND CONTAINED OR PRODUCED WITHIN THIS REPOSITORY, AND IN PARTICULAR SPECIFICALLY DISCLAIM ANY AND ALL IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. FURTHERMORE, ORACLE AND ITS AFFILIATES DO NOT REPRESENT THAT ANY CUSTOMARY SECURITY REVIEW HAS BEEN PERFORMED WITH RESPECT TO ANY SOFTWARE, MATERIAL OR CONTENT CONTAINED OR PRODUCED WITHIN THIS REPOSITORY. IN ADDITION, AND WITHOUT LIMITING THE FOREGOING, THIRD PARTIES MAY HAVE POSTED SOFTWARE, MATERIAL OR CONTENT TO THIS REPOSITORY WITHOUT ANY REVIEW. USE AT YOUR OWN RISK.

0 commit comments

Comments
 (0)