Skip to content

Commit b4090fd

Browse files
committed
more cleanup
1 parent a7cc40c commit b4090fd

File tree

1 file changed

+31
-96
lines changed

1 file changed

+31
-96
lines changed

building-intelligent-applications/README.md

Lines changed: 31 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,15 @@ click on **playground** in the left navigation and select the **default** settin
3838
[4]: images/1706369240032.png
3939

4040
![][5]
41-
42-
41+
4342
[5]: images/1706369250162.png
4443

4544

46-
47-
48-
Input: How is the weather today in Las Vegas
45+
Input: How is the weather today in Las Vegas
4946

5047
Output: It is currently overcast in Las Vegas with a high of 63 degrees Fahrenheit (17 Celsius). There is a 15% chance of precipitation today but it should mostly clear up by this afternoon with chances of partly cloudy skies. Would you like to know more about the weather in Las Vegas? I can also tell you about upcoming forecasts if you plan to be there for a few days.
5148

5249
Would you like to know more about the weather in other cities?
53-
54-
55-
5650

5751
At this stage you can view **Java** or **Python** code in the console.
5852

@@ -147,10 +141,7 @@ Copy paste this PL/SQL code block, you can also download it from [my GitHub repo
147141

148142
[15]: https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/
149143

150-
151-
152-
153-
-- PL/SQL code block to Generate AI Text from Oracle Generative AI service
144+
-- PL/SQL code block to Generate AI Text from Oracle Generative AI service
154145
-- Author: Madhusudhan Rao
155146
-- Replace Compartment OCID, Web credentials and page number for APEX page items P91_AI_INPUT, P91_AI_OUTPUT
156147
----------------------
@@ -210,19 +201,13 @@ Copy paste this PL/SQL code block, you can also download it from [my GitHub repo
210201
end if;
211202

212203
END;
213-
214-
215-
216204

217-
Few request parameters: [(reference)][16]
218-
219-
220-
[16]: https://docs.oracle.com/en-us/iaas/Content/generative-ai/concepts.htm
221205

206+
Few request parameters: [(reference)][16]
222207

223-
224-
225-
Tokens: A token is a word, part of a word, or a punctuation. For example, apple is a token and friendship is made up of two tokens, friend and ship.
208+
[16]: https://docs.oracle.com/en-us/iaas/Content/generative-ai/concepts.htm
209+
210+
Tokens: A token is a word, part of a word, or a punctuation. For example, apple is a token and friendship is made up of two tokens, friend and ship.
226211

227212
Temperature:How random to generate the output text. To generate the same output for a prompt every time you run that prompt, use 0. To generate a random new text for that prompt, increase the temperature. Default temperature is 1
228213

@@ -231,14 +216,10 @@ Few request parameters: [(reference)][16]
231216
Run the page by pressing the **Green** button
232217

233218
![][17]
234-
235-
236-
[17]: images/1706373094904.png
237219

220+
[17]: images/1706373094904.png
238221

239-
240-
241-
Input: What is Neuroscience
222+
Input: What is Neuroscience
242223

243224
AI Response: Neuroscience is a branch of science that focuses on studying the structure and function of the nervous system, and how the nervous system processes information and conducts behavior. It is a multidisciplinary field that combines concepts and techniques from various disciplines, including biology, chemistry, physics, and psychology, to understand how the brain and nervous system work and interact with the rest of the body.
244225

@@ -252,14 +233,10 @@ Run the page by pressing the **Green** button
252233
253234

254235
![][18]
255-
256-
257-
[18]: images/1706373598487.png
258236

237+
[18]: images/1706373598487.png
259238

260-
261-
262-
Input: Write a mail to my manager requesting leave on February 4th on my daughter's birthday.
239+
Input: Write a mail to my manager requesting leave on February 4th on my daughter's birthday.
263240

264241
AI Response:
265242

@@ -279,19 +256,12 @@ Run the page by pressing the **Green** button
279256
[Your Name]
280257

281258
Do you want me to provide you with some alternatives in case your manager rejects the request?
282-
283-
284-
285259

286260
![][19]
287-
288-
289-
[19]: images/1706373822085.png
290261

262+
[19]: images/1706373822085.png
291263

292-
293-
294-
Input: Generate a Java program to calculate the sum of two numbers.
264+
Input: Generate a Java program to calculate the sum of two numbers.
295265

296266
AI Response:
297267

@@ -315,19 +285,13 @@ Run the page by pressing the **Green** button
315285
In this program, we define a class called SumCalculator with a main method. Inside the main method, we define two double variables num1 and num2 to hold the values of the numbers for which we want to calculate the sum. We then call the calculateSum method, passing in the values of num1 and num2, and store the result in the sum variable. Finally, we print out the sum of the two numbers.
316286

317287
You can modify the values of num1 and num2 in the main method to calculate the sum of different numbers. This program demonstrates the basic concept of calculating the sum of two numbers using Java.
318-
319-
320-
288+
321289

322290
![][20]
323-
324-
325-
[20]: images/1706373972658.png
326291

292+
[20]: images/1706373972658.png
327293

328-
329-
330-
Input: Write a script for a documentary movie based on the Taj Mahal.
294+
Input: Write a script for a documentary movie based on the Taj Mahal.
331295
AI Response: INT. THE Taj Mahal - DAY
332296

333297
As we wake up to another sunny morning in Agra, the city which is immensely lucky to have the Taj Mahal as its prime attraction, we realize how truly special this place is with each passing day.
@@ -341,14 +305,10 @@ Run the page by pressing the **Green** button
341305
..
342306

343307
![][21]
344-
345-
346-
[21]: images/1706374244953.png
347308

309+
[21]: images/1706374244953.png
348310

349-
350-
351-
Input: Generate SQL to find hospital names and addresses in Las Vegas.
311+
Input: Generate SQL to find hospital names and addresses in Las Vegas.
352312

353313
AI Response: Here's a potential SQL query that might help you retrieve hospital names and addresses in Las Vegas:
354314

@@ -367,19 +327,13 @@ Run the page by pressing the **Green** button
367327
It's always recommended to check the documentation of your specific database system to ensure compatibility and optimal query performance.
368328

369329
Please replace the table and column names with the actual names used in your database schema.
370-
371-
372-
330+
373331

374332
![][22]
375-
376-
377-
[22]: images/1706374397694.png
378333

334+
[22]: images/1706374397694.png
379335

380-
381-
382-
Input: How to make mixed fruit jam
336+
Input: How to make mixed fruit jam
383337

384338
AI Response:
385339

@@ -415,30 +369,21 @@ Yes, it can detect source language, here are some examples
415369

416370
[24]: images/1706518398469.png
417371

418-
419-
420-
421-
Japanese Input Source: 今日の東京の天気はどうですか
372+
Japanese Input Source: 今日の東京の天気はどうですか
422373
(Translated Input: How is the weather in Tokyo today?)
423374

424375
AI Response: The weather in Tokyo today can be described as follows. Cloudy with a high of 74°F and a low of 65°F. The sky will be clear throughout the day, with only a 20% chance of precipitation.
425376

426377
Is there anything specific you would like to know about the weather in Tokyo today? I can provide more detailed information or answer questions about specific aspects such as wind speed, humidity, or precipitation chances.
427-
428-
429-
378+
430379

431380
How about Simplified Chinese input text?
432381

433382
![][25]
434-
435-
436-
[25]: images/1706518347668.png
437383

384+
[25]: images/1706518347668.png
438385

439-
440-
441-
Simplified Chinese Input Source: 谁建造了中国的长城
386+
Simplified Chinese Input Source: 谁建造了中国的长城
442387
(Translated Input: Who built the great wall of China?)
443388

444389
AI Response: It is not accurate to say that "who" built "Longmen" or "Changcheng" (as it was historically referred to in Chinese literature). "Longmen" or "Changcheng" was not a physical entity or a city like the modern-day Beijing or Shanghai. Rather, it refers to a series of ancient stone gates (or "gates of longmen") that were part of the Great Wall of China.
@@ -450,9 +395,7 @@ How about Simplified Chinese input text?
450395
It is inaccurate to pinpoint a specific individual or organization as the builders of the wall. The construction and maintenance of the wall involved the collective efforts of many rulers, architects, engineers, and laborers over centuries.
451396

452397
Would you like me to provide more detailed information on the construction or history of the Great Wall of China?
453-
454-
455-
398+
456399

457400
### OCI Generative AI Demo video
458401

@@ -473,11 +416,8 @@ Regards, [Madhusudhan Rao][27]
473416
### Optional Section
474417

475418
Alternatively, if you wish to run the Generative AI services using Python code you can copy and paste the code generated and run the Python script ( or Java code)
476-
477-
478-
479-
480-
# coding: utf-8
419+
420+
# coding: utf-8
481421
# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
482422
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
483423

@@ -521,11 +461,8 @@ Alternatively, if you wish to run the Generative AI services using Python code y
521461
print(generate_text_response.data)
522462

523463
To run Python script we need install OCI command line interface and to setup config file, an example shown below
524-
525-
526-
527-
528-
vim ~/.oci/config
464+
465+
vim ~/.oci/config
529466
..
530467

531468
[DEFAULT]
@@ -534,9 +471,7 @@ To run Python script we need install OCI command line interface and to setup con
534471
key_file=/<Path>/.oci/keyfilename.pem
535472
tenancy=<Tenancy-OCID>
536473
region=<Region-OCID>
537-
538-
539-
474+
540475

541476
**I** f you would like to know more about setting up OCI Command Line Interface, please check my video on that (Lab 3 of [AI for Healthcare][28] Livelabs)
542477

0 commit comments

Comments
 (0)