Tan115 commited on
Commit
24fed34
·
verified ·
1 Parent(s): 33852e5

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +6 -0
  2. 03 - Primitive Data Types, Variables and Arrays/001 Primitive types and variables.mp4 +3 -0
  3. 03 - Primitive Data Types, Variables and Arrays/002 Number Systems.mp4 +3 -0
  4. 03 - Primitive Data Types, Variables and Arrays/003 Arrays.mp4 +3 -0
  5. 04 - Eclipse Tips and Tricks/001 Packages creation and package presentation in eclipse.mp4 +3 -0
  6. 04 - Eclipse Tips and Tricks/002 Plugins how to install free plugins, eclipse marketplace, workspace styles.mp4 +3 -0
  7. 04 - Eclipse Tips and Tricks/003 Code Refactoring in Eclipse.mp4 +3 -0
  8. 10 - Methods in Java/004 Variable Length Arguments_en.srt +176 -0
  9. 10 - Methods in Java/005 Find max int in array.html +122 -0
  10. 10 - Methods in Java/006 Draw empty rectangle.html +122 -0
  11. 10 - Methods in Java/007 Calculate Amount of Words.html +122 -0
  12. 10 - Methods in Java/008 Filter String array.html +122 -0
  13. 10 - Methods in Java/013 String Processor.html +122 -0
  14. 10 - Methods in Java/014 Turn each first letter in a word to capital.html +122 -0
  15. 10 - Methods in Java/016 Homework review Methods_en.srt +64 -0
  16. 10 - Methods in Java/016 Solution-Calculate-amount-of-words.url +2 -0
  17. 10 - Methods in Java/016 Solution-Convert-decimal-to-Roman-numbers-and-vice-versa.url +2 -0
  18. 10 - Methods in Java/016 Solution-Draw-rectanagle-empty-inside.url +2 -0
  19. 10 - Methods in Java/016 Solution-Extend-array.url +2 -0
  20. 10 - Methods in Java/016 Solution-Filter-String-array-to-leave-words-no-less-than-specific-length.url +2 -0
  21. 10 - Methods in Java/016 Solution-Find-max-integer-in-array.url +2 -0
  22. 10 - Methods in Java/016 Solution-Greates-common-divisor.url +2 -0
  23. 10 - Methods in Java/016 Solution-Rotate-Matrix.url +2 -0
  24. 10 - Methods in Java/016 Solution-String-processor.url +2 -0
  25. 10 - Methods in Java/016 Solution-Sum-digits-in-a-number.url +2 -0
  26. 10 - Methods in Java/016 Solution-Turn-each-first-char-in-the-word-to-uppercase.url +2 -0
  27. 10 - Methods in Java/017 Quiz Methods in Java - Check yourself.html +69 -0
  28. 10 - Methods in Java/external-links.txt +48 -0
  29. 100 - GPT + Slack + Jira + Gmail Integration/001 GPT + Slack + Jira Integration Work with Jira Datasource_en.srt +1792 -0
  30. 100 - GPT + Slack + Jira + Gmail Integration/001 Source-code-of-examples-from-the-lesson-commit-with-changes-.url +2 -0
  31. 100 - GPT + Slack + Jira + Gmail Integration/002 Create-Jira-ticket-from-chat-Source-code-of-examples-from-the-lesson-commit-with-changes-.url +2 -0
  32. 100 - GPT + Slack + Jira + Gmail Integration/002 Generate Tickets in Jira & Send Email from Slack via Chat Interface_en.srt +1136 -0
  33. 100 - GPT + Slack + Jira + Gmail Integration/002 Generate-email-and-send-it-from-chat-Source-code-of-examples-from-the-lesson-commit-with-changes-.url +2 -0
  34. 100 - GPT + Slack + Jira + Gmail Integration/external-links.txt +9 -0
  35. 101 - Manage a Scrum Team with ChatGPT/001 Average-velocity-calculation-Source-code-of-examples-from-the-lesson-commit-with-changes-.url +2 -0
  36. 101 - Manage a Scrum Team with ChatGPT/001 Managing Scrum & Risk Management with Custom Bot, Slack & GPT_en.srt +560 -0
  37. 101 - Manage a Scrum Team with ChatGPT/001 Risk-management-Source-code-of-examples-from-the-lesson-commit-with-changes-.url +2 -0
  38. 101 - Manage a Scrum Team with ChatGPT/001 Sprint-Planning-Source-code-of-examples-from-the-lesson-commit-with-changes-.url +2 -0
  39. 101 - Manage a Scrum Team with ChatGPT/external-links.txt +9 -0
  40. 102 - DALL-E - Text to image AI Model by OpenAI/001 API-Reference-for-DALL-E-Model.url +2 -0
  41. 102 - DALL-E - Text to image AI Model by OpenAI/001 DALL-E Model & API Overview With Examples in Postman_en.srt +1676 -0
  42. 102 - DALL-E - Text to image AI Model by OpenAI/001 Examples-of-images-and-masks.url +2 -0
  43. 102 - DALL-E - Text to image AI Model by OpenAI/001 Postman-collection-used-in-lesson.url +2 -0
  44. 102 - DALL-E - Text to image AI Model by OpenAI/001 Pricing.url +2 -0
  45. 102 - DALL-E - Text to image AI Model by OpenAI/external-links.txt +12 -0
  46. 103 - Whisper - Speech to text AI model by OpenAI/001 API-Reference.url +2 -0
  47. 103 - Whisper - Speech to text AI model by OpenAI/001 Audio-file-1-used-in-the-lesson-for-transcription-demo.url +2 -0
  48. 103 - Whisper - Speech to text AI model by OpenAI/001 Audio-file-2-used-in-the-lesson-for-translation-demo.url +2 -0
  49. 103 - Whisper - Speech to text AI model by OpenAI/001 Postman-collection.url +2 -0
  50. 103 - Whisper - Speech to text AI model by OpenAI/001 Whisper Model & API Overview With Examples in Postman_en.srt +1552 -0
.gitattributes CHANGED
@@ -41,3 +41,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
41
  02[[:space:]]-[[:space:]]Java[[:space:]]Basics/002[[:space:]]JDK[[:space:]]Installation.mp4 filter=lfs diff=lfs merge=lfs -text
42
  02[[:space:]]-[[:space:]]Java[[:space:]]Basics/006[[:space:]]Comments[[:space:]]in[[:space:]]Java[[:space:]]source[[:space:]]code.mp4 filter=lfs diff=lfs merge=lfs -text
43
  02[[:space:]]-[[:space:]]Java[[:space:]]Basics/005[[:space:]]Integrated[[:space:]]Development[[:space:]]Environment,[[:space:]]Eclipse[[:space:]]Overview.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
41
  02[[:space:]]-[[:space:]]Java[[:space:]]Basics/002[[:space:]]JDK[[:space:]]Installation.mp4 filter=lfs diff=lfs merge=lfs -text
42
  02[[:space:]]-[[:space:]]Java[[:space:]]Basics/006[[:space:]]Comments[[:space:]]in[[:space:]]Java[[:space:]]source[[:space:]]code.mp4 filter=lfs diff=lfs merge=lfs -text
43
  02[[:space:]]-[[:space:]]Java[[:space:]]Basics/005[[:space:]]Integrated[[:space:]]Development[[:space:]]Environment,[[:space:]]Eclipse[[:space:]]Overview.mp4 filter=lfs diff=lfs merge=lfs -text
44
+ 03[[:space:]]-[[:space:]]Primitive[[:space:]]Data[[:space:]]Types,[[:space:]]Variables[[:space:]]and[[:space:]]Arrays/002[[:space:]]Number[[:space:]]Systems.mp4 filter=lfs diff=lfs merge=lfs -text
45
+ 03[[:space:]]-[[:space:]]Primitive[[:space:]]Data[[:space:]]Types,[[:space:]]Variables[[:space:]]and[[:space:]]Arrays/001[[:space:]]Primitive[[:space:]]types[[:space:]]and[[:space:]]variables.mp4 filter=lfs diff=lfs merge=lfs -text
46
+ 04[[:space:]]-[[:space:]]Eclipse[[:space:]]Tips[[:space:]]and[[:space:]]Tricks/001[[:space:]]Packages[[:space:]]creation[[:space:]]and[[:space:]]package[[:space:]]presentation[[:space:]]in[[:space:]]eclipse.mp4 filter=lfs diff=lfs merge=lfs -text
47
+ 04[[:space:]]-[[:space:]]Eclipse[[:space:]]Tips[[:space:]]and[[:space:]]Tricks/002[[:space:]]Plugins[[:space:]]how[[:space:]]to[[:space:]]install[[:space:]]free[[:space:]]plugins,[[:space:]]eclipse[[:space:]]marketplace,[[:space:]]workspace[[:space:]]styles.mp4 filter=lfs diff=lfs merge=lfs -text
48
+ 03[[:space:]]-[[:space:]]Primitive[[:space:]]Data[[:space:]]Types,[[:space:]]Variables[[:space:]]and[[:space:]]Arrays/003[[:space:]]Arrays.mp4 filter=lfs diff=lfs merge=lfs -text
49
+ 04[[:space:]]-[[:space:]]Eclipse[[:space:]]Tips[[:space:]]and[[:space:]]Tricks/003[[:space:]]Code[[:space:]]Refactoring[[:space:]]in[[:space:]]Eclipse.mp4 filter=lfs diff=lfs merge=lfs -text
03 - Primitive Data Types, Variables and Arrays/001 Primitive types and variables.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:561a6b594ddeaa00fe253d34a8a186fdf63b624a23e20eba0106920185101c30
3
+ size 239598856
03 - Primitive Data Types, Variables and Arrays/002 Number Systems.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48d80e1dc858892612a7e404de526c9f27f66b64e7449bc53b3be51a679e8078
3
+ size 79001924
03 - Primitive Data Types, Variables and Arrays/003 Arrays.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b77919792ce45c953609f44ad7e2fb3edd63a74592a170b8e3ce7f6ea7bb078
3
+ size 232461248
04 - Eclipse Tips and Tricks/001 Packages creation and package presentation in eclipse.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f938bf3c404ffdcdcb67392d77fb15a9c06b46d1ec1ea328a339d384ed455f6c
3
+ size 9925338
04 - Eclipse Tips and Tricks/002 Plugins how to install free plugins, eclipse marketplace, workspace styles.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff9cf3072fb19331601a1e9e218a75fc917ae312ed20e490261faf4a1771015b
3
+ size 15216101
04 - Eclipse Tips and Tricks/003 Code Refactoring in Eclipse.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:738dd29139e1e5c7bbe8eb718c996b9ac7a1920ac4eb0a57bbb86ecd0ac9dc30
3
+ size 89152283
10 - Methods in Java/004 Variable Length Arguments_en.srt ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1
2
+ 00:00:00,000 --> 00:00:00,000
3
+ Hello team.
4
+
5
+ 2
6
+ 00:00:00,000 --> 00:00:04,000
7
+ Today we will discuss what are variable length arguments in Java.
8
+
9
+ 3
10
+ 00:00:04,000 --> 00:00:06,000
11
+ Let's start from the problem statement.
12
+
13
+ 4
14
+ 00:00:06,000 --> 00:00:11,000
15
+ You want to create method, but you don't know how much arguments will be passed to that method.
16
+
17
+ 5
18
+ 00:00:11,000 --> 00:00:16,000
19
+ There can be different business cases, but let's simplify and pretend that you need to create method
20
+
21
+ 6
22
+ 00:00:16,000 --> 00:00:22,000
23
+ which will some numbers, but you don't know how much numbers will be passed to this method.
24
+
25
+ 7
26
+ 00:00:22,000 --> 00:00:27,000
27
+ To not create method which returns sum of two numbers, and another method which returns sum of three
28
+
29
+ 8
30
+ 00:00:27,000 --> 00:00:31,000
31
+ numbers, and so on, you create one method with variable length arguments.
32
+
33
+ 9
34
+ 00:00:31,000 --> 00:00:33,000
35
+ The syntax is simple.
36
+
37
+ 10
38
+ 00:00:33,000 --> 00:00:36,000
39
+ You need to specify type of arguments, right?
40
+
41
+ 11
42
+ 00:00:36,000 --> 00:00:38,000
43
+ Ellipses and variable name.
44
+
45
+ 12
46
+ 00:00:38,000 --> 00:00:41,000
47
+ Inside the method you can treat this variable as array.
48
+
49
+ 13
50
+ 00:00:42,000 --> 00:00:46,000
51
+ This syntax will allow you to pass different amount of arguments to the method.
52
+
53
+ 14
54
+ 00:00:46,000 --> 00:00:51,000
55
+ Here you can see that I pass five integers and here I pass just one argument.
56
+
57
+ 15
58
+ 00:00:51,000 --> 00:00:55,000
59
+ In both cases this method is called and result is returned.
60
+
61
+ 16
62
+ 00:00:55,000 --> 00:01:00,000
63
+ You can even change the way how you declare a main method instead of specifying that the main method
64
+
65
+ 17
66
+ 00:01:00,000 --> 00:01:06,000
67
+ takes an array of strings, we can say that the main method can work with variable length arguments
68
+
69
+ 18
70
+ 00:01:06,000 --> 00:01:10,000
71
+ of type string declaration like this is also possible.
72
+
73
+ 19
74
+ 00:01:10,000 --> 00:01:15,000
75
+ Important thing to flag here is that variable length arguments should be declared as last parameter
76
+
77
+ 20
78
+ 00:01:15,000 --> 00:01:16,000
79
+ in the method.
80
+
81
+ 21
82
+ 00:01:17,000 --> 00:01:22,000
83
+ For example, this method declaration will produce compilation error because the variable argument type
84
+
85
+ 22
86
+ 00:01:22,000 --> 00:01:25,000
87
+ int of the method must be the last parameter.
88
+
89
+ 23
90
+ 00:01:25,000 --> 00:01:31,000
91
+ Because during runtime, JVM should know when int arguments are finished and strings are started, and
92
+
93
+ 24
94
+ 00:01:31,000 --> 00:01:36,000
95
+ when we adjusted the method declaration, everything is fine and there is no compilation error.
96
+
97
+ 25
98
+ 00:01:37,000 --> 00:01:41,000
99
+ Variable length argument always should be declared as the last parameter in the method.
100
+
101
+ 26
102
+ 00:01:41,000 --> 00:01:47,000
103
+ You already saw real life example of variable length argument, but probably didn't pay enough attention.
104
+
105
+ 27
106
+ 00:01:47,000 --> 00:01:50,000
107
+ Do you remember lesson about string formatting?
108
+
109
+ 28
110
+ 00:01:50,000 --> 00:01:56,000
111
+ Method format takes variable length arguments as a parameter, because we never know how much format
112
+
113
+ 29
114
+ 00:01:56,000 --> 00:01:59,000
115
+ specifiers will be present in string, which we need to format.
116
+
117
+ 30
118
+ 00:02:00,000 --> 00:02:04,000
119
+ That's all what I wanted to share with you regarding variable length arguments.
120
+
121
+ 31
122
+ 00:02:04,000 --> 00:02:08,000
123
+ Now let's recap what you have learned about methods in this section.
124
+
125
+ 32
126
+ 00:02:08,000 --> 00:02:10,000
127
+ You learned how to declare and call methods.
128
+
129
+ 33
130
+ 00:02:10,000 --> 00:02:14,000
131
+ You understand what method signature is and how we can overload methods.
132
+
133
+ 34
134
+ 00:02:14,000 --> 00:02:20,000
135
+ Now you understand that both reference and primitive types of data in Java are passed by values.
136
+
137
+ 35
138
+ 00:02:20,000 --> 00:02:26,000
139
+ During the method invocation, we wrote recursive methods and learn what variable length arguments are.
140
+
141
+ 36
142
+ 00:02:26,000 --> 00:02:28,000
143
+ Let's take a look at your homework now.
144
+
145
+ 37
146
+ 00:02:29,000 --> 00:02:32,000
147
+ Your homework primarily consists of coding exercises.
148
+
149
+ 38
150
+ 00:02:32,000 --> 00:02:38,000
151
+ Now when you know how to write custom methods, how to use loops, arrays, and primitive types of data,
152
+
153
+ 39
154
+ 00:02:38,000 --> 00:02:41,000
155
+ our tasks might become a little more complicated.
156
+
157
+ 40
158
+ 00:02:41,000 --> 00:02:45,000
159
+ I tried to describe homework with as much details as I could.
160
+
161
+ 41
162
+ 00:02:45,000 --> 00:02:47,000
163
+ Try to solve these tasks.
164
+
165
+ 42
166
+ 00:02:47,000 --> 00:02:52,000
167
+ I will share with you source code of the solution for these tasks, but try to solve them by yourself
168
+
169
+ 43
170
+ 00:02:52,000 --> 00:02:53,000
171
+ first.
172
+
173
+ 44
174
+ 00:02:53,000 --> 00:02:56,000
175
+ Thanks a lot for your attention and see you in the next lesson.
176
+
10 - Methods in Java/005 Find max int in array.html ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Coding Assignment</title>
8
+
9
+ <style>
10
+ body {
11
+ font-family: sf pro text, -apple-system, BlinkMacSystemFont, Roboto, segoe ui, Helvetica, Arial,
12
+ sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;
13
+ font-weight: 400;
14
+ line-height: 22.4px;
15
+ font-size: 16px;
16
+ }
17
+ p,
18
+ ul,
19
+ ol {
20
+ font-size: 16px;
21
+ font-weight: 400;
22
+ }
23
+ h1,
24
+ h2,
25
+ h3,
26
+ h4,
27
+ h5,
28
+ h6 {
29
+ font-weight: bold;
30
+ }
31
+ ul {
32
+ list-style: none;
33
+ margin: 0;
34
+ padding: 0;
35
+ max-width: none;
36
+ }
37
+ .code-snippet {
38
+ background-color: #fff;
39
+ border: 1px solid #d1d7dc;
40
+ color: #b4690e;
41
+ font-size: 90%;
42
+ padding: 0.2rem 0.4rem;
43
+ }
44
+ .code-block {
45
+ background-color: #fff;
46
+ color: #b4690e;
47
+ font-size: 90%;
48
+ }
49
+ .black-block {
50
+ color: #000000;
51
+ }
52
+ .italic-text {
53
+ font-style: italic;
54
+ }
55
+ </style>
56
+ </head>
57
+
58
+ <body onload="main()">
59
+ <h1 id="coding-title"></h1>
60
+ <div>
61
+ <h2>Instructions</h2>
62
+ <div id="coding-instructions"></div>
63
+ </div>
64
+ <div>
65
+ <h2>Test(s)</h2>
66
+ <div id="coding-tests"></div>
67
+ </div>
68
+ <div>
69
+ <h2>Solution(s)</h2>
70
+ <div id="coding-solutions"></div>
71
+ </div>
72
+
73
+ <script>
74
+ const quizData = {"title": "005 Find max int in array", "hasInstructions": true, "hasTests": true, "hasSolutions": true, "instructions": "<ol><li><p>Implement console program which will meet the following requirements:</p><ol><li><p>Program starts and asks user to input integer numbers separated by space.</p></li><li><p>Program creates array object with entered numbers.</p></li><li><p>Program calls specific method which takes int[] as an parameter and returns max value in this array.<br><br>Method should look like this:<br><strong><em>public static int findMaxIntInArray(int[] intArray) {</em></strong></p></li></ol></li></ol><p><strong><em>&lt;write your code here&gt;<br>}</em></strong><br><br></p><ol><li><ol><li><p>Program prints max value from the array to the console.</p></li></ol></li></ol>", "tests": [{"file_name": "Evaluate.java", "content": "import org.junit.Test;\nimport org.junit.Assert;\nimport com.udemy.ucp.*;\nimport static org.junit.Assert.assertEquals;\n\nimport org.junit.Test;\n\npublic class Evaluate {\n\t\n\t@Test\n\tpublic void shouldFindMaxIntInArray() {\n\t\tint[] arr = {1, 100, 2, 5, 8 -100};\n\t\tassertEquals(100, FindMaxInt.findMaxIntInArray(arr));\n\t}\n\n}\n"}], "solutions": [{"file_name": "FindMaxInt.java", "content": "import java.util.Arrays;\r\nimport java.util.Scanner;\r\n\r\npublic class FindMaxInt {\r\n\t\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please, enter integer numbers separated by space: \");\r\n\t\tString numbers = sc.nextLine();\r\n\t\tint[] intArray = convertStringArrayToIntArray(numbers.split(\"\\\\s+\"));\r\n\t\tint maxInt = findMaxIntInArray(intArray);\r\n\t\tSystem.out.println(\"*** Initial Array ***\");\r\n\t\tSystem.out.println(Arrays.toString(intArray));\r\n\t\tSystem.out.println(\"*** Max number in array ***\");\r\n\t\tSystem.out.println(maxInt);\r\n\t}\r\n\r\n\t\r\n\tpublic static int findMaxIntInArray(int[] intArray) {\r\n\t\tint max = intArray[0];\r\n\t\tfor (int i : intArray) {\r\n\t\t\tif (i > max) {\r\n\t\t\t\tmax = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t}\r\n\r\n\tprivate static int[] convertStringArrayToIntArray(String[] stringArray) {\r\n\t\tint[] intArray = new int[stringArray.length];\r\n\t\tfor (int i = 0; i < stringArray.length; i++) {\r\n\t\t\tintArray[i] = Integer.valueOf(stringArray[i]);\r\n\t\t}\r\n\t\treturn intArray;\r\n\t}\r\n\t\r\n\t// ====================== SOLUTION WITH STREAM API\r\n\t\r\n\tpublic static int findMaxIntInArrayStreamApi(int[] intArray) {\r\n\t\treturn Arrays.stream(intArray).max().getAsInt();\r\n\t}\r\n\r\n\tprivate static int[] convertStringArrayToIntArrayStreamApi(String[] stringArray) {\r\n\t\treturn Arrays.stream(stringArray)\r\n\t\t\t\t.mapToInt(s -> Integer.valueOf(s))\r\n\t\t\t\t.toArray();\r\n\t}\r\n\r\n}\r\n"}]};
75
+
76
+ function renderCodeList(rootElement, codeList, className, titlePrefix) {
77
+ for (var i = 0; i < codeList.length; i++) {
78
+ var elem = codeList[i];
79
+ var jsElem = document.createElement("div");
80
+ jsElem.className = className;
81
+ var jsElemTitle = document.createElement("h3");
82
+ jsElemTitle.innerHTML = titlePrefix + " " + (i + 1);
83
+ var jsElemBody = document.createElement("code");
84
+ jsElemBody.className = "code-block black-block";
85
+ jsElemBody.innerHTML = "<pre>" + elem.content + "</pre>";
86
+ jsElem.appendChild(jsElemTitle);
87
+ jsElem.appendChild(jsElemBody);
88
+ rootElement.appendChild(jsElem);
89
+ }
90
+ }
91
+
92
+ function main() {
93
+ // display the assignment
94
+ var codingTitle = document.getElementById("coding-title");
95
+ codingTitle.innerHTML = quizData.title;
96
+
97
+ var codingInstructions = document.getElementById("coding-instructions");
98
+ if (quizData.hasInstructions) {
99
+ codingInstructions.innerHTML = quizData.instructions;
100
+ } else {
101
+ codingInstructions.innerHTML = '<span class="italic-text">' + quizData.instructions + "</span>";
102
+ }
103
+
104
+ // display the test(s)
105
+ var codingTests = document.getElementById("coding-tests");
106
+ if (!quizData.hasTests) {
107
+ codingTests.innerHTML = '<span class="italic-text">' + quizData.tests + "</span>";
108
+ } else {
109
+ renderCodeList(codingTests, quizData.tests, "coding-test", "Test");
110
+ }
111
+
112
+ // display the solution(s)
113
+ var codingSolutions = document.getElementById("coding-solutions");
114
+ if (!quizData.hasSolutions) {
115
+ codingSolutions.innerHTML = '<span class="italic-text">' + quizData.solutions + "</span>";
116
+ } else {
117
+ renderCodeList(codingSolutions, quizData.solutions, "coding-solution", "Solution");
118
+ }
119
+ }
120
+ </script>
121
+ </body>
122
+ </html>
10 - Methods in Java/006 Draw empty rectangle.html ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Coding Assignment</title>
8
+
9
+ <style>
10
+ body {
11
+ font-family: sf pro text, -apple-system, BlinkMacSystemFont, Roboto, segoe ui, Helvetica, Arial,
12
+ sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;
13
+ font-weight: 400;
14
+ line-height: 22.4px;
15
+ font-size: 16px;
16
+ }
17
+ p,
18
+ ul,
19
+ ol {
20
+ font-size: 16px;
21
+ font-weight: 400;
22
+ }
23
+ h1,
24
+ h2,
25
+ h3,
26
+ h4,
27
+ h5,
28
+ h6 {
29
+ font-weight: bold;
30
+ }
31
+ ul {
32
+ list-style: none;
33
+ margin: 0;
34
+ padding: 0;
35
+ max-width: none;
36
+ }
37
+ .code-snippet {
38
+ background-color: #fff;
39
+ border: 1px solid #d1d7dc;
40
+ color: #b4690e;
41
+ font-size: 90%;
42
+ padding: 0.2rem 0.4rem;
43
+ }
44
+ .code-block {
45
+ background-color: #fff;
46
+ color: #b4690e;
47
+ font-size: 90%;
48
+ }
49
+ .black-block {
50
+ color: #000000;
51
+ }
52
+ .italic-text {
53
+ font-style: italic;
54
+ }
55
+ </style>
56
+ </head>
57
+
58
+ <body onload="main()">
59
+ <h1 id="coding-title"></h1>
60
+ <div>
61
+ <h2>Instructions</h2>
62
+ <div id="coding-instructions"></div>
63
+ </div>
64
+ <div>
65
+ <h2>Test(s)</h2>
66
+ <div id="coding-tests"></div>
67
+ </div>
68
+ <div>
69
+ <h2>Solution(s)</h2>
70
+ <div id="coding-solutions"></div>
71
+ </div>
72
+
73
+ <script>
74
+ const quizData = {"title": "006 Draw empty rectangle", "hasInstructions": true, "hasTests": true, "hasSolutions": true, "instructions": "<ol><li><p>Implement console program which will meet the following requirements:</p><ol><li><p>Program starts and asks user to input height of the rectangle</p></li><li><p>After user inputs heights of the rectangle, program asks to input width of the rectangle.</p></li><li><p>Program calls specific method which takes two parameters of int type which prints rectangle to the console:<br> ******</p></li></ol><p>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; *&nbsp; &nbsp; &nbsp; &nbsp; *</p><p>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;******</p></li></ol><p>In the example above height of the rectangle is 3, the width of the rectangle is 6</p><p><strong><em>N.B.: rectangle is empty inside</em></strong></p>", "tests": [{"file_name": "Evaluate.java", "content": "import org.junit.Test;\nimport org.junit.Assert;\nimport com.udemy.ucp.*;\nimport static org.junit.Assert.assertEquals;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.InputStream;\nimport java.io.PrintStream;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\n\npublic class Evaluate {\nprivate static final String OUTPUT_RESULT_SEPARATOR = \"Please, enter width of rectangle: \";\n\tprivate final ByteArrayOutputStream out = new ByteArrayOutputStream();\n\tprivate final PrintStream originalOut = System.out;\n\t\n\t@Before\n\tpublic void setStreams() {\n\t\tSystem.setOut(new PrintStream(out));\n\t}\n\n\t@After\n\tpublic void restoreInitialStreams() {\n\t\tSystem.setOut(originalOut);\n\t}\n\n\t\n\t@Test\n\tpublic void shouldDrawRectangleEmptyInside() {\n\t\tString input = \"3 6\";\n\t\tInputStream in = new ByteArrayInputStream(input.getBytes());\n\t\tSystem.setIn(in);\n\n\t\tEmptyRectangle.main(new String[] {});\n\t\t\n\t\tString consoleOutput = out.toString().split(OUTPUT_RESULT_SEPARATOR)[1].strip();\n\t\tassertEquals(\"******\" + System.lineSeparator() +\n\t\t\t\t\"* *\" + System.lineSeparator() +\n\t\t\t\t\"******\", consoleOutput);\n\t}\n\t\n\t@Test\n\tpublic void shouldDrawSquareEmptyInside() {\n\t\tString input = \"4 4\";\n\t\tInputStream in = new ByteArrayInputStream(input.getBytes());\n\t\tSystem.setIn(in);\n\n\t\tEmptyRectangle.main(new String[] {});\n\t\t\n\t\tString consoleOutput = out.toString().split(OUTPUT_RESULT_SEPARATOR)[1].strip();\n\t\tassertEquals(\"****\" + System.lineSeparator() +\n\t\t\t\t\"* *\" + System.lineSeparator() +\n\t\t\t\t\"* *\" + System.lineSeparator() +\n\t\t\t\t\"****\", consoleOutput);\n\t}\n\t\n\t@Test\n\tpublic void shouldDrawRectangleNotEmptyInside() {\n\t\tString input = \"2 6\";\n\t\tInputStream in = new ByteArrayInputStream(input.getBytes());\n\t\tSystem.setIn(in);\n\n\t\tEmptyRectangle.main(new String[] {});\n\t\t\n\t\tString consoleOutput = out.toString().split(OUTPUT_RESULT_SEPARATOR)[1].strip();\n\t\tassertEquals(\"******\" + System.lineSeparator() +\n\t\t\t\t\"******\", consoleOutput);\n\t}\n}\n"}], "solutions": [{"file_name": "EmptyRectangle.java", "content": "import java.util.Scanner;\r\n\r\npublic class EmptyRectangle {\r\n\t\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please, enter height of rectangle: \");\r\n\t\tint height = sc.nextInt();\r\n\t\tSystem.out.print(\"Please, enter width of rectangle: \");\r\n\t\tint width = sc.nextInt();\r\n\t\t\r\n\t\tdrawRectangle(height, width);\r\n\t}\r\n\r\n\tpublic static void drawRectangle(int height, int width) {\r\n\t\tfor (int i = 0; i < height; i++) {\r\n\t\t\tfor (int j = 0; j < width; j++) {\r\n\t\t\t\tif (j == 0 || j == width - 1 || i == 0 || i == height -1) {\r\n\t\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}\r\n\r\n}"}]};
75
+
76
+ function renderCodeList(rootElement, codeList, className, titlePrefix) {
77
+ for (var i = 0; i < codeList.length; i++) {
78
+ var elem = codeList[i];
79
+ var jsElem = document.createElement("div");
80
+ jsElem.className = className;
81
+ var jsElemTitle = document.createElement("h3");
82
+ jsElemTitle.innerHTML = titlePrefix + " " + (i + 1);
83
+ var jsElemBody = document.createElement("code");
84
+ jsElemBody.className = "code-block black-block";
85
+ jsElemBody.innerHTML = "<pre>" + elem.content + "</pre>";
86
+ jsElem.appendChild(jsElemTitle);
87
+ jsElem.appendChild(jsElemBody);
88
+ rootElement.appendChild(jsElem);
89
+ }
90
+ }
91
+
92
+ function main() {
93
+ // display the assignment
94
+ var codingTitle = document.getElementById("coding-title");
95
+ codingTitle.innerHTML = quizData.title;
96
+
97
+ var codingInstructions = document.getElementById("coding-instructions");
98
+ if (quizData.hasInstructions) {
99
+ codingInstructions.innerHTML = quizData.instructions;
100
+ } else {
101
+ codingInstructions.innerHTML = '<span class="italic-text">' + quizData.instructions + "</span>";
102
+ }
103
+
104
+ // display the test(s)
105
+ var codingTests = document.getElementById("coding-tests");
106
+ if (!quizData.hasTests) {
107
+ codingTests.innerHTML = '<span class="italic-text">' + quizData.tests + "</span>";
108
+ } else {
109
+ renderCodeList(codingTests, quizData.tests, "coding-test", "Test");
110
+ }
111
+
112
+ // display the solution(s)
113
+ var codingSolutions = document.getElementById("coding-solutions");
114
+ if (!quizData.hasSolutions) {
115
+ codingSolutions.innerHTML = '<span class="italic-text">' + quizData.solutions + "</span>";
116
+ } else {
117
+ renderCodeList(codingSolutions, quizData.solutions, "coding-solution", "Solution");
118
+ }
119
+ }
120
+ </script>
121
+ </body>
122
+ </html>
10 - Methods in Java/007 Calculate Amount of Words.html ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Coding Assignment</title>
8
+
9
+ <style>
10
+ body {
11
+ font-family: sf pro text, -apple-system, BlinkMacSystemFont, Roboto, segoe ui, Helvetica, Arial,
12
+ sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;
13
+ font-weight: 400;
14
+ line-height: 22.4px;
15
+ font-size: 16px;
16
+ }
17
+ p,
18
+ ul,
19
+ ol {
20
+ font-size: 16px;
21
+ font-weight: 400;
22
+ }
23
+ h1,
24
+ h2,
25
+ h3,
26
+ h4,
27
+ h5,
28
+ h6 {
29
+ font-weight: bold;
30
+ }
31
+ ul {
32
+ list-style: none;
33
+ margin: 0;
34
+ padding: 0;
35
+ max-width: none;
36
+ }
37
+ .code-snippet {
38
+ background-color: #fff;
39
+ border: 1px solid #d1d7dc;
40
+ color: #b4690e;
41
+ font-size: 90%;
42
+ padding: 0.2rem 0.4rem;
43
+ }
44
+ .code-block {
45
+ background-color: #fff;
46
+ color: #b4690e;
47
+ font-size: 90%;
48
+ }
49
+ .black-block {
50
+ color: #000000;
51
+ }
52
+ .italic-text {
53
+ font-style: italic;
54
+ }
55
+ </style>
56
+ </head>
57
+
58
+ <body onload="main()">
59
+ <h1 id="coding-title"></h1>
60
+ <div>
61
+ <h2>Instructions</h2>
62
+ <div id="coding-instructions"></div>
63
+ </div>
64
+ <div>
65
+ <h2>Test(s)</h2>
66
+ <div id="coding-tests"></div>
67
+ </div>
68
+ <div>
69
+ <h2>Solution(s)</h2>
70
+ <div id="coding-solutions"></div>
71
+ </div>
72
+
73
+ <script>
74
+ const quizData = {"title": "007 Calculate Amount of Words", "hasInstructions": true, "hasTests": true, "hasSolutions": true, "instructions": "<ol><li><p>Implement console program which will meet the following requirements:</p><ol><li><p>Program starts and asks user to enter text.</p></li><li><p>Program calls specific function which take one parameter of String type and returns amount of words in the text. <br><br>Method should look like this:<br><strong><em>public static int getWordsAmount(String text) {<br> &lt;write your code here&gt;<br>}</em></strong><br><br></p></li><li><p>Program prints amount of words to the console.</p></li></ol></li></ol>", "tests": [{"file_name": "Evaluate.java", "content": "import org.junit.Test;\nimport org.junit.Assert;\nimport com.udemy.ucp.*;\nimport static org.junit.Assert.assertEquals;\n\nimport org.junit.Test;\n\npublic class Evaluate {\n\t@Test\n\tpublic void shouldReturnAmountOfWordsForText() {\n\t\tString inputText = \"some random text! With punctuation, marks...\";\n\t\tassertEquals(6, AmountOfWords.getWordsAmount(inputText));\n\t}\n}\n"}], "solutions": [{"file_name": "AmountOfWords.java", "content": "import java.util.Scanner;\r\n\r\npublic class AmountOfWords {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please, enter any text: \");\r\n\t\tString userInput = sc.nextLine();\r\n\t\t\r\n\t\tint amountOfWords = getWordsAmount(userInput);\r\n\t\tSystem.out.println(\"Amount of words in your text: \" + amountOfWords);\r\n\t}\r\n\r\n\tpublic static int getWordsAmount(String text) {\r\n\t\treturn text.split(\"[\\\\p{P}\\\\s]+\").length;\r\n\t}\r\n}"}]};
75
+
76
+ function renderCodeList(rootElement, codeList, className, titlePrefix) {
77
+ for (var i = 0; i < codeList.length; i++) {
78
+ var elem = codeList[i];
79
+ var jsElem = document.createElement("div");
80
+ jsElem.className = className;
81
+ var jsElemTitle = document.createElement("h3");
82
+ jsElemTitle.innerHTML = titlePrefix + " " + (i + 1);
83
+ var jsElemBody = document.createElement("code");
84
+ jsElemBody.className = "code-block black-block";
85
+ jsElemBody.innerHTML = "<pre>" + elem.content + "</pre>";
86
+ jsElem.appendChild(jsElemTitle);
87
+ jsElem.appendChild(jsElemBody);
88
+ rootElement.appendChild(jsElem);
89
+ }
90
+ }
91
+
92
+ function main() {
93
+ // display the assignment
94
+ var codingTitle = document.getElementById("coding-title");
95
+ codingTitle.innerHTML = quizData.title;
96
+
97
+ var codingInstructions = document.getElementById("coding-instructions");
98
+ if (quizData.hasInstructions) {
99
+ codingInstructions.innerHTML = quizData.instructions;
100
+ } else {
101
+ codingInstructions.innerHTML = '<span class="italic-text">' + quizData.instructions + "</span>";
102
+ }
103
+
104
+ // display the test(s)
105
+ var codingTests = document.getElementById("coding-tests");
106
+ if (!quizData.hasTests) {
107
+ codingTests.innerHTML = '<span class="italic-text">' + quizData.tests + "</span>";
108
+ } else {
109
+ renderCodeList(codingTests, quizData.tests, "coding-test", "Test");
110
+ }
111
+
112
+ // display the solution(s)
113
+ var codingSolutions = document.getElementById("coding-solutions");
114
+ if (!quizData.hasSolutions) {
115
+ codingSolutions.innerHTML = '<span class="italic-text">' + quizData.solutions + "</span>";
116
+ } else {
117
+ renderCodeList(codingSolutions, quizData.solutions, "coding-solution", "Solution");
118
+ }
119
+ }
120
+ </script>
121
+ </body>
122
+ </html>
10 - Methods in Java/008 Filter String array.html ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Coding Assignment</title>
8
+
9
+ <style>
10
+ body {
11
+ font-family: sf pro text, -apple-system, BlinkMacSystemFont, Roboto, segoe ui, Helvetica, Arial,
12
+ sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;
13
+ font-weight: 400;
14
+ line-height: 22.4px;
15
+ font-size: 16px;
16
+ }
17
+ p,
18
+ ul,
19
+ ol {
20
+ font-size: 16px;
21
+ font-weight: 400;
22
+ }
23
+ h1,
24
+ h2,
25
+ h3,
26
+ h4,
27
+ h5,
28
+ h6 {
29
+ font-weight: bold;
30
+ }
31
+ ul {
32
+ list-style: none;
33
+ margin: 0;
34
+ padding: 0;
35
+ max-width: none;
36
+ }
37
+ .code-snippet {
38
+ background-color: #fff;
39
+ border: 1px solid #d1d7dc;
40
+ color: #b4690e;
41
+ font-size: 90%;
42
+ padding: 0.2rem 0.4rem;
43
+ }
44
+ .code-block {
45
+ background-color: #fff;
46
+ color: #b4690e;
47
+ font-size: 90%;
48
+ }
49
+ .black-block {
50
+ color: #000000;
51
+ }
52
+ .italic-text {
53
+ font-style: italic;
54
+ }
55
+ </style>
56
+ </head>
57
+
58
+ <body onload="main()">
59
+ <h1 id="coding-title"></h1>
60
+ <div>
61
+ <h2>Instructions</h2>
62
+ <div id="coding-instructions"></div>
63
+ </div>
64
+ <div>
65
+ <h2>Test(s)</h2>
66
+ <div id="coding-tests"></div>
67
+ </div>
68
+ <div>
69
+ <h2>Solution(s)</h2>
70
+ <div id="coding-solutions"></div>
71
+ </div>
72
+
73
+ <script>
74
+ const quizData = {"title": "008 Filter String array", "hasInstructions": true, "hasTests": true, "hasSolutions": true, "instructions": "<ol><li><p>Implement console program which will meet the following requirements:</p><ol><li><p>Program starts and asks user to enter random words separated by space</p></li><li><p>Program asks user to enter minimum length of string to filter words which were entered</p></li><li><p>Program creates array object from entered words</p></li><li><p>Program calls specific method which takes String[] as a parameter and returns array of strings which contains words that have length more or equal to value specified by user<br><br><strong><em>Method should look like this:<br>public static String[] filterWordsByLength(int minLength, String[] words) {</em></strong></p></li></ol><p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;write your code here&gt;<br>&nbsp; &nbsp; &nbsp; }</em></strong><br><br><br></p><p>c. Program prints filtered array to the console output.</p></li></ol>", "tests": [{"file_name": "Evaluate.java", "content": "import org.junit.Test;\nimport org.junit.Assert;\nimport com.udemy.ucp.*;\nimport static org.junit.Assert.assertEquals;\n\nimport java.util.Arrays;\n\nimport org.junit.Test;\n\npublic class Evaluate {\n @Test\n\tpublic void shouldFilterWordsByMinLength() {\n\t\tString[] input = { \"asd\", \"asdf\", \"as\", \"asdfg\", \"a\" };\n\t\tint minLength = 3;\n\n\t\tassertEquals(\"[asd, asdf, asdfg]\",\n\t\t\t\tArrays.toString(FilterStringArray.filterWordsByLength(minLength, input)));\n\t}\n\n\t@Test\n\tpublic void shouldFilterWordsByMinLength2() {\n\t\tString[] input = { \"asd\", \"asdf\", \"as\", \"asdfg\", \"a\" };\n\t\tint minLength = 2;\n\n\t\tassertEquals(\"[asd, asdf, as, asdfg]\",\n\t\t\t\tArrays.toString(FilterStringArray.filterWordsByLength(minLength, input)));\n\t}\n}\n"}], "solutions": [{"file_name": "FilterStringArray.java", "content": "import java.util.Arrays;\r\nimport java.util.Scanner;\r\n\r\npublic class FilterStringArray {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please, enter any words separated by space: \");\r\n\t\tString userInput = sc.nextLine();\r\n\t\tSystem.out.print(\"Please, enter minumum word length to filter words: \");\r\n\t\tint minLength = sc.nextInt();\r\n\t\t\r\n\t\tString[] words = userInput.split(\"\\\\s+\");\r\n\t\tString[] filteredWords = filterWordsByLength(minLength, words);\r\n\t\tSystem.out.println(Arrays.toString(filteredWords));\r\n\t}\r\n\r\n\t\r\n\t\r\n\tpublic static String[] filterWordsByLength(int minLength, String[] words) {\r\n\t\tString[] filteredArray = new String[words.length];\r\n\t\tfor (int i = 0; i < words.length; i++) {\r\n\t\t\tif (words[i].length() >= minLength) {\r\n\t\t\t\tfilteredArray[i] = words[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfilteredArray = filterNulls(filteredArray);\r\n\t\t\r\n\t\treturn filteredArray;\r\n\t}\r\n\r\n\r\n\r\n\tprivate static String[] filterNulls(String[] arr) {\r\n\t\tint newArraySize = 0;\r\n\t\tfor (String word : arr) {\r\n\t\t\tif (word != null) {\r\n\t\t\t\tnewArraySize++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString[] filteredArray = new String[newArraySize];\r\n\t\t\r\n\t\tint filteredArrayIndex = 0;\r\n\t\tfor (String word : arr) {\r\n\t\t\tif (word != null) {\r\n\t\t\t\tfilteredArray[filteredArrayIndex++] = word;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn filteredArray;\r\n\t}\r\n\r\n\r\n}\r\n"}]};
75
+
76
+ function renderCodeList(rootElement, codeList, className, titlePrefix) {
77
+ for (var i = 0; i < codeList.length; i++) {
78
+ var elem = codeList[i];
79
+ var jsElem = document.createElement("div");
80
+ jsElem.className = className;
81
+ var jsElemTitle = document.createElement("h3");
82
+ jsElemTitle.innerHTML = titlePrefix + " " + (i + 1);
83
+ var jsElemBody = document.createElement("code");
84
+ jsElemBody.className = "code-block black-block";
85
+ jsElemBody.innerHTML = "<pre>" + elem.content + "</pre>";
86
+ jsElem.appendChild(jsElemTitle);
87
+ jsElem.appendChild(jsElemBody);
88
+ rootElement.appendChild(jsElem);
89
+ }
90
+ }
91
+
92
+ function main() {
93
+ // display the assignment
94
+ var codingTitle = document.getElementById("coding-title");
95
+ codingTitle.innerHTML = quizData.title;
96
+
97
+ var codingInstructions = document.getElementById("coding-instructions");
98
+ if (quizData.hasInstructions) {
99
+ codingInstructions.innerHTML = quizData.instructions;
100
+ } else {
101
+ codingInstructions.innerHTML = '<span class="italic-text">' + quizData.instructions + "</span>";
102
+ }
103
+
104
+ // display the test(s)
105
+ var codingTests = document.getElementById("coding-tests");
106
+ if (!quizData.hasTests) {
107
+ codingTests.innerHTML = '<span class="italic-text">' + quizData.tests + "</span>";
108
+ } else {
109
+ renderCodeList(codingTests, quizData.tests, "coding-test", "Test");
110
+ }
111
+
112
+ // display the solution(s)
113
+ var codingSolutions = document.getElementById("coding-solutions");
114
+ if (!quizData.hasSolutions) {
115
+ codingSolutions.innerHTML = '<span class="italic-text">' + quizData.solutions + "</span>";
116
+ } else {
117
+ renderCodeList(codingSolutions, quizData.solutions, "coding-solution", "Solution");
118
+ }
119
+ }
120
+ </script>
121
+ </body>
122
+ </html>
10 - Methods in Java/013 String Processor.html ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Coding Assignment</title>
8
+
9
+ <style>
10
+ body {
11
+ font-family: sf pro text, -apple-system, BlinkMacSystemFont, Roboto, segoe ui, Helvetica, Arial,
12
+ sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;
13
+ font-weight: 400;
14
+ line-height: 22.4px;
15
+ font-size: 16px;
16
+ }
17
+ p,
18
+ ul,
19
+ ol {
20
+ font-size: 16px;
21
+ font-weight: 400;
22
+ }
23
+ h1,
24
+ h2,
25
+ h3,
26
+ h4,
27
+ h5,
28
+ h6 {
29
+ font-weight: bold;
30
+ }
31
+ ul {
32
+ list-style: none;
33
+ margin: 0;
34
+ padding: 0;
35
+ max-width: none;
36
+ }
37
+ .code-snippet {
38
+ background-color: #fff;
39
+ border: 1px solid #d1d7dc;
40
+ color: #b4690e;
41
+ font-size: 90%;
42
+ padding: 0.2rem 0.4rem;
43
+ }
44
+ .code-block {
45
+ background-color: #fff;
46
+ color: #b4690e;
47
+ font-size: 90%;
48
+ }
49
+ .black-block {
50
+ color: #000000;
51
+ }
52
+ .italic-text {
53
+ font-style: italic;
54
+ }
55
+ </style>
56
+ </head>
57
+
58
+ <body onload="main()">
59
+ <h1 id="coding-title"></h1>
60
+ <div>
61
+ <h2>Instructions</h2>
62
+ <div id="coding-instructions"></div>
63
+ </div>
64
+ <div>
65
+ <h2>Test(s)</h2>
66
+ <div id="coding-tests"></div>
67
+ </div>
68
+ <div>
69
+ <h2>Solution(s)</h2>
70
+ <div id="coding-solutions"></div>
71
+ </div>
72
+
73
+ <script>
74
+ const quizData = {"title": "013 String Processor", "hasInstructions": true, "hasTests": true, "hasSolutions": true, "instructions": "<ol><li><p>Implement console program which will meet the following requirements:</p><ol><li><p>Program contains methods that can process input string according to requirements below</p></li><li><p>You have input string like this:<br><br><strong><em>Login;Name;Email</em></strong></p></li></ol></li></ol><p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;peterson;Chris Peterson;peterson@outlook.com</em></strong></p><p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;james;Derek James;james@gmail.com</em></strong></p><p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;jackson;Walter Jackson;jackson@gmail.com</em></strong></p><p><strong><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gregory;Mike Gregory;gregory@yahoo.com<br><br></em></strong></p><ol><li><ol><li><p>You program has next method:<br><br><strong><em>public static String convert1(String input) {<br> &lt;write your code here&gt;<br>}</em></strong><br><br>Which formats input data like this:<br>peterson ==&gt; peterson@outlook.com</p></li></ol><p>&nbsp; &nbsp; &nbsp; james ==&gt; james@gmail.com</p><p>&nbsp; &nbsp; &nbsp; jackson ==&gt; jackson@gmail.com</p><p>&nbsp; &nbsp; &nbsp;gregory ==&gt; gregory@yahoo.com</p></li></ol><p><br><br></p><ol><li><ol><li><p>You program has next method:<br><br><strong><em>public static String convert2(String input) {<br> &lt;write your code here&gt;<br>}</em></strong><br><br>Which formats input data like this:</p><p>Chris Peterson (email: peterson@outlook.com)</p></li></ol><p>&nbsp; &nbsp; &nbsp; Derek James (email: james@gmail.com)</p><p>&nbsp; &nbsp; &nbsp; Walter Jackson (email: jackson@gmail.com)</p><p>&nbsp; &nbsp; &nbsp; Mike Gregory (email: gregory@yahoo.com)</p></li></ol><p><br></p>", "tests": [{"file_name": "Evaluate.java", "content": "import org.junit.Test;\nimport org.junit.Assert;\nimport com.udemy.ucp.*;\nimport static org.junit.Assert.assertEquals;\n\nimport org.junit.Test;\n\npublic class Evaluate {\n private static final String INPUT_DATA = \"Login;Name;Email\" + System.lineSeparator()\n\t\t\t+ \"peton;Chris Peterso;person@outlook.com\" + System.lineSeparator()\n\t\t\t+ \"jas;Derek Jame;jes@gmail.com\" + System.lineSeparator()\n\t\t\t+ \"jack;Walter Jackso;jkson@gmail.com\" + System.lineSeparator()\n\t\t\t+ \"greg;Mike Gregor;ggory@yahoo.com\";\n\n\t@Test\n\tpublic void shouldFormatConvert1() {\n\t\tassertEquals(\n\t\t\t\t\"peton ==> person@outlook.com\" + System.lineSeparator()\n\t\t\t\t\t\t+ \"jas ==> jes@gmail.com\" + System.lineSeparator()\n\t\t\t\t\t\t+ \"jack ==> jkson@gmail.com\" + System.lineSeparator()\n\t\t\t\t\t\t+ \"greg ==> ggory@yahoo.com\",\n\t\t\t\tStringProcessor.convert1(INPUT_DATA).strip());\n\t}\n\n\t@Test\n\tpublic void shouldFormatConvert2() {\n\t\tassertEquals(\n\t\t\t\t\"Chris Peterso (email: person@outlook.com)\" + System.lineSeparator()\n\t\t\t\t\t\t+ \"Derek Jame (email: jes@gmail.com)\" + System.lineSeparator()\n\t\t\t\t\t\t+ \"Walter Jackso (email: jkson@gmail.com)\"\n\t\t\t\t\t\t+ System.lineSeparator() + \"Mike Gregor (email: ggory@yahoo.com)\",\n\t\t\t\tStringProcessor.convert2(INPUT_DATA).strip());\n\t}\n\n\n}\n"}], "solutions": [{"file_name": "StringProcessor.java", "content": "\r\npublic class StringProcessor {\r\n\t\r\n\t\r\n\tpublic static final String INPUT_DATA = \"Login;Name;Email\" + System.lineSeparator() +\r\n\t\t\t\"peterson;Chris Peterson;peterson@outlook.com\" + System.lineSeparator() +\r\n\t\t\t\"james;Derek James;james@gmail.com\" + System.lineSeparator() +\r\n\t\t\t\"jackson;Walter Jackson;jackson@gmail.com\" + System.lineSeparator() +\r\n\t\t\t\"gregory;Mike Gregory;gregory@yahoo.com\";\r\n\t\r\n\tpublic static void main(String[] args) {\r\n\t\tSystem.out.println(\"===== Convert 1 demo =====\");\r\n\t\tSystem.out.println(convert1(INPUT_DATA));\r\n\t\t\r\n\t\tSystem.out.println(\"===== Convert 2 demo =====\");\r\n\t\tSystem.out.println(convert2(INPUT_DATA));\r\n\t\t\r\n\t}\r\n\t\r\n\tpublic static String convert1(String input) {\r\n\t\tString result = \"\";\r\n\t\tString[] lines = input.split(System.lineSeparator());\r\n\t\tfor (int i = 1; i < lines.length; i++) {\r\n\t\t\tString[] wordsInLine = lines[i].split(\";\");\r\n\t\t\tresult += wordsInLine[0] + \" ==> \" + wordsInLine[2] + System.lineSeparator();\r\n\t\t}\r\n\t\treturn result;\r\n\t\r\n\t}\r\n\t\r\n\t\r\n\tpublic static String convert2(String input) {\r\n\t\tString result = new String();\r\n\t\tString[] lines = input.split(System.lineSeparator());\r\n\t\tfor (int i = 1; i < lines.length; i++) {\r\n\t\t\tString[] wordsInLine = lines[i].split(\";\");\r\n\t\t\tresult += wordsInLine[1] + \" (email: \" + wordsInLine[2] + \")\" + System.lineSeparator();\r\n\t\t}\r\n\t\treturn result;\r\n\t\r\n\t}\r\n\r\n}\r\n"}]};
75
+
76
+ function renderCodeList(rootElement, codeList, className, titlePrefix) {
77
+ for (var i = 0; i < codeList.length; i++) {
78
+ var elem = codeList[i];
79
+ var jsElem = document.createElement("div");
80
+ jsElem.className = className;
81
+ var jsElemTitle = document.createElement("h3");
82
+ jsElemTitle.innerHTML = titlePrefix + " " + (i + 1);
83
+ var jsElemBody = document.createElement("code");
84
+ jsElemBody.className = "code-block black-block";
85
+ jsElemBody.innerHTML = "<pre>" + elem.content + "</pre>";
86
+ jsElem.appendChild(jsElemTitle);
87
+ jsElem.appendChild(jsElemBody);
88
+ rootElement.appendChild(jsElem);
89
+ }
90
+ }
91
+
92
+ function main() {
93
+ // display the assignment
94
+ var codingTitle = document.getElementById("coding-title");
95
+ codingTitle.innerHTML = quizData.title;
96
+
97
+ var codingInstructions = document.getElementById("coding-instructions");
98
+ if (quizData.hasInstructions) {
99
+ codingInstructions.innerHTML = quizData.instructions;
100
+ } else {
101
+ codingInstructions.innerHTML = '<span class="italic-text">' + quizData.instructions + "</span>";
102
+ }
103
+
104
+ // display the test(s)
105
+ var codingTests = document.getElementById("coding-tests");
106
+ if (!quizData.hasTests) {
107
+ codingTests.innerHTML = '<span class="italic-text">' + quizData.tests + "</span>";
108
+ } else {
109
+ renderCodeList(codingTests, quizData.tests, "coding-test", "Test");
110
+ }
111
+
112
+ // display the solution(s)
113
+ var codingSolutions = document.getElementById("coding-solutions");
114
+ if (!quizData.hasSolutions) {
115
+ codingSolutions.innerHTML = '<span class="italic-text">' + quizData.solutions + "</span>";
116
+ } else {
117
+ renderCodeList(codingSolutions, quizData.solutions, "coding-solution", "Solution");
118
+ }
119
+ }
120
+ </script>
121
+ </body>
122
+ </html>
10 - Methods in Java/014 Turn each first letter in a word to capital.html ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Coding Assignment</title>
8
+
9
+ <style>
10
+ body {
11
+ font-family: sf pro text, -apple-system, BlinkMacSystemFont, Roboto, segoe ui, Helvetica, Arial,
12
+ sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol;
13
+ font-weight: 400;
14
+ line-height: 22.4px;
15
+ font-size: 16px;
16
+ }
17
+ p,
18
+ ul,
19
+ ol {
20
+ font-size: 16px;
21
+ font-weight: 400;
22
+ }
23
+ h1,
24
+ h2,
25
+ h3,
26
+ h4,
27
+ h5,
28
+ h6 {
29
+ font-weight: bold;
30
+ }
31
+ ul {
32
+ list-style: none;
33
+ margin: 0;
34
+ padding: 0;
35
+ max-width: none;
36
+ }
37
+ .code-snippet {
38
+ background-color: #fff;
39
+ border: 1px solid #d1d7dc;
40
+ color: #b4690e;
41
+ font-size: 90%;
42
+ padding: 0.2rem 0.4rem;
43
+ }
44
+ .code-block {
45
+ background-color: #fff;
46
+ color: #b4690e;
47
+ font-size: 90%;
48
+ }
49
+ .black-block {
50
+ color: #000000;
51
+ }
52
+ .italic-text {
53
+ font-style: italic;
54
+ }
55
+ </style>
56
+ </head>
57
+
58
+ <body onload="main()">
59
+ <h1 id="coding-title"></h1>
60
+ <div>
61
+ <h2>Instructions</h2>
62
+ <div id="coding-instructions"></div>
63
+ </div>
64
+ <div>
65
+ <h2>Test(s)</h2>
66
+ <div id="coding-tests"></div>
67
+ </div>
68
+ <div>
69
+ <h2>Solution(s)</h2>
70
+ <div id="coding-solutions"></div>
71
+ </div>
72
+
73
+ <script>
74
+ const quizData = {"title": "014 Turn each first letter in a word to capital", "hasInstructions": true, "hasTests": true, "hasSolutions": true, "instructions": "<ol><li><p>Implement console program which will meet the following requirements:</p><ol><li><p>Program starts and asks user to enter text</p></li><li><p>Program format text with the next rules:</p><ol><li><p>all characters in word should become lower case</p></li><li><p>the first letter in the word should become upper case</p></li></ol></li><li><p>Program prints result of formatting to console</p></li></ol></li></ol><p>To format text program uses next method:</p><p><strong><em>public static String firstCharToTitleCase(String string) {</em></strong></p><p><strong><em>&nbsp; &nbsp; &nbsp; &lt;write your code here&gt;</em></strong></p><p><strong><em>}</em></strong></p>", "tests": [{"file_name": "Evaluate.java", "content": "import org.junit.Test;\nimport org.junit.Assert;\nimport com.udemy.ucp.*;\nimport static org.junit.Assert.assertEquals;\nimport org.junit.Test;\n\npublic class Evaluate {\n private static final String INPUT_DATA = \"When\\tI was younger\" + System.lineSeparator()\n\t+ \"I never\\t needed\";\n\t\n\t@Test\n\tpublic void shouldFormatString() {\n\t\tassertEquals(\"When\tI Was Younger\" + System.lineSeparator() +\n\t\t\t\t\"I Never\t Needed\", FirstCharCapital.firstCharToTitleCase(INPUT_DATA));\n\t}\n}\n"}], "solutions": [{"file_name": "FirstCharCapital.java", "content": "import java.util.Scanner;\r\n\r\npublic class FirstCharCapital {\r\n\r\n\t\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please, enter any text: \");\r\n\t\tString userInput = sc.nextLine();\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(firstCharToTitleCase(userInput));\r\n\t}\r\n\r\n\tpublic static String firstCharToTitleCase(String string) {\r\n\t\tchar[] chars = string.toLowerCase().toCharArray();\r\n\t\tboolean found = false;\r\n\t\tfor (int i = 0; i < chars.length; i++) {\r\n\t\t\tif (!found && Character.isLetter(chars[i])) {\r\n\t\t\t\tchars[i] = Character.toUpperCase(chars[i]);\r\n\t\t\t\tfound = true;\r\n\t\t\t} else if (Character.isWhitespace(chars[i])) {\r\n\t\t\t\tfound = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn String.valueOf(chars);\r\n\t}\r\n}\r\n"}]};
75
+
76
+ function renderCodeList(rootElement, codeList, className, titlePrefix) {
77
+ for (var i = 0; i < codeList.length; i++) {
78
+ var elem = codeList[i];
79
+ var jsElem = document.createElement("div");
80
+ jsElem.className = className;
81
+ var jsElemTitle = document.createElement("h3");
82
+ jsElemTitle.innerHTML = titlePrefix + " " + (i + 1);
83
+ var jsElemBody = document.createElement("code");
84
+ jsElemBody.className = "code-block black-block";
85
+ jsElemBody.innerHTML = "<pre>" + elem.content + "</pre>";
86
+ jsElem.appendChild(jsElemTitle);
87
+ jsElem.appendChild(jsElemBody);
88
+ rootElement.appendChild(jsElem);
89
+ }
90
+ }
91
+
92
+ function main() {
93
+ // display the assignment
94
+ var codingTitle = document.getElementById("coding-title");
95
+ codingTitle.innerHTML = quizData.title;
96
+
97
+ var codingInstructions = document.getElementById("coding-instructions");
98
+ if (quizData.hasInstructions) {
99
+ codingInstructions.innerHTML = quizData.instructions;
100
+ } else {
101
+ codingInstructions.innerHTML = '<span class="italic-text">' + quizData.instructions + "</span>";
102
+ }
103
+
104
+ // display the test(s)
105
+ var codingTests = document.getElementById("coding-tests");
106
+ if (!quizData.hasTests) {
107
+ codingTests.innerHTML = '<span class="italic-text">' + quizData.tests + "</span>";
108
+ } else {
109
+ renderCodeList(codingTests, quizData.tests, "coding-test", "Test");
110
+ }
111
+
112
+ // display the solution(s)
113
+ var codingSolutions = document.getElementById("coding-solutions");
114
+ if (!quizData.hasSolutions) {
115
+ codingSolutions.innerHTML = '<span class="italic-text">' + quizData.solutions + "</span>";
116
+ } else {
117
+ renderCodeList(codingSolutions, quizData.solutions, "coding-solution", "Solution");
118
+ }
119
+ }
120
+ </script>
121
+ </body>
122
+ </html>
10 - Methods in Java/016 Homework review Methods_en.srt ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1
2
+ 00:00:00,000 --> 00:00:05,000
3
+ Hello, Tim, I believe you did a great job and solve all coding exercises from your homework.
4
+
5
+ 2
6
+ 00:00:05,000 --> 00:00:10,000
7
+ But if you don't mind, I'd like to share with you my own solutions to the same tasks.
8
+
9
+ 3
10
+ 00:00:10,000 --> 00:00:13,000
11
+ I will leave links to the source code attached to this lesson.
12
+
13
+ 4
14
+ 00:00:14,000 --> 00:00:19,000
15
+ Take your time to look through my solutions and left comments in the source code to make you understand
16
+
17
+ 5
18
+ 00:00:19,000 --> 00:00:21,000
19
+ the most complicated pieces of code.
20
+
21
+ 6
22
+ 00:00:21,000 --> 00:00:26,000
23
+ Also, in some solutions you can find something like this solution with stream API.
24
+
25
+ 7
26
+ 00:00:26,000 --> 00:00:31,000
27
+ That is because the first solution, which I wrote for some tasks, was written with the help of stream
28
+
29
+ 8
30
+ 00:00:31,000 --> 00:00:31,000
31
+ API.
32
+
33
+ 9
34
+ 00:00:32,000 --> 00:00:37,000
35
+ After that, I remembered that we didn't learn stream API with you so far, and I wrote solution with
36
+
37
+ 10
38
+ 00:00:37,000 --> 00:00:39,000
39
+ knowledge that you have right now.
40
+
41
+ 11
42
+ 00:00:39,000 --> 00:00:44,000
43
+ Indeed, writing code with stream API takes less code to achieve the same goal.
44
+
45
+ 12
46
+ 00:00:45,000 --> 00:00:48,000
47
+ Here is the solution without stream API v3.
48
+
49
+ 13
50
+ 00:00:50,000 --> 00:00:52,000
51
+ And here is the solution with stream API.
52
+
53
+ 14
54
+ 00:00:53,000 --> 00:00:59,000
55
+ Take this as motivation that soon will learn stream API and you will be able to write methods like this.
56
+
57
+ 15
58
+ 00:00:59,000 --> 00:01:04,000
59
+ Feel free to ask questions and comment section regarding homework in case something is still unclear.
60
+
61
+ 16
62
+ 00:01:05,000 --> 00:01:08,000
63
+ Thanks a lot for your attention and see you in the next lesson.
64
+
10 - Methods in Java/016 Solution-Calculate-amount-of-words.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/AmountOfWords.java
10 - Methods in Java/016 Solution-Convert-decimal-to-Roman-numbers-and-vice-versa.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/ConvertDecimalToRoman.java
10 - Methods in Java/016 Solution-Draw-rectanagle-empty-inside.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/EmptyRectangle.java
10 - Methods in Java/016 Solution-Extend-array.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/ArrayExtension.java
10 - Methods in Java/016 Solution-Filter-String-array-to-leave-words-no-less-than-specific-length.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/FilterStringArray.java
10 - Methods in Java/016 Solution-Find-max-integer-in-array.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/FindMaxInt.java
10 - Methods in Java/016 Solution-Greates-common-divisor.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/GreatestCommonDivisor.java
10 - Methods in Java/016 Solution-Rotate-Matrix.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/MatrixRotation.java
10 - Methods in Java/016 Solution-String-processor.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/StringProcessor.java
10 - Methods in Java/016 Solution-Sum-digits-in-a-number.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/SumDigitsInNumber.java
10 - Methods in Java/016 Solution-Turn-each-first-char-in-the-word-to-uppercase.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/FirstCharCapital.java
10 - Methods in Java/017 Quiz Methods in Java - Check yourself.html ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Quiz Methods in Java - Check yourself</title>
7
+
8
+ <style>
9
+ * {
10
+ box-sizing: border-box;
11
+ margin: 0;
12
+ padding: 0;
13
+ }
14
+ body {
15
+ font-family: var(--font-stack-text);
16
+ font-weight: 400;
17
+ line-height: 1.4;
18
+ font-size: 1.6rem;
19
+ color: #2d2f31;
20
+ }
21
+ .container {
22
+ position: relative;
23
+ height: 100%;
24
+ overflow-y: auto;
25
+ }
26
+ .content {
27
+ padding: 3.2rem 4.8rem;
28
+ word-break: break-word;
29
+ max-width: 69.6rem;
30
+ margin: 0 auto;
31
+ }
32
+ .heading {
33
+ margin-bottom: 24px;
34
+ font-family: -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", Helvetica, Arial, sans-serif,
35
+ "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
36
+ font-weight: 700;
37
+ line-height: 1.2;
38
+ letter-spacing: 0;
39
+ font-size: 32px;
40
+ max-width: 36em;
41
+ }
42
+ .article-asset-container {
43
+ padding: 2.4rem;
44
+ }
45
+ .article-asset-container p {
46
+ font-size: 19px;
47
+ }
48
+ code {
49
+ background-color: #fff;
50
+ border: 1px solid #d1d7dc;
51
+ color: #b4690e;
52
+ font-size: 80%;
53
+ padding: 0.2rem 0.4rem;
54
+ font-family: sfmono-regular, Consolas, liberation mono, Menlo, Courier, monospace;
55
+ }
56
+ p {
57
+ font-weight: 400;
58
+ }
59
+ </style>
60
+ </head>
61
+ <body>
62
+ <div class="container">
63
+ <div class="content">
64
+ <div class="heading">Quiz Methods in Java - Check yourself</div>
65
+ <div class="article-asset-container"><p><strong>Quiz Link: </strong><a href="https://forms.gle/a5SSyMsRVVL5ijaB9" rel="noopener noreferrer" target="_blank"><strong>https://forms.gle/a5SSyMsRVVL5ijaB9</strong></a></p><p>The quiz doesn’t require you to log in or submit any personal information. Your data privacy is my priority.</p><p>The Quiz covers content from the following lessons:</p><ul><li><p>Methods in Java: Overview</p></li><li><p>Parameter Passing Mechanism in Java</p></li><li><p>Recursive methods</p></li><li><p>Variable Length Arguments</p></li></ul><p><strong>Quiz Instructions:</strong></p><p>This quiz is designed to help you check your understanding of the content from the previous lessons. All questions are based only on material covered in the lessons you've already watched, so there’s no need to worry about unfamiliar topics.</p><ul><li><p>Each question has one correct answer. Select the best answer and click "Submit" when you're ready.</p></li><li><p>After submitting, you'll see your score. For each question, you earn 1 point.</p></li><li><p>Click "View Results" to see the explanations for each correct answer. Reviewing these explanations can help reinforce your understanding.</p></li><li><p>If you score below 70%, I recommend revisiting the previous lessons. However, if the explanations make sense and you’re confident in your understanding, feel free to move on.</p></li><li><p>If any explanations are unclear, please don’t hesitate to post questions in the Q&amp;A section—I’m here to help!</p></li></ul></div>
66
+ </div>
67
+ </div>
68
+ </body>
69
+ </html>
10 - Methods in Java/external-links.txt ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ 001 Source-code-of-the-example-used-in-the-lesson
3
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/MethodsDemo.java
4
+
5
+ 002 Source-code-of-the-example-used-in-the-lesson
6
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/PassByValueDemo.java
7
+
8
+ 003 Source-code-of-the-example-used-in-the-lesson
9
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/RecursiveMethodsDemo.java
10
+
11
+ 004 Source-code-of-the-example-used-in-the-lesson
12
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/VarargsDemo.java
13
+
14
+ 004 Methods-in-Java-Homework
15
+ https://docs.google.com/document/d/1ojb3UJGOZC14ULGXyrIonSWeBDKbGo5WKsDns4_crgo/edit?usp=sharing
16
+
17
+ 016 Solution-Calculate-amount-of-words
18
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/AmountOfWords.java
19
+
20
+ 016 Solution-Convert-decimal-to-Roman-numbers-and-vice-versa
21
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/ConvertDecimalToRoman.java
22
+
23
+ 016 Solution-Extend-array
24
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/ArrayExtension.java
25
+
26
+ 016 Solution-Draw-rectanagle-empty-inside
27
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/EmptyRectangle.java
28
+
29
+ 016 Solution-Filter-String-array-to-leave-words-no-less-than-specific-length
30
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/FilterStringArray.java
31
+
32
+ 016 Solution-Find-max-integer-in-array
33
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/FindMaxInt.java
34
+
35
+ 016 Solution-Turn-each-first-char-in-the-word-to-uppercase
36
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/FirstCharCapital.java
37
+
38
+ 016 Solution-Greates-common-divisor
39
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/GreatestCommonDivisor.java
40
+
41
+ 016 Solution-Rotate-Matrix
42
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/MatrixRotation.java
43
+
44
+ 016 Solution-String-processor
45
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/StringProcessor.java
46
+
47
+ 016 Solution-Sum-digits-in-a-number
48
+ https://github.com/AndriiPiatakha/learnit_java_core/blob/master/src/com/itbulls/learnit/javacore/methods/hw/SumDigitsInNumber.java
100 - GPT + Slack + Jira + Gmail Integration/001 GPT + Slack + Jira Integration Work with Jira Datasource_en.srt ADDED
@@ -0,0 +1,1792 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1
2
+ 00:00:05,000 --> 00:00:08,000
3
+ Followed him by this moment in our course.
4
+
5
+ 2
6
+ 00:00:08,000 --> 00:00:10,000
7
+ I assume that you already learned.
8
+
9
+ 3
10
+ 00:00:10,000 --> 00:00:12,000
11
+ Your API in the previous lessons.
12
+
13
+ 4
14
+ 00:00:12,000 --> 00:00:16,000
15
+ So now it is time to start implementation of Jira.
16
+
17
+ 5
18
+ 00:00:16,000 --> 00:00:22,000
19
+ API integration with our web application that automates project management operations.
20
+
21
+ 6
22
+ 00:00:22,000 --> 00:00:31,000
23
+ Namely, we are going to build integration between Jira, API, GP2, API, Slack and our web application.
24
+
25
+ 7
26
+ 00:00:31,000 --> 00:00:38,000
27
+ I'm going to teach you how to connect Jira as a separate data source that you will use for gathering
28
+
29
+ 8
30
+ 00:00:38,000 --> 00:00:39,000
31
+ required context.
32
+
33
+ 9
34
+ 00:00:39,000 --> 00:00:44,000
35
+ In scope of this lesson, we will not post data to the Jira data source.
36
+
37
+ 10
38
+ 00:00:44,000 --> 00:00:48,000
39
+ In other words, we will not create items there.
40
+
41
+ 11
42
+ 00:00:48,000 --> 00:00:54,000
43
+ We will just read from Jira how to post data to Jira Data source.
44
+
45
+ 12
46
+ 00:00:54,000 --> 00:00:56,000
47
+ We are going to learn in the next lessons.
48
+
49
+ 13
50
+ 00:00:57,000 --> 00:01:03,000
51
+ I will show you on real examples how you can implement function calling feature to fetch required data
52
+
53
+ 14
54
+ 00:01:03,000 --> 00:01:06,000
55
+ items to add them to the context.
56
+
57
+ 15
58
+ 00:01:06,000 --> 00:01:12,000
59
+ By the end of this lesson, you are supposed to have completely functional and already useful application,
60
+
61
+ 16
62
+ 00:01:12,000 --> 00:01:19,000
63
+ and I'm going to show you the demo of how you can use it as we will make an overview of the source code
64
+
65
+ 17
66
+ 00:01:19,000 --> 00:01:20,000
67
+ line by line.
68
+
69
+ 18
70
+ 00:01:20,000 --> 00:01:26,000
71
+ I will make an architecture overview and will share with you the best practices of web development.
72
+
73
+ 19
74
+ 00:01:26,000 --> 00:01:28,000
75
+ Let's start our lesson.
76
+
77
+ 20
78
+ 00:01:29,000 --> 00:01:35,000
79
+ If you follow the course and you don't skip any lessons, then you have enough theoretical knowledge
80
+
81
+ 21
82
+ 00:01:35,000 --> 00:01:41,000
83
+ and practical skills to follow the live demo session that I'm going to hold in this lesson.
84
+
85
+ 22
86
+ 00:01:42,000 --> 00:01:47,000
87
+ Today, we are going to have a lesson full of practical examples, and I will walk you through my solution
88
+
89
+ 23
90
+ 00:01:47,000 --> 00:01:52,000
91
+ line by line, explaining you how we achieved this result.
92
+
93
+ 24
94
+ 00:01:52,000 --> 00:01:58,000
95
+ Let's start from review of the result that we are going to achieve by the end of this lesson.
96
+
97
+ 25
98
+ 00:01:58,000 --> 00:02:04,000
99
+ I believe that in this way you are going to be motivated to watch the lesson till the end and you will
100
+
101
+ 26
102
+ 00:02:04,000 --> 00:02:10,000
103
+ have a clear picture in the head of what we are going to achieve when we will get to the source code.
104
+
105
+ 27
106
+ 00:02:10,000 --> 00:02:16,000
107
+ Watching source code and keeping in the head the image of the end result will help you to stay focused,
108
+
109
+ 28
110
+ 00:02:16,000 --> 00:02:21,000
111
+ concentrated and will help you to get answers to your questions.
112
+
113
+ 29
114
+ 00:02:22,000 --> 00:02:25,000
115
+ I opened Slack and our imaginary case.
116
+
117
+ 30
118
+ 00:02:25,000 --> 00:02:29,000
119
+ This is our team chat where we collaborate.
120
+
121
+ 31
122
+ 00:02:29,000 --> 00:02:35,000
123
+ Imagine that during the conversation any participant of the chat would like to clarify more details
124
+
125
+ 32
126
+ 00:02:35,000 --> 00:02:42,000
127
+ about the current progress of work, remaining items to do, or other information related to the product
128
+
129
+ 33
130
+ 00:02:42,000 --> 00:02:49,000
131
+ that we work on with Jira Integration and GPT analysis capabilities, we can get the answers that we
132
+
133
+ 34
134
+ 00:02:49,000 --> 00:02:50,000
135
+ expect to get.
136
+
137
+ 35
138
+ 00:02:50,000 --> 00:02:57,000
139
+ I believe that you watched a lesson about function calling feature in ChatGPT because it is important
140
+
141
+ 36
142
+ 00:02:57,000 --> 00:02:58,000
143
+ to understand the lesson.
144
+
145
+ 37
146
+ 00:02:58,000 --> 00:02:59,000
147
+ Examples.
148
+
149
+ 38
150
+ 00:02:59,000 --> 00:03:02,000
151
+ I will just remind you quickly what it is about.
152
+
153
+ 39
154
+ 00:03:02,000 --> 00:03:10,000
155
+ We give to the GPT the array of functions descriptions to tell it what functions we have on our end
156
+
157
+ 40
158
+ 00:03:10,000 --> 00:03:13,000
159
+ and which functions we can call in case it would be needed.
160
+
161
+ 41
162
+ 00:03:14,000 --> 00:03:20,000
163
+ And GPT makes decision based on the context whether some function should be called and result of the
164
+
165
+ 42
166
+ 00:03:20,000 --> 00:03:22,000
167
+ function should be provided as an input.
168
+
169
+ 43
170
+ 00:03:23,000 --> 00:03:29,000
171
+ So basically in our today's demo, GPT will understand that we need to make a call to Jira API in order
172
+
173
+ 44
174
+ 00:03:29,000 --> 00:03:31,000
175
+ to fetch some additional information.
176
+
177
+ 45
178
+ 00:03:31,000 --> 00:03:37,000
179
+ And after providing requested information from Jira, GPT will provide an answer.
180
+
181
+ 46
182
+ 00:03:37,000 --> 00:03:41,000
183
+ So imagine that in our work chat during the conversation.
184
+
185
+ 47
186
+ 00:03:41,000 --> 00:03:48,000
187
+ Somebody needs to get additional information in order to make data driven decision and to save some
188
+
189
+ 48
190
+ 00:03:48,000 --> 00:03:54,000
191
+ time on opening a Jira project, building a query, analyzing the data, I can simply ask my bot to
192
+
193
+ 49
194
+ 00:03:54,000 --> 00:03:57,000
195
+ provide me with some information.
196
+
197
+ 50
198
+ 00:03:57,000 --> 00:04:01,000
199
+ For example, I ask general question, something like this.
200
+
201
+ 51
202
+ 00:04:01,000 --> 00:04:10,000
203
+ GPT How many work items do we have in Jira and receives a response that in Jira project there are six
204
+
205
+ 52
206
+ 00:04:10,000 --> 00:04:18,000
207
+ work items and it doesn't matter for our bot whether it is six work items or 600 work items.
208
+
209
+ 53
210
+ 00:04:19,000 --> 00:04:26,000
211
+ The only limit that we have in this scenario is the context token limit on GPT side, and in my previous
212
+
213
+ 54
214
+ 00:04:26,000 --> 00:04:33,000
215
+ videos about GPT, we already learned that there are different GPT models with different context token
216
+
217
+ 55
218
+ 00:04:33,000 --> 00:04:34,000
219
+ limit size.
220
+
221
+ 56
222
+ 00:04:34,000 --> 00:04:41,000
223
+ So it is question of selecting the proper GPT model and applying GPT best practices about working with
224
+
225
+ 57
226
+ 00:04:41,000 --> 00:04:44,000
227
+ context that we also learned in previous lessons.
228
+
229
+ 58
230
+ 00:04:44,000 --> 00:04:50,000
231
+ Let me open Jira board in order to make sure that what provided me with correct response.
232
+
233
+ 59
234
+ 00:04:51,000 --> 00:04:57,000
235
+ Of course, when I work with my team on production data, I don't check it each time I receive response
236
+
237
+ 60
238
+ 00:04:57,000 --> 00:04:58,000
239
+ from the bot.
240
+
241
+ 61
242
+ 00:04:58,000 --> 00:05:03,000
243
+ But right now let's perform some checks just for the sake of the demo.
244
+
245
+ 62
246
+ 00:05:03,000 --> 00:05:12,000
247
+ And as you can see on our Jira board, we have also six work items, so all is good and bot's response
248
+
249
+ 63
250
+ 00:05:12,000 --> 00:05:13,000
251
+ was correct.
252
+
253
+ 64
254
+ 00:05:13,000 --> 00:05:15,000
255
+ Let's ask some other questions.
256
+
257
+ 65
258
+ 00:05:15,000 --> 00:05:21,000
259
+ For example, GPT, how many work items and repertoire has assigned now?
260
+
261
+ 66
262
+ 00:05:21,000 --> 00:05:23,000
263
+ And we receive response.
264
+
265
+ 67
266
+ 00:05:23,000 --> 00:05:24,000
267
+ Is it in repertoire?
268
+
269
+ 68
270
+ 00:05:24,000 --> 00:05:32,000
271
+ Currently has three work items assigned in Jira and we can open Jira board one more time just to check
272
+
273
+ 69
274
+ 00:05:32,000 --> 00:05:37,000
275
+ and make sure that our bot doesn't lie us and we can see that.
276
+
277
+ 70
278
+ 00:05:37,000 --> 00:05:41,000
279
+ And repertoire has only three work items assigned.
280
+
281
+ 71
282
+ 00:05:41,000 --> 00:05:41,000
283
+ Cool.
284
+
285
+ 72
286
+ 00:05:42,000 --> 00:05:44,000
287
+ Let's ask the next question.
288
+
289
+ 73
290
+ 00:05:45,000 --> 00:05:52,000
291
+ GPT How many work items was the type Bach we have now in not completed status?
292
+
293
+ 74
294
+ 00:05:53,000 --> 00:06:00,000
295
+ And it replies us that we have just two bugs will not check each response in order to have enough time
296
+
297
+ 75
298
+ 00:06:00,000 --> 00:06:02,000
299
+ to show you more examples.
300
+
301
+ 76
302
+ 00:06:02,000 --> 00:06:08,000
303
+ I already showed you our board and you can trust me that these responses are correct.
304
+
305
+ 77
306
+ 00:06:08,000 --> 00:06:11,000
307
+ Or just go back and check the board one more time.
308
+
309
+ 78
310
+ 00:06:12,000 --> 00:06:16,000
311
+ And in the meantime, let's continue and ask the next question.
312
+
313
+ 79
314
+ 00:06:16,000 --> 00:06:21,000
315
+ GPT Can you group these bugs by status, please?
316
+
317
+ 80
318
+ 00:06:21,000 --> 00:06:25,000
319
+ And we received breakdown of our box by their statuses.
320
+
321
+ 81
322
+ 00:06:26,000 --> 00:06:33,000
323
+ One defect is in Todo status, one is in progress status and one bug is in done status.
324
+
325
+ 82
326
+ 00:06:34,000 --> 00:06:38,000
327
+ And we can continue conversation in this chat with our team members.
328
+
329
+ 83
330
+ 00:06:38,000 --> 00:06:43,000
331
+ And the coolest thing about this is that I don't use any GCL.
332
+
333
+ 84
334
+ 00:06:44,000 --> 00:06:50,000
335
+ I mean Jira query language, I use conversational language like I would ask any Scrum master.
336
+
337
+ 85
338
+ 00:06:50,000 --> 00:06:51,000
339
+ Okay.
340
+
341
+ 86
342
+ 00:06:51,000 --> 00:06:55,000
343
+ In my team to get more information before I continue with the conversation.
344
+
345
+ 87
346
+ 00:06:56,000 --> 00:06:58,000
347
+ Okay, let's continue.
348
+
349
+ 88
350
+ 00:06:58,000 --> 00:07:00,000
351
+ Let's ask the next question.
352
+
353
+ 89
354
+ 00:07:00,000 --> 00:07:02,000
355
+ GPT Check please.
356
+
357
+ 90
358
+ 00:07:02,000 --> 00:07:10,000
359
+ Due dates of not completed bugs that you referred to and tell me when is the latest due date?
360
+
361
+ 91
362
+ 00:07:11,000 --> 00:07:17,000
363
+ And we can see that the latest due date among not completed books is August 4th, which is logically
364
+
365
+ 92
366
+ 00:07:17,000 --> 00:07:18,000
367
+ correct.
368
+
369
+ 93
370
+ 00:07:18,000 --> 00:07:21,000
371
+ And we again received information that we need it.
372
+
373
+ 94
374
+ 00:07:22,000 --> 00:07:24,000
375
+ The next question sounds like this.
376
+
377
+ 95
378
+ 00:07:25,000 --> 00:07:29,000
379
+ GPT And who is the bug with the latest due date assigned to?
380
+
381
+ 96
382
+ 00:07:30,000 --> 00:07:33,000
383
+ And we can see that the bug is assigned to Andre Petaja.
384
+
385
+ 97
386
+ 00:07:34,000 --> 00:07:38,000
387
+ Usually in responses you can receive different volume of information.
388
+
389
+ 98
390
+ 00:07:38,000 --> 00:07:42,000
391
+ It depends on the GPT configurations that we already learned.
392
+
393
+ 99
394
+ 00:07:42,000 --> 00:07:48,000
395
+ This example just shows you that you can check some basic information about items that was mentioned
396
+
397
+ 100
398
+ 00:07:48,000 --> 00:07:50,000
399
+ previously in the context.
400
+
401
+ 101
402
+ 00:07:51,000 --> 00:07:58,000
403
+ You can ask some more interesting questions like for example, the following one GPT Can you remind
404
+
405
+ 102
406
+ 00:07:58,000 --> 00:08:06,000
407
+ me of the issue ID please, in the scope of which we planned to implement the persistent card state
408
+
409
+ 103
410
+ 00:08:06,000 --> 00:08:08,000
411
+ across multiple browsers for the same account?
412
+
413
+ 104
414
+ 00:08:09,000 --> 00:08:14,000
415
+ When I deal with hundreds and sometimes with thousands of tickets on the big programs that I manage,
416
+
417
+ 105
418
+ 00:08:14,000 --> 00:08:22,000
419
+ sometimes it is hard to remember specific work item ID of the task that I'm interested in, but still
420
+
421
+ 106
422
+ 00:08:22,000 --> 00:08:27,000
423
+ I might need the reference to the ticket in order to check the latest status comments.
424
+
425
+ 107
426
+ 00:08:27,000 --> 00:08:28,000
427
+ Szczekociny Seine.
428
+
429
+ 108
430
+ 00:08:28,000 --> 00:08:29,000
431
+ ET cetera.
432
+
433
+ 109
434
+ 00:08:30,000 --> 00:08:33,000
435
+ And I can ask GPT to help me with this task.
436
+
437
+ 110
438
+ 00:08:33,000 --> 00:08:34,000
439
+ Like you saw in the demo.
440
+
441
+ 111
442
+ 00:08:35,000 --> 00:08:43,000
443
+ Now I can get navigated to the work item with ID dash four and check information that I need.
444
+
445
+ 112
446
+ 00:08:43,000 --> 00:08:50,000
447
+ In this particular case, GPT analyzed the description field in order to find the ID of the task that
448
+
449
+ 113
450
+ 00:08:50,000 --> 00:08:52,000
451
+ I am interested in.
452
+
453
+ 114
454
+ 00:08:52,000 --> 00:08:58,000
455
+ You can see that in this case the summary of the task doesn't provide us with a lot of details and useful
456
+
457
+ 115
458
+ 00:08:58,000 --> 00:08:59,000
459
+ information.
460
+
461
+ 116
462
+ 00:08:59,000 --> 00:09:06,000
463
+ But in the description I see that this task is about implementation of card component, ensuring that
464
+
465
+ 117
466
+ 00:09:06,000 --> 00:09:12,000
467
+ the state of the card persists in different tabs and in different browsers for the same account.
468
+
469
+ 118
470
+ 00:09:12,000 --> 00:09:17,000
471
+ Basically, you can ask any other questions that you may think of.
472
+
473
+ 119
474
+ 00:09:17,000 --> 00:09:19,000
475
+ Like for example, GPT.
476
+
477
+ 120
478
+ 00:09:19,000 --> 00:09:26,000
479
+ Can you group all items from Jira by assigning you please, and you will be provided with a breakdown
480
+
481
+ 121
482
+ 00:09:26,000 --> 00:09:27,000
483
+ by assignee.
484
+
485
+ 122
486
+ 00:09:27,000 --> 00:09:34,000
487
+ Please note that we have one work item on the dashboard that does not assigned to anyone.
488
+
489
+ 123
490
+ 00:09:34,000 --> 00:09:36,000
491
+ This is done for testing purposes.
492
+
493
+ 124
494
+ 00:09:36,000 --> 00:09:43,000
495
+ Of course, in real life you would avoid cases like this, but we can see that in total GPT provided
496
+
497
+ 125
498
+ 00:09:43,000 --> 00:09:50,000
499
+ us with details about five tickets because the sixth ticket doesn't have assignee.
500
+
501
+ 126
502
+ 00:09:51,000 --> 00:09:55,000
503
+ GPT Can you group all items by issue type, please?
504
+
505
+ 127
506
+ 00:09:55,000 --> 00:10:03,000
507
+ Almost the similar kind of task, but in this case we group by issue type and we again receive correct
508
+
509
+ 128
510
+ 00:10:03,000 --> 00:10:04,000
511
+ response.
512
+
513
+ 129
514
+ 00:10:04,000 --> 00:10:11,000
515
+ These are just few questions that I use on my Scrum Masters use when managing the teamwork and during
516
+
517
+ 130
518
+ 00:10:11,000 --> 00:10:12,000
519
+ the collaboration.
520
+
521
+ 131
522
+ 00:10:13,000 --> 00:10:19,000
523
+ Of course, if your experienced project delivery manager or delivery director, you can imagine the
524
+
525
+ 132
526
+ 00:10:19,000 --> 00:10:23,000
527
+ whole potential power and set of use cases.
528
+
529
+ 133
530
+ 00:10:23,000 --> 00:10:28,000
531
+ How you can apply this both to boost collaboration within the team to the next level.
532
+
533
+ 134
534
+ 00:10:29,000 --> 00:10:32,000
535
+ So I am done with the demo and with review.
536
+
537
+ 135
538
+ 00:10:32,000 --> 00:10:40,000
539
+ Now it is time to understand how all this is implemented and I open my IDE to walk you through the source
540
+
541
+ 136
542
+ 00:10:40,000 --> 00:10:40,000
543
+ code.
544
+
545
+ 137
546
+ 00:10:40,000 --> 00:10:45,000
547
+ As always, you can find the reference to the solution in attachments to this video.
548
+
549
+ 138
550
+ 00:10:46,000 --> 00:10:53,000
551
+ I'm going to make an overview of how I implemented the application in order to achieve the end result
552
+
553
+ 139
554
+ 00:10:53,000 --> 00:10:54,000
555
+ that I have just demoed.
556
+
557
+ 140
558
+ 00:10:54,000 --> 00:11:01,000
559
+ And in case you would have any questions, you are always welcome to post your questions below the video
560
+
561
+ 141
562
+ 00:11:01,000 --> 00:11:03,000
563
+ and I will be happy to answer.
564
+
565
+ 142
566
+ 00:11:04,000 --> 00:11:10,000
567
+ So this is the application that I developed from scratch during the previous lessons and share it with
568
+
569
+ 143
570
+ 00:11:10,000 --> 00:11:12,000
571
+ you each line.
572
+
573
+ 144
574
+ 00:11:12,000 --> 00:11:19,000
575
+ That's why today I wouldn't stop too much on the pieces of code and configurations that we already reviewed
576
+
577
+ 145
578
+ 00:11:19,000 --> 00:11:25,000
579
+ in the previous lessons, and I will focus your attention only on things that were changed here.
580
+
581
+ 146
582
+ 00:11:25,000 --> 00:11:29,000
583
+ I open Slack integration Controller class here.
584
+
585
+ 147
586
+ 00:11:29,000 --> 00:11:34,000
587
+ We get notified about the Slack events we are subscribed for.
588
+
589
+ 148
590
+ 00:11:34,000 --> 00:11:41,000
591
+ So far we are subscribed only for the one event that is application mentioning event.
592
+
593
+ 149
594
+ 00:11:41,000 --> 00:11:47,000
595
+ We receive it here and we call process on mention event of the slack service.
596
+
597
+ 150
598
+ 00:11:47,000 --> 00:11:49,000
599
+ Nothing is changed here.
600
+
601
+ 151
602
+ 00:11:49,000 --> 00:11:53,000
603
+ Let me then go to the default slack service.
604
+
605
+ 152
606
+ 00:11:53,000 --> 00:11:57,000
607
+ I opened the default slack service class here.
608
+
609
+ 153
610
+ 00:11:57,000 --> 00:11:58,000
611
+ I introduced improvement.
612
+
613
+ 154
614
+ 00:11:59,000 --> 00:12:05,000
615
+ When we call get answer to single query method, I pass an array of GPT functions.
616
+
617
+ 155
618
+ 00:12:05,000 --> 00:12:12,000
619
+ You can see that functions variable refers to the list that I let spring to initialize by putting autopilot
620
+
621
+ 156
622
+ 00:12:12,000 --> 00:12:21,000
623
+ annotation like this spring gathered all beans of GPT function type discovered within the context and
624
+
625
+ 157
626
+ 00:12:21,000 --> 00:12:27,000
627
+ taking into account get answer to a single query takes variable argument of GPT function type.
628
+
629
+ 158
630
+ 00:12:27,000 --> 00:12:35,000
631
+ I need to convert the list to array because as you know in Java variable argument type may be treated
632
+
633
+ 159
634
+ 00:12:35,000 --> 00:12:37,000
635
+ as an array within the message.
636
+
637
+ 160
638
+ 00:12:37,000 --> 00:12:40,000
639
+ Currently in this list we have two functions.
640
+
641
+ 161
642
+ 00:12:40,000 --> 00:12:45,000
643
+ One function is from the lesson when we learned function calling feature in GPT.
644
+
645
+ 162
646
+ 00:12:46,000 --> 00:12:53,000
647
+ Do you remember we had GPT was a function that supposed to return us the weather in the specific location.
648
+
649
+ 163
650
+ 00:12:53,000 --> 00:12:55,000
651
+ That was an easy example.
652
+
653
+ 164
654
+ 00:12:55,000 --> 00:13:02,000
655
+ I decided not to remove it from the source code because this is the learning project and I want to store
656
+
657
+ 165
658
+ 00:13:02,000 --> 00:13:05,000
659
+ this example in the repository for future students.
660
+
661
+ 166
662
+ 00:13:05,000 --> 00:13:12,000
663
+ And the second function is the main one for today's lesson in the Beans configuration class.
664
+
665
+ 167
666
+ 00:13:12,000 --> 00:13:17,000
667
+ At the bottom you can see that I declared GPT Jira issues function.
668
+
669
+ 168
670
+ 00:13:17,000 --> 00:13:19,000
671
+ Let's understand what it is.
672
+
673
+ 169
674
+ 00:13:20,000 --> 00:13:22,000
675
+ Just in case you skipped function.
676
+
677
+ 170
678
+ 00:13:22,000 --> 00:13:23,000
679
+ Call in lesson.
680
+
681
+ 171
682
+ 00:13:23,000 --> 00:13:30,000
683
+ Please come back and watch that lesson because understanding function calling in GPT is the key for
684
+
685
+ 172
686
+ 00:13:30,000 --> 00:13:32,000
687
+ understanding of this implementation.
688
+
689
+ 173
690
+ 00:13:32,000 --> 00:13:36,000
691
+ So function should have name and description.
692
+
693
+ 174
694
+ 00:13:36,000 --> 00:13:39,000
695
+ I decided to store this information in properties file.
696
+
697
+ 175
698
+ 00:13:40,000 --> 00:13:42,000
699
+ I open my app properties file.
700
+
701
+ 176
702
+ 00:13:42,000 --> 00:13:46,000
703
+ The function name is simple get Jira issues function.
704
+
705
+ 177
706
+ 00:13:46,000 --> 00:13:53,000
707
+ The most important is the description of the function because based on the description analysis, GPT
708
+
709
+ 178
710
+ 00:13:53,000 --> 00:13:57,000
711
+ will make a decision whether it makes sense to call this function or not.
712
+
713
+ 179
714
+ 00:13:58,000 --> 00:14:04,000
715
+ Based on the description, you can understand that I have a function with such name that can return
716
+
717
+ 180
718
+ 00:14:04,000 --> 00:14:11,000
719
+ all Jira issues of all issue types from the configured Jira project in order to provide information
720
+
721
+ 181
722
+ 00:14:11,000 --> 00:14:12,000
723
+ about team members.
724
+
725
+ 182
726
+ 00:14:12,000 --> 00:14:20,000
727
+ Workload, current plan, due dates, issue descriptions, summaries, total amount of issues finds
728
+
729
+ 183
730
+ 00:14:20,000 --> 00:14:25,000
731
+ the issues of the specific type finds the idea of the issue by its summary or description.
732
+
733
+ 184
734
+ 00:14:25,000 --> 00:14:29,000
735
+ Calculate team workload and lots more.
736
+
737
+ 185
738
+ 00:14:29,000 --> 00:14:31,000
739
+ Few comments here.
740
+
741
+ 186
742
+ 00:14:31,000 --> 00:14:38,000
743
+ Definitely this is learning course, but we learn the principles that may be applied on production scale.
744
+
745
+ 187
746
+ 00:14:38,000 --> 00:14:43,000
747
+ For example, in my production application, I have multiple functions created.
748
+
749
+ 188
750
+ 00:14:43,000 --> 00:14:49,000
751
+ There might be cases when you need the whole amount of Jira tickets, but there is also might be need
752
+
753
+ 189
754
+ 00:14:49,000 --> 00:14:57,000
755
+ to fetch child items of some epic or items that contains only specific label and we don't need the rest
756
+
757
+ 190
758
+ 00:14:57,000 --> 00:14:58,000
759
+ of the items.
760
+
761
+ 191
762
+ 00:14:58,000 --> 00:15:03,000
763
+ It will help you to optimize performance and costs spent on GPT.
764
+
765
+ 192
766
+ 00:15:04,000 --> 00:15:06,000
767
+ Just an idea to think about.
768
+
769
+ 193
770
+ 00:15:06,000 --> 00:15:11,000
771
+ In scope of this lesson, we are going to review implementation of this function because all other functions
772
+
773
+ 194
774
+ 00:15:11,000 --> 00:15:15,000
775
+ can be implemented exactly in the similar way.
776
+
777
+ 195
778
+ 00:15:15,000 --> 00:15:20,000
779
+ The second thing here it is set for configured project.
780
+
781
+ 196
782
+ 00:15:20,000 --> 00:15:24,000
783
+ There are different ways of how you can configure project.
784
+
785
+ 197
786
+ 00:15:24,000 --> 00:15:30,000
787
+ It all depends on the business requirements and how you want to build interaction with the end user.
788
+
789
+ 198
790
+ 00:15:31,000 --> 00:15:37,000
791
+ For example, you can ask end user to provide all necessary configuration during the interaction with
792
+
793
+ 199
794
+ 00:15:37,000 --> 00:15:44,000
795
+ the bot, or you can make this configuration as mandatory one during the bot installation or any other
796
+
797
+ 200
798
+ 00:15:44,000 --> 00:15:45,000
799
+ option.
800
+
801
+ 201
802
+ 00:15:45,000 --> 00:15:51,000
803
+ In our particular case, I configured the project key in the properties a little bit later.
804
+
805
+ 202
806
+ 00:15:51,000 --> 00:15:56,000
807
+ In this lesson I'm going to show you where it will be needed and where we are going to use it.
808
+
809
+ 203
810
+ 00:15:57,000 --> 00:16:04,000
811
+ So coming back to Bean's configuration class, I used value annotation to inject values from the properties
812
+
813
+ 204
814
+ 00:16:04,000 --> 00:16:05,000
815
+ file.
816
+
817
+ 205
818
+ 00:16:05,000 --> 00:16:10,000
819
+ Then I set the name and description values into GPT function object.
820
+
821
+ 206
822
+ 00:16:10,000 --> 00:16:19,000
823
+ Then important point GPT should identify input arguments for our function and we need to tell GPU what
824
+
825
+ 207
826
+ 00:16:19,000 --> 00:16:22,000
827
+ type of arguments with what name we need.
828
+
829
+ 208
830
+ 00:16:22,000 --> 00:16:29,000
831
+ But in this specific case we don't need any input arguments because we don't need to filter result or
832
+
833
+ 209
834
+ 00:16:29,000 --> 00:16:33,000
835
+ sort result or any other input arguments to work with.
836
+
837
+ 210
838
+ 00:16:33,000 --> 00:16:37,000
839
+ We just need to fetch all work items from Jira project.
840
+
841
+ 211
842
+ 00:16:37,000 --> 00:16:38,000
843
+ That's it.
844
+
845
+ 212
846
+ 00:16:38,000 --> 00:16:46,000
847
+ But still, according to GPT, API parameters attribute is required and in documentation it is said
848
+
849
+ 213
850
+ 00:16:46,000 --> 00:16:53,000
851
+ that in case I need to describe a function that accepts no parameters, we need to provide the value
852
+
853
+ 214
854
+ 00:16:53,000 --> 00:17:00,000
855
+ object for type property of the parameters object and empty object value for properties attribute.
856
+
857
+ 215
858
+ 00:17:00,000 --> 00:17:07,000
859
+ Taking into account that Kazan library doesn't take into consideration fields with no values during
860
+
861
+ 216
862
+ 00:17:07,000 --> 00:17:09,000
863
+ the conversion from object to Json format.
864
+
865
+ 217
866
+ 00:17:09,000 --> 00:17:16,000
867
+ By default, we need to come up with some workaround in order to meet the requirements of GPT API.
868
+
869
+ 218
870
+ 00:17:17,000 --> 00:17:21,000
871
+ So I set object type for parameters object.
872
+
873
+ 219
874
+ 00:17:21,000 --> 00:17:29,000
875
+ I did it according to documentation and for properties, I created an object of type no properties that
876
+
877
+ 220
878
+ 00:17:29,000 --> 00:17:31,000
879
+ basically doesn't have any state.
880
+
881
+ 221
882
+ 00:17:31,000 --> 00:17:36,000
883
+ It is compatible with our marker interface parameter properties.
884
+
885
+ 222
886
+ 00:17:36,000 --> 00:17:38,000
887
+ So I can set properties now.
888
+
889
+ 223
890
+ 00:17:38,000 --> 00:17:42,000
891
+ Set parameters to the function and function is ready.
892
+
893
+ 224
894
+ 00:17:42,000 --> 00:17:44,000
895
+ What happens next?
896
+
897
+ 225
898
+ 00:17:44,000 --> 00:17:53,000
899
+ I open default GPT service class inside the get answer to single query method I call prepare request
900
+
901
+ 226
902
+ 00:17:53,000 --> 00:17:58,000
903
+ method where I add functions to the GPT request object.
904
+
905
+ 227
906
+ 00:17:58,000 --> 00:18:01,000
907
+ Now we are ready to send the request to GPT.
908
+
909
+ 228
910
+ 00:18:01,000 --> 00:18:04,000
911
+ Request is sent inside the method.
912
+
913
+ 229
914
+ 00:18:04,000 --> 00:18:05,000
915
+ Get response from GPT.
916
+
917
+ 230
918
+ 00:18:05,000 --> 00:18:09,000
919
+ Here we have method extract GPT response content.
920
+
921
+ 231
922
+ 00:18:10,000 --> 00:18:15,000
923
+ I don't stop on the detailed review of these methods because nothing was changed.
924
+
925
+ 232
926
+ 00:18:16,000 --> 00:18:20,000
927
+ If you forgot the implementation, please check previous lessons.
928
+
929
+ 233
930
+ 00:18:20,000 --> 00:18:25,000
931
+ The only thing that was changed here is the part related to the function call.
932
+
933
+ 234
934
+ 00:18:25,000 --> 00:18:28,000
935
+ Let's review it again from the top.
936
+
937
+ 235
938
+ 00:18:28,000 --> 00:18:33,000
939
+ So in case in the GPT response there is a request for function call.
940
+
941
+ 236
942
+ 00:18:33,000 --> 00:18:42,000
943
+ We enter this if block and get the reference to the function been using the function name I implemented
944
+
945
+ 237
946
+ 00:18:42,000 --> 00:18:44,000
947
+ here factory method pattern.
948
+
949
+ 238
950
+ 00:18:45,000 --> 00:18:48,000
951
+ I just did small improvements in the function factory class.
952
+
953
+ 239
954
+ 00:18:48,000 --> 00:18:50,000
955
+ Let me show it quickly.
956
+
957
+ 240
958
+ 00:18:51,000 --> 00:18:55,000
959
+ I implemented application context aware interface.
960
+
961
+ 241
962
+ 00:18:55,000 --> 00:19:01,000
963
+ This is done on purpose in order to use the existing context instead of creating the new one.
964
+
965
+ 242
966
+ 00:19:01,000 --> 00:19:08,000
967
+ I just need to implement set, application context, method and initialize application context field.
968
+
969
+ 243
970
+ 00:19:08,000 --> 00:19:11,000
971
+ All necessary injections will be done by spring.
972
+
973
+ 244
974
+ 00:19:12,000 --> 00:19:13,000
975
+ This is done in order.
976
+
977
+ 245
978
+ 00:19:13,000 --> 00:19:20,000
979
+ I can extract the bean from the current application context because my get Jira issues function.
980
+
981
+ 246
982
+ 00:19:20,000 --> 00:19:27,000
983
+ Bean contains injections from the properties files and depends on the Jira service bean.
984
+
985
+ 247
986
+ 00:19:27,000 --> 00:19:33,000
987
+ So this improvement in the function factory is exactly what we need to do in order to make this solution
988
+
989
+ 248
990
+ 00:19:33,000 --> 00:19:35,000
991
+ work as expected.
992
+
993
+ 249
994
+ 00:19:35,000 --> 00:19:41,000
995
+ If you want to learn more how it is implemented, we reviewed it in the previous lesson when we learned
996
+
997
+ 250
998
+ 00:19:41,000 --> 00:19:43,000
999
+ function calling feature.
1000
+
1001
+ 251
1002
+ 00:19:44,000 --> 00:19:51,000
1003
+ Once he receives the reference to the function I call execute method in the beans configuration file,
1004
+
1005
+ 252
1006
+ 00:19:51,000 --> 00:19:55,000
1007
+ you can find the bean with name get Jira issues function.
1008
+
1009
+ 253
1010
+ 00:19:55,000 --> 00:19:58,000
1011
+ Let's review it and understand how it works.
1012
+
1013
+ 254
1014
+ 00:19:59,000 --> 00:20:04,000
1015
+ I injected Jira service and into this class in execute method.
1016
+
1017
+ 255
1018
+ 00:20:04,000 --> 00:20:08,000
1019
+ I use Jira service to extract all Jira issues.
1020
+
1021
+ 256
1022
+ 00:20:08,000 --> 00:20:15,000
1023
+ I need to make a review of multiple types here Jira service, default, Jira service and Jira issue.
1024
+
1025
+ 257
1026
+ 00:20:15,000 --> 00:20:17,000
1027
+ So let's go one by one.
1028
+
1029
+ 258
1030
+ 00:20:18,000 --> 00:20:19,000
1031
+ Jira Service.
1032
+
1033
+ 259
1034
+ 00:20:20,000 --> 00:20:23,000
1035
+ Let me start an overview from Jira service interface.
1036
+
1037
+ 260
1038
+ 00:20:24,000 --> 00:20:29,000
1039
+ So this is a high level interface that defines the contract for two masses for now.
1040
+
1041
+ 261
1042
+ 00:20:30,000 --> 00:20:38,000
1043
+ The first method is get full Json issue by ID, it appears here as part of the refactoring.
1044
+
1045
+ 262
1046
+ 00:20:38,000 --> 00:20:45,000
1047
+ After lessons about Jira API, I moved the code from the controller to the service and now we can use
1048
+
1049
+ 263
1050
+ 00:20:45,000 --> 00:20:53,000
1051
+ Jira service bean to extract the Json of any work item by its ID and in general integration controller
1052
+
1053
+ 264
1054
+ 00:20:53,000 --> 00:21:02,000
1055
+ clause, you can see that get issue by method was refactored to now delegate the call to the Jira service
1056
+
1057
+ 265
1058
+ 00:21:02,000 --> 00:21:08,000
1059
+ and the code that was here in the previous lesson was moved to the default Jira service.
1060
+
1061
+ 266
1062
+ 00:21:09,000 --> 00:21:15,000
1063
+ I also did some minor cosmetic changes in the URL and query parameter name.
1064
+
1065
+ 267
1066
+ 00:21:15,000 --> 00:21:16,000
1067
+ In attachments.
1068
+
1069
+ 268
1070
+ 00:21:16,000 --> 00:21:23,000
1071
+ You can find the reference to the commit with all changes and you can investigate it and remember that
1072
+
1073
+ 269
1074
+ 00:21:23,000 --> 00:21:29,000
1075
+ in the case of any questions, please do not hesitate to post your questions below the video and I will
1076
+
1077
+ 270
1078
+ 00:21:29,000 --> 00:21:30,000
1079
+ be happy to answer.
1080
+
1081
+ 271
1082
+ 00:21:31,000 --> 00:21:37,000
1083
+ Also, for demo and development purposes, I created here endpoints that allows you to fetch all issues
1084
+
1085
+ 272
1086
+ 00:21:37,000 --> 00:21:40,000
1087
+ from Jira without posting message to Slack.
1088
+
1089
+ 273
1090
+ 00:21:40,000 --> 00:21:47,000
1091
+ You can do it by directly accessing this resource and here you can see that get Jira issues method is
1092
+
1093
+ 274
1094
+ 00:21:47,000 --> 00:21:49,000
1095
+ also invoked.
1096
+
1097
+ 275
1098
+ 00:21:49,000 --> 00:21:54,000
1099
+ The same method is invoked in the get Jira issues function.
1100
+
1101
+ 276
1102
+ 00:21:54,000 --> 00:22:00,000
1103
+ So let me open now the default service class and review it together with you.
1104
+
1105
+ 277
1106
+ 00:22:00,000 --> 00:22:04,000
1107
+ Let's start review from the get Jira issues method.
1108
+
1109
+ 278
1110
+ 00:22:05,000 --> 00:22:08,000
1111
+ The first thing that I do in this method I build a URL.
1112
+
1113
+ 279
1114
+ 00:22:09,000 --> 00:22:17,000
1115
+ The URL consists from the Jira API base URL, such resource URL and query parameter with name JKL.
1116
+
1117
+ 280
1118
+ 00:22:18,000 --> 00:22:25,000
1119
+ JKL stands for Jira Query language so I can pass Gql here to fetch issues that I need.
1120
+
1121
+ 281
1122
+ 00:22:26,000 --> 00:22:30,000
1123
+ I pass here project name and Max results.
1124
+
1125
+ 282
1126
+ 00:22:30,000 --> 00:22:32,000
1127
+ I have few comments here.
1128
+
1129
+ 283
1130
+ 00:22:33,000 --> 00:22:39,000
1131
+ First of all, all these field values are initialized with values from the Myapp properties file.
1132
+
1133
+ 284
1134
+ 00:22:39,000 --> 00:22:40,000
1135
+ Let's check it.
1136
+
1137
+ 285
1138
+ 00:22:41,000 --> 00:22:46,000
1139
+ I open my app properties file, I changed version of Jira API to the second one.
1140
+
1141
+ 286
1142
+ 00:22:47,000 --> 00:22:53,000
1143
+ We reviewed the Jira API versions in the separate lesson and I said that Jira API version two is the
1144
+
1145
+ 287
1146
+ 00:22:53,000 --> 00:23:01,000
1147
+ most stable one based on today and also it provides the content of description field as one single value,
1148
+
1149
+ 288
1150
+ 00:23:01,000 --> 00:23:08,000
1151
+ which is easier to parse in the Jira API Version three The content of description field is divided into
1152
+
1153
+ 289
1154
+ 00:23:08,000 --> 00:23:09,000
1155
+ blocks.
1156
+
1157
+ 290
1158
+ 00:23:09,000 --> 00:23:11,000
1159
+ It is also available to parse it.
1160
+
1161
+ 291
1162
+ 00:23:11,000 --> 00:23:19,000
1163
+ But I don't like complicate things when there is an easier option available, so I decided to change
1164
+
1165
+ 292
1166
+ 00:23:19,000 --> 00:23:20,000
1167
+ it to version two.
1168
+
1169
+ 293
1170
+ 00:23:21,000 --> 00:23:27,000
1171
+ Then you can find here each resource and search resource and Jira project name too.
1172
+
1173
+ 294
1174
+ 00:23:27,000 --> 00:23:29,000
1175
+ That is our project key.
1176
+
1177
+ 295
1178
+ 00:23:30,000 --> 00:23:34,000
1179
+ Probably you might be wondering where to get Project key.
1180
+
1181
+ 296
1182
+ 00:23:34,000 --> 00:23:36,000
1183
+ Let me show it to you.
1184
+
1185
+ 297
1186
+ 00:23:36,000 --> 00:23:40,000
1187
+ Basically, you can easily find it in each work item ID.
1188
+
1189
+ 298
1190
+ 00:23:41,000 --> 00:23:48,000
1191
+ Each ID consists from the short abbreviation dash and number like you can see here.
1192
+
1193
+ 299
1194
+ 00:23:49,000 --> 00:23:57,000
1195
+ Let dash four or here, let dash five to change the project key or just to find it.
1196
+
1197
+ 300
1198
+ 00:23:57,000 --> 00:24:00,000
1199
+ You can go to the project settings.
1200
+
1201
+ 301
1202
+ 00:24:00,000 --> 00:24:08,000
1203
+ So click on the project settings in the left pane and here in Details section, you can check the key
1204
+
1205
+ 302
1206
+ 00:24:08,000 --> 00:24:08,000
1207
+ field.
1208
+
1209
+ 303
1210
+ 00:24:08,000 --> 00:24:14,000
1211
+ So just copy it and paste it in your web app configuration.
1212
+
1213
+ 304
1214
+ 00:24:14,000 --> 00:24:21,000
1215
+ Max Results Property is also configured in the Myapp properties, and as you can see, this equal to
1216
+
1217
+ 305
1218
+ 00:24:21,000 --> 00:24:29,000
1219
+ 100 because according to the documentation, it is max amount of items allowed to return within one
1220
+
1221
+ 306
1222
+ 00:24:29,000 --> 00:24:30,000
1223
+ single query.
1224
+
1225
+ 307
1226
+ 00:24:31,000 --> 00:24:35,000
1227
+ But what to do in case there is more than 100 work items in the backlog?
1228
+
1229
+ 308
1230
+ 00:24:36,000 --> 00:24:39,000
1231
+ Jira API implements pagination approach.
1232
+
1233
+ 309
1234
+ 00:24:39,000 --> 00:24:45,000
1235
+ Basically, in each response, you receive information about the total amount of records available in
1236
+
1237
+ 310
1238
+ 00:24:45,000 --> 00:24:47,000
1239
+ scope of the current request.
1240
+
1241
+ 311
1242
+ 00:24:47,000 --> 00:24:52,000
1243
+ For example, you receive 100 value in the max results attribute.
1244
+
1245
+ 312
1246
+ 00:24:53,000 --> 00:24:58,000
1247
+ That means that you can count on reading 100 records from the current request.
1248
+
1249
+ 313
1250
+ 00:24:59,000 --> 00:25:02,000
1251
+ Also, in each request you will receive the total field.
1252
+
1253
+ 314
1254
+ 00:25:03,000 --> 00:25:08,000
1255
+ This field contains information about total amount of records that match your query.
1256
+
1257
+ 315
1258
+ 00:25:09,000 --> 00:25:16,000
1259
+ And you also receive start at attribute that tells you from which record the list is started.
1260
+
1261
+ 316
1262
+ 00:25:16,000 --> 00:25:25,000
1263
+ Usually it is zero here, but during the request you can specify start at attribute and thus receives
1264
+
1265
+ 317
1266
+ 00:25:25,000 --> 00:25:27,000
1267
+ the next 100 tickets.
1268
+
1269
+ 318
1270
+ 00:25:27,000 --> 00:25:34,000
1271
+ But be attentive with numbers because indexing is started not from one but from zero.
1272
+
1273
+ 319
1274
+ 00:25:34,000 --> 00:25:41,000
1275
+ And your homework would be to implement just enough code to handle pagination of Jira API.
1276
+
1277
+ 320
1278
+ 00:25:42,000 --> 00:25:43,000
1279
+ Write it down.
1280
+
1281
+ 321
1282
+ 00:25:43,000 --> 00:25:46,000
1283
+ It would be a nice practice for you.
1284
+
1285
+ 322
1286
+ 00:25:46,000 --> 00:25:53,000
1287
+ So basically you would need to call Jira API multiple times in case total amount of records is higher
1288
+
1289
+ 323
1290
+ 00:25:53,000 --> 00:26:00,000
1291
+ than value in Max results attribute that actually specifies the amount of records returned.
1292
+
1293
+ 324
1294
+ 00:26:01,000 --> 00:26:06,000
1295
+ Okay, so it looks like we are done with building the query.
1296
+
1297
+ 325
1298
+ 00:26:06,000 --> 00:26:09,000
1299
+ Then create a http get request.
1300
+
1301
+ 326
1302
+ 00:26:09,000 --> 00:26:16,000
1303
+ In this example I use Apache http client library, but you are welcome to use any library you wish.
1304
+
1305
+ 327
1306
+ 00:26:17,000 --> 00:26:18,000
1307
+ Everything.
1308
+
1309
+ 328
1310
+ 00:26:18,000 --> 00:26:24,000
1311
+ What happens next is passing the returned Json and namely array with issues.
1312
+
1313
+ 329
1314
+ 00:26:24,000 --> 00:26:29,000
1315
+ But pay attention that I don't send the GPG as a whole array of issues.
1316
+
1317
+ 330
1318
+ 00:26:29,000 --> 00:26:30,000
1319
+ Why?
1320
+
1321
+ 331
1322
+ 00:26:30,000 --> 00:26:31,000
1323
+ Because of multiple reasons.
1324
+
1325
+ 332
1326
+ 00:26:32,000 --> 00:26:34,000
1327
+ First of all, cost optimization.
1328
+
1329
+ 333
1330
+ 00:26:34,000 --> 00:26:41,000
1331
+ I don't want to give redundant content that will not help me to find the answer on my questions.
1332
+
1333
+ 334
1334
+ 00:26:41,000 --> 00:26:47,000
1335
+ So it is up to you to hold the business analysis and define what fields of Jira issues do you really
1336
+
1337
+ 335
1338
+ 00:26:47,000 --> 00:26:54,000
1339
+ need that would make impact and will help to provide the end user with the answer to the question.
1340
+
1341
+ 336
1342
+ 00:26:55,000 --> 00:26:59,000
1343
+ The second reason we need to remember about GPT model token limit.
1344
+
1345
+ 337
1346
+ 00:27:00,000 --> 00:27:08,000
1347
+ I just try to not send redundant tokens and instead I would prefer to leave some space for useful information
1348
+
1349
+ 338
1350
+ 00:27:08,000 --> 00:27:10,000
1351
+ that I can send to GPT.
1352
+
1353
+ 339
1354
+ 00:27:11,000 --> 00:27:14,000
1355
+ The third reason I care about performance.
1356
+
1357
+ 340
1358
+ 00:27:14,000 --> 00:27:23,000
1359
+ Again, I don't want to ask GPT to analyze more data than actually needed, thus will win some time
1360
+
1361
+ 341
1362
+ 00:27:23,000 --> 00:27:24,000
1363
+ during the data processing.
1364
+
1365
+ 342
1366
+ 00:27:25,000 --> 00:27:31,000
1367
+ The fourth reason I follow clean architecture principles in the OP design.
1368
+
1369
+ 343
1370
+ 00:27:31,000 --> 00:27:40,000
1371
+ The idea that I follow here is to have business oriented entities, namely in case API will change.
1372
+
1373
+ 344
1374
+ 00:27:40,000 --> 00:27:47,000
1375
+ I don't need to refactor the rest of the code in the application because the rest of my code depends
1376
+
1377
+ 345
1378
+ 00:27:47,000 --> 00:27:48,000
1379
+ on the business entity.
1380
+
1381
+ 346
1382
+ 00:27:48,000 --> 00:27:56,000
1383
+ Jira issue and in case API will change in the next versions, I would need to adjust only this method
1384
+
1385
+ 347
1386
+ 00:27:56,000 --> 00:28:03,000
1387
+ in order to pass all required information and data properly and the rest of the code will keep using
1388
+
1389
+ 348
1390
+ 00:28:03,000 --> 00:28:06,000
1391
+ the Jira issue programming interface.
1392
+
1393
+ 349
1394
+ 00:28:07,000 --> 00:28:14,000
1395
+ To understand my answer better, you need just explore the details of each Jira issue and understand
1396
+
1397
+ 350
1398
+ 00:28:14,000 --> 00:28:18,000
1399
+ how it looks like in the API in the lessons about Jira API.
1400
+
1401
+ 351
1402
+ 00:28:18,000 --> 00:28:26,000
1403
+ Well, when you saw an example of extracting issue by key, as you can see while parsing the Json here,
1404
+
1405
+ 352
1406
+ 00:28:26,000 --> 00:28:30,000
1407
+ I set the values into Jira issue objects properties.
1408
+
1409
+ 353
1410
+ 00:28:30,000 --> 00:28:36,000
1411
+ Jira issue is my business entity that contains only that information that is needed according to my
1412
+
1413
+ 354
1414
+ 00:28:36,000 --> 00:28:38,000
1415
+ business requirements.
1416
+
1417
+ 355
1418
+ 00:28:38,000 --> 00:28:40,000
1419
+ Let's review the source code of this type.
1420
+
1421
+ 356
1422
+ 00:28:41,000 --> 00:28:45,000
1423
+ So Jira issue contains such information.
1424
+
1425
+ 357
1426
+ 00:28:45,000 --> 00:28:52,000
1427
+ Key Assignee Description Summary Status Due Date Project Key.
1428
+
1429
+ 358
1430
+ 00:28:52,000 --> 00:28:58,000
1431
+ It belongs to project ID Project name Priority Issue Type.
1432
+
1433
+ 359
1434
+ 00:28:59,000 --> 00:29:06,000
1435
+ And just to let you know that I also made some changes in my Jira and extended standard set of fields
1436
+
1437
+ 360
1438
+ 00:29:06,000 --> 00:29:09,000
1439
+ with such fields as priority.
1440
+
1441
+ 361
1442
+ 00:29:09,000 --> 00:29:11,000
1443
+ How to add new fields to Jira.
1444
+
1445
+ 362
1446
+ 00:29:11,000 --> 00:29:14,000
1447
+ You can learn in the Jira section of this course.
1448
+
1449
+ 363
1450
+ 00:29:15,000 --> 00:29:18,000
1451
+ Taking into account we already discussed this in the previous lesson.
1452
+
1453
+ 364
1454
+ 00:29:18,000 --> 00:29:21,000
1455
+ I wouldn't stop on this too much.
1456
+
1457
+ 365
1458
+ 00:29:21,000 --> 00:29:27,000
1459
+ Everything else in this class is just getters and setters, so nothing special.
1460
+
1461
+ 366
1462
+ 00:29:27,000 --> 00:29:30,000
1463
+ Let's get back to the default Jira service.
1464
+
1465
+ 367
1466
+ 00:29:30,000 --> 00:29:34,000
1467
+ So I iterated over each issue in Json.
1468
+
1469
+ 368
1470
+ 00:29:34,000 --> 00:29:39,000
1471
+ I converted it to the Jira issue and added those to the list.
1472
+
1473
+ 369
1474
+ 00:29:39,000 --> 00:29:43,000
1475
+ The list of Jira issues is returned from this method.
1476
+
1477
+ 370
1478
+ 00:29:43,000 --> 00:29:48,000
1479
+ The second method is the one that we already reviewed in the previous lesson.
1480
+
1481
+ 371
1482
+ 00:29:48,000 --> 00:29:55,000
1483
+ As I already mentioned, I refactored code a bit and moved this code from the Jira integration controller
1484
+
1485
+ 372
1486
+ 00:29:55,000 --> 00:29:57,000
1487
+ to the default service.
1488
+
1489
+ 373
1490
+ 00:29:58,000 --> 00:30:01,000
1491
+ Now you know how get Jira issues function works.
1492
+
1493
+ 374
1494
+ 00:30:02,000 --> 00:30:10,000
1495
+ Once Jira service returns a list of Jira issues, I just need to convert it to the Json because we would
1496
+
1497
+ 375
1498
+ 00:30:10,000 --> 00:30:17,000
1499
+ need to send this list back to the GP2 in order it could prepare an answer for us based on the whole
1500
+
1501
+ 376
1502
+ 00:30:17,000 --> 00:30:18,000
1503
+ required data gathered.
1504
+
1505
+ 377
1506
+ 00:30:19,000 --> 00:30:22,000
1507
+ Let's get back to the default GP2 service.
1508
+
1509
+ 378
1510
+ 00:30:22,000 --> 00:30:28,000
1511
+ So function got executed and we received the Json response of this function.
1512
+
1513
+ 379
1514
+ 00:30:29,000 --> 00:30:31,000
1515
+ Amazing what happens next.
1516
+
1517
+ 380
1518
+ 00:30:32,000 --> 00:30:35,000
1519
+ Then I do the same thing that we already learned in the function call.
1520
+
1521
+ 381
1522
+ 00:30:35,000 --> 00:30:43,000
1523
+ In lesson I create GP2 message because right now I need to add one more message to the context and then
1524
+
1525
+ 382
1526
+ 00:30:43,000 --> 00:30:44,000
1527
+ send it back to the GP2.
1528
+
1529
+ 383
1530
+ 00:30:45,000 --> 00:30:49,000
1531
+ The message should have function role in GP2 API.
1532
+
1533
+ 384
1534
+ 00:30:49,000 --> 00:30:53,000
1535
+ There is a dedicated role reserved for the function responses.
1536
+
1537
+ 385
1538
+ 00:30:54,000 --> 00:30:59,000
1539
+ Another interesting message that I implement here is called add message with token limit.
1540
+
1541
+ 386
1542
+ 00:30:59,000 --> 00:31:06,000
1543
+ Imagine the case when you have a lot of messages already in the context and you fetched 100 zero items,
1544
+
1545
+ 387
1546
+ 00:31:06,000 --> 00:31:09,000
1547
+ for example, or 200.
1548
+
1549
+ 388
1550
+ 00:31:09,000 --> 00:31:16,000
1551
+ The main thing is that response that you received and want to add to the context will go over the tokens
1552
+
1553
+ 389
1554
+ 00:31:16,000 --> 00:31:20,000
1555
+ limit defined by the GPT model selected.
1556
+
1557
+ 390
1558
+ 00:31:20,000 --> 00:31:21,000
1559
+ Understood.
1560
+
1561
+ 391
1562
+ 00:31:21,000 --> 00:31:27,000
1563
+ For example, imagine that your model selected supports 4000 tokens.
1564
+
1565
+ 392
1566
+ 00:31:27,000 --> 00:31:34,000
1567
+ Just an example and you are going to add a response after function call that is 3000 tokens long.
1568
+
1569
+ 393
1570
+ 00:31:34,000 --> 00:31:39,000
1571
+ But you also already have more than 2000 tokens in the context.
1572
+
1573
+ 394
1574
+ 00:31:39,000 --> 00:31:41,000
1575
+ What to do in this case.
1576
+
1577
+ 395
1578
+ 00:31:41,000 --> 00:31:49,000
1579
+ In order to not catch the exception, it is better to remove all the messages from the context and put
1580
+
1581
+ 396
1582
+ 00:31:49,000 --> 00:31:52,000
1583
+ response after the function call into the context.
1584
+
1585
+ 397
1586
+ 00:31:52,000 --> 00:32:00,000
1587
+ Agree that the purpose of this message In this method, I check whether the total length of the context,
1588
+
1589
+ 398
1590
+ 00:32:00,000 --> 00:32:05,000
1591
+ together with the length of the new message that I want to add, will stay within the limits.
1592
+
1593
+ 399
1594
+ 00:32:05,000 --> 00:32:11,000
1595
+ If no, then I remove from the context the element at zero index position.
1596
+
1597
+ 400
1598
+ 00:32:12,000 --> 00:32:16,000
1599
+ That would be the oldest message in our Slack conversation.
1600
+
1601
+ 401
1602
+ 00:32:16,000 --> 00:32:24,000
1603
+ And then I call this message again until we would be able to add the message taking into account we
1604
+
1605
+ 402
1606
+ 00:32:24,000 --> 00:32:26,000
1607
+ have recursion here in this method.
1608
+
1609
+ 403
1610
+ 00:32:26,000 --> 00:32:31,000
1611
+ It is super important to define the conditions of breaking the recursion.
1612
+
1613
+ 404
1614
+ 00:32:31,000 --> 00:32:38,000
1615
+ So in case there are no messages left in the context, that means the size of the list with context
1616
+
1617
+ 405
1618
+ 00:32:38,000 --> 00:32:42,000
1619
+ messages is equal to zero, then return from the message.
1620
+
1621
+ 406
1622
+ 00:32:43,000 --> 00:32:50,000
1623
+ Then I set functions to null in order to optimize the costs by saving some more tokens on functions.
1624
+
1625
+ 407
1626
+ 00:32:50,000 --> 00:32:51,000
1627
+ Description.
1628
+
1629
+ 408
1630
+ 00:32:51,000 --> 00:32:58,000
1631
+ And then I have another important point in case there is zero messages left in the context.
1632
+
1633
+ 409
1634
+ 00:32:58,000 --> 00:33:00,000
1635
+ I will not send requests to the GPU.
1636
+
1637
+ 410
1638
+ 00:33:01,000 --> 00:33:08,000
1639
+ Instead, I will just return error message that tells end user to contact with the administrator because
1640
+
1641
+ 411
1642
+ 00:33:08,000 --> 00:33:16,000
1643
+ the current model selected run out of tokens limit for this request and request cannot be processed.
1644
+
1645
+ 412
1646
+ 00:33:16,000 --> 00:33:22,000
1647
+ Definitely you can implement all the logic to handle situations like this.
1648
+
1649
+ 413
1650
+ 00:33:22,000 --> 00:33:29,000
1651
+ When this case may happen, imagine the case that the length of the function call response from Jira
1652
+
1653
+ 414
1654
+ 00:33:29,000 --> 00:33:32,000
1655
+ would be 20,000 tokens.
1656
+
1657
+ 415
1658
+ 00:33:32,000 --> 00:33:38,000
1659
+ Well, for example, it will depend on how you implement your solution and how big your Jira project
1660
+
1661
+ 416
1662
+ 00:33:38,000 --> 00:33:39,000
1663
+ is.
1664
+
1665
+ 417
1666
+ 00:33:39,000 --> 00:33:43,000
1667
+ But your model can handle only 4000 tokens.
1668
+
1669
+ 418
1670
+ 00:33:43,000 --> 00:33:49,000
1671
+ Then our previous method that we have just reviewed will not add anything.
1672
+
1673
+ 419
1674
+ 00:33:49,000 --> 00:33:56,000
1675
+ After removing all the context messages and in case we removed all messages from the context trying
1676
+
1677
+ 420
1678
+ 00:33:56,000 --> 00:34:02,000
1679
+ to add the response from the function call, there is no sense to send request to GPU because we already
1680
+
1681
+ 421
1682
+ 00:34:02,000 --> 00:34:09,000
1683
+ removed original request and our response after function call may also not fit within the context limits.
1684
+
1685
+ 422
1686
+ 00:34:10,000 --> 00:34:13,000
1687
+ These are limitations that we need to accept.
1688
+
1689
+ 423
1690
+ 00:34:13,000 --> 00:34:20,000
1691
+ So what I would recommend you to do in this case, if you follow the lesson attentively, you might
1692
+
1693
+ 424
1694
+ 00:34:20,000 --> 00:34:27,000
1695
+ already hear the answer in the production version of this application that I use with my team to manage
1696
+
1697
+ 425
1698
+ 00:34:27,000 --> 00:34:29,000
1699
+ our work and to collaborate.
1700
+
1701
+ 426
1702
+ 00:34:29,000 --> 00:34:37,000
1703
+ I have multiple functions defined that return not all work items, but return only those items that
1704
+
1705
+ 427
1706
+ 00:34:37,000 --> 00:34:38,000
1707
+ meets criteria.
1708
+
1709
+ 428
1710
+ 00:34:38,000 --> 00:34:46,000
1711
+ Basically the query to filter on the requested issue is created and I don't need overwhelm the context
1712
+
1713
+ 429
1714
+ 00:34:46,000 --> 00:34:51,000
1715
+ with data that is not required to answer my question.
1716
+
1717
+ 430
1718
+ 00:34:51,000 --> 00:34:59,000
1719
+ For example, if I request information about the box, there is no need to fetch epics stories tasks.
1720
+
1721
+ 431
1722
+ 00:34:59,000 --> 00:35:05,000
1723
+ If I ask question about child items of the specific epic, I don't need to provide GPU with all the
1724
+
1725
+ 432
1726
+ 00:35:05,000 --> 00:35:10,000
1727
+ tickets that are not related to the specific epic from the conversation history.
1728
+
1729
+ 433
1730
+ 00:35:10,000 --> 00:35:12,000
1731
+ Do you understand my point?
1732
+
1733
+ 434
1734
+ 00:35:12,000 --> 00:35:19,000
1735
+ Anyway, in case something is not clear, please let me know about your questions in comments below
1736
+
1737
+ 435
1738
+ 00:35:19,000 --> 00:35:22,000
1739
+ this video and I will be happy to answer.
1740
+
1741
+ 436
1742
+ 00:35:22,000 --> 00:35:30,000
1743
+ In our code we send requests to the GPU and receive response and return this response to the end user.
1744
+
1745
+ 437
1746
+ 00:35:30,000 --> 00:35:34,000
1747
+ That's how it works and we already hold the demo.
1748
+
1749
+ 438
1750
+ 00:35:34,000 --> 00:35:38,000
1751
+ So I believe you can imagine end to end scenario.
1752
+
1753
+ 439
1754
+ 00:35:38,000 --> 00:35:41,000
1755
+ Let's recap what we have learned in this lesson.
1756
+
1757
+ 440
1758
+ 00:35:42,000 --> 00:35:48,000
1759
+ In this lesson, we learned how to integrate Jira Slack and our web application.
1760
+
1761
+ 441
1762
+ 00:35:48,000 --> 00:35:52,000
1763
+ We implement function calling feature in our application.
1764
+
1765
+ 442
1766
+ 00:35:53,000 --> 00:35:59,000
1767
+ I hold an end to end demo of web applications that's supposed to boost the collaboration within your
1768
+
1769
+ 443
1770
+ 00:35:59,000 --> 00:35:59,000
1771
+ team.
1772
+
1773
+ 444
1774
+ 00:36:00,000 --> 00:36:07,000
1775
+ We reviewed architecture of our application and discussed best practices of web application development
1776
+
1777
+ 445
1778
+ 00:36:07,000 --> 00:36:09,000
1779
+ and saw how to apply them in practice.
1780
+
1781
+ 446
1782
+ 00:36:10,000 --> 00:36:12,000
1783
+ That's all what I wanted to share with you in this lesson.
1784
+
1785
+ 447
1786
+ 00:36:13,000 --> 00:36:14,000
1787
+ Thanks a lot for your attention.
1788
+
1789
+ 448
1790
+ 00:36:14,000 --> 00:36:17,000
1791
+ Have a great day and see you in the next lesson.
1792
+
100 - GPT + Slack + Jira + Gmail Integration/001 Source-code-of-examples-from-the-lesson-commit-with-changes-.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/commit/cb46583146e15ddd4782ab32315c14ca55f73edf
100 - GPT + Slack + Jira + Gmail Integration/002 Create-Jira-ticket-from-chat-Source-code-of-examples-from-the-lesson-commit-with-changes-.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/commit/7853021ac12529fcb1c58f49f6d9495624f8850b
100 - GPT + Slack + Jira + Gmail Integration/002 Generate Tickets in Jira & Send Email from Slack via Chat Interface_en.srt ADDED
@@ -0,0 +1,1136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1
2
+ 00:00:05,000 --> 00:00:06,000
3
+ Hello, Tim.
4
+
5
+ 2
6
+ 00:00:06,000 --> 00:00:12,000
7
+ In this video we are going to learn a few more use cases of using our board together with a ChatGPT.
8
+
9
+ 3
10
+ 00:00:12,000 --> 00:00:18,000
11
+ We don't have any long agenda for today because today we're actually not going to learn new tools,
12
+
13
+ 4
14
+ 00:00:18,000 --> 00:00:20,000
15
+ new approaches, new theory.
16
+
17
+ 5
18
+ 00:00:20,000 --> 00:00:27,000
19
+ Basically, we are going to use a similar approach that we used in previous lesson, namely using GPT
20
+
21
+ 6
22
+ 00:00:27,000 --> 00:00:33,000
23
+ function called feature in order to invoke the correct function based on the context when it will be
24
+
25
+ 7
26
+ 00:00:33,000 --> 00:00:33,000
27
+ needed.
28
+
29
+ 8
30
+ 00:00:33,000 --> 00:00:39,000
31
+ That's why in this video we are going to review simple but still important and very useful business
32
+
33
+ 9
34
+ 00:00:39,000 --> 00:00:40,000
35
+ use cases.
36
+
37
+ 10
38
+ 00:00:40,000 --> 00:00:46,000
39
+ They are preparing, generating and send an email using chat interface.
40
+
41
+ 11
42
+ 00:00:46,000 --> 00:00:53,000
43
+ In this scenario, we will ask our bot to prepare an email and it will use GPT to generate an email
44
+
45
+ 12
46
+ 00:00:53,000 --> 00:01:00,000
47
+ for us and then would ask bot to send an email to a specific user telling us the name of the user and
48
+
49
+ 13
50
+ 00:01:00,000 --> 00:01:08,000
51
+ my bot together with GPT, will handle the rest of the things I'm going to show you in this lesson how
52
+
53
+ 14
54
+ 00:01:08,000 --> 00:01:09,000
55
+ it works.
56
+
57
+ 15
58
+ 00:01:09,000 --> 00:01:16,000
59
+ And I believe that this is really useful scenario to implement because it will save a lot of hours at
60
+
61
+ 16
62
+ 00:01:16,000 --> 00:01:16,000
63
+ work.
64
+
65
+ 17
66
+ 00:01:16,000 --> 00:01:23,000
67
+ And the second scenario is that we are going to review today is generating a work items in Jira using
68
+
69
+ 18
70
+ 00:01:23,000 --> 00:01:25,000
71
+ chat interface.
72
+
73
+ 19
74
+ 00:01:25,000 --> 00:01:32,000
75
+ In previous lesson I showed you how to use Jira as data source and get additional context to answer
76
+
77
+ 20
78
+ 00:01:32,000 --> 00:01:33,000
79
+ and user requests.
80
+
81
+ 21
82
+ 00:01:33,000 --> 00:01:41,000
83
+ Basically, when the user asked our bot about state of the work, we did a request to Jira and added
84
+
85
+ 22
86
+ 00:01:41,000 --> 00:01:44,000
87
+ information about work items to the context.
88
+
89
+ 23
90
+ 00:01:44,000 --> 00:01:52,000
91
+ So in this lesson I am going to show you how to post data to Jira using our bot and ChatGPT will keep
92
+
93
+ 24
94
+ 00:01:52,000 --> 00:01:57,000
95
+ using Jira API for such purposes and function calling mechanism.
96
+
97
+ 25
98
+ 00:01:57,000 --> 00:02:03,000
99
+ So technically speaking we are going to use exactly the same approach we already used in previous lesson.
100
+
101
+ 26
102
+ 00:02:03,000 --> 00:02:06,000
103
+ The same approach but different end result.
104
+
105
+ 27
106
+ 00:02:06,000 --> 00:02:12,000
107
+ Of course, during the course I will not be able physically to cover all possible variety of potential
108
+
109
+ 28
110
+ 00:02:12,000 --> 00:02:16,000
111
+ use cases where ChatGPT may be applied.
112
+
113
+ 29
114
+ 00:02:16,000 --> 00:02:22,000
115
+ But with this lesson, I just want to give you a few more examples of how you can build powerful application
116
+
117
+ 30
118
+ 00:02:22,000 --> 00:02:24,000
119
+ using AI support.
120
+
121
+ 31
122
+ 00:02:24,000 --> 00:02:25,000
123
+ Let's start our lesson.
124
+
125
+ 32
126
+ 00:02:26,000 --> 00:02:30,000
127
+ And as I already mentioned today, we are going to have a lot of practical examples.
128
+
129
+ 33
130
+ 00:02:30,000 --> 00:02:35,000
131
+ So let me show you the end result that we are going to achieve by the end of the lesson.
132
+
133
+ 34
134
+ 00:02:36,000 --> 00:02:38,000
135
+ Imagine that you need to send an email.
136
+
137
+ 35
138
+ 00:02:38,000 --> 00:02:41,000
139
+ You clearly know what you want to send.
140
+
141
+ 36
142
+ 00:02:41,000 --> 00:02:45,000
143
+ You also know whom you want to send the email to.
144
+
145
+ 37
146
+ 00:02:45,000 --> 00:02:52,000
147
+ You just don't have too much time to put your thoughts on paper, Prepare an email and send it or you
148
+
149
+ 38
150
+ 00:02:52,000 --> 00:02:53,000
151
+ are as lazy as I am.
152
+
153
+ 39
154
+ 00:02:54,000 --> 00:03:00,000
155
+ Let me show you how both developed by me that takes advantage of GPT capabilities will help us to solve
156
+
157
+ 40
158
+ 00:03:00,000 --> 00:03:01,000
159
+ this task.
160
+
161
+ 41
162
+ 00:03:02,000 --> 00:03:03,000
163
+ I integrated.
164
+
165
+ 42
166
+ 00:03:03,000 --> 00:03:05,000
167
+ GPT was developed by me web applications.
168
+
169
+ 43
170
+ 00:03:05,000 --> 00:03:08,000
171
+ It is integrated with the Slack messenger too.
172
+
173
+ 44
174
+ 00:03:09,000 --> 00:03:15,000
175
+ So at work I just put commands and slack every time I need help from GPT.
176
+
177
+ 45
178
+ 00:03:15,000 --> 00:03:23,000
179
+ In this case, let me ask GPT to prepare an email for John, who is manager in my company and want to
180
+
181
+ 46
182
+ 00:03:23,000 --> 00:03:30,000
183
+ invite John to the meeting to review the project he is working on discuss KPIs, risks and other project
184
+
185
+ 47
186
+ 00:03:30,000 --> 00:03:31,000
187
+ related things.
188
+
189
+ 48
190
+ 00:03:32,000 --> 00:03:39,000
191
+ I need to warn him to be prepared for this meeting and tell him the exact time, date and place of our
192
+
193
+ 49
194
+ 00:03:39,000 --> 00:03:39,000
195
+ meeting.
196
+
197
+ 50
198
+ 00:03:39,000 --> 00:03:43,000
199
+ So I just ask GPT to help me with this.
200
+
201
+ 51
202
+ 00:03:43,000 --> 00:03:52,000
203
+ Then GPT generates an email for me and I must admit that the way how GPT structured this email is impressive.
204
+
205
+ 52
206
+ 00:03:52,000 --> 00:03:56,000
207
+ I have email subject here, I have email body here.
208
+
209
+ 53
210
+ 00:03:56,000 --> 00:03:59,000
211
+ I just need to put my signature and send it.
212
+
213
+ 54
214
+ 00:03:59,000 --> 00:04:06,000
215
+ But sometimes I'm so lazy that I just want to have big red button under my hand that will do everything
216
+
217
+ 55
218
+ 00:04:06,000 --> 00:04:07,000
219
+ what I need.
220
+
221
+ 56
222
+ 00:04:07,000 --> 00:04:13,000
223
+ So I even don't want to open my outlook or Gmail or any other mail client.
224
+
225
+ 57
226
+ 00:04:13,000 --> 00:04:17,000
227
+ I just ask GPT to send this email to John Doe.
228
+
229
+ 58
230
+ 00:04:17,000 --> 00:04:21,000
231
+ I just add my signature at the end of the email and that's it.
232
+
233
+ 59
234
+ 00:04:21,000 --> 00:04:24,000
235
+ What does my bot do on the background?
236
+
237
+ 60
238
+ 00:04:24,000 --> 00:04:30,000
239
+ It understands based on the context that I want to send this email to John Doe.
240
+
241
+ 61
242
+ 00:04:30,000 --> 00:04:35,000
243
+ That's why it searches for his email address in the data source configured.
244
+
245
+ 62
246
+ 00:04:35,000 --> 00:04:43,000
247
+ It also understands where subject is finished and where email body is started, so the board gives me
248
+
249
+ 63
250
+ 00:04:43,000 --> 00:04:49,000
251
+ proper arguments for my function that is in charge of sending emails based on the understanding of the
252
+
253
+ 64
254
+ 00:04:49,000 --> 00:04:50,000
255
+ context.
256
+
257
+ 65
258
+ 00:04:51,000 --> 00:04:55,000
259
+ And then I see confirmation that email was sent successfully.
260
+
261
+ 66
262
+ 00:04:55,000 --> 00:04:56,000
263
+ Amazing.
264
+
265
+ 67
266
+ 00:04:56,000 --> 00:04:59,000
267
+ Let me check the mailbox of John Doe.
268
+
269
+ 68
270
+ 00:05:00,000 --> 00:05:02,000
271
+ As you may guess, this is a demo user with a.
272
+
273
+ 69
274
+ 00:05:03,000 --> 00:05:06,000
275
+ Mailbox that created for the demo purposes.
276
+
277
+ 70
278
+ 00:05:06,000 --> 00:05:09,000
279
+ That's why have access to his email.
280
+
281
+ 71
282
+ 00:05:09,000 --> 00:05:14,000
283
+ And as we can see on the screen, John received my mail zero minutes ago.
284
+
285
+ 72
286
+ 00:05:14,000 --> 00:05:19,000
287
+ The receiving time is the same as confirmation in my slack.
288
+
289
+ 73
290
+ 00:05:19,000 --> 00:05:24,000
291
+ The remember when you last time prepared and sent emails so fast?
292
+
293
+ 74
294
+ 00:05:24,000 --> 00:05:28,000
295
+ And of course opportunities for customization are endless.
296
+
297
+ 75
298
+ 00:05:28,000 --> 00:05:33,000
299
+ You can book the online meeting if you wish or place meeting event to calendar.
300
+
301
+ 76
302
+ 00:05:33,000 --> 00:05:36,000
303
+ There are no limits on the customization.
304
+
305
+ 77
306
+ 00:05:37,000 --> 00:05:43,000
307
+ Like I always say that GPT is not a magic, but it is definitely a calculator for your brain.
308
+
309
+ 78
310
+ 00:05:43,000 --> 00:05:50,000
311
+ By saying this, I mean like obviously you can do the math in your head and calculate long numbers on
312
+
313
+ 79
314
+ 00:05:50,000 --> 00:05:55,000
315
+ paper, but you have calculator for this to boost your productivity, right?
316
+
317
+ 80
318
+ 00:05:55,000 --> 00:05:58,000
319
+ So we live in an era of AI.
320
+
321
+ 81
322
+ 00:05:58,000 --> 00:06:02,000
323
+ Let's use these tools to become even more productive and efficient.
324
+
325
+ 82
326
+ 00:06:03,000 --> 00:06:05,000
327
+ Let me show you another example.
328
+
329
+ 83
330
+ 00:06:05,000 --> 00:06:11,000
331
+ Imagine that you have engineering team and you need to create a bunch of user stories to fill out backlog
332
+
333
+ 84
334
+ 00:06:11,000 --> 00:06:12,000
335
+ for them.
336
+
337
+ 85
338
+ 00:06:12,000 --> 00:06:17,000
339
+ Of course you can do it manually, but let's take advantage of ChatGPT.
340
+
341
+ 86
342
+ 00:06:17,000 --> 00:06:22,000
343
+ And again, using our team messenger, I just tell GPT what I need.
344
+
345
+ 87
346
+ 00:06:23,000 --> 00:06:27,000
347
+ I ask it to create a user story that should be assigned to John Doe.
348
+
349
+ 88
350
+ 00:06:28,000 --> 00:06:31,000
351
+ I explain briefly what this user story is about.
352
+
353
+ 89
354
+ 00:06:31,000 --> 00:06:37,000
355
+ It is about card component in the e-commerce web app that we work on right now.
356
+
357
+ 90
358
+ 00:06:37,000 --> 00:06:40,000
359
+ I also specified due date for this task.
360
+
361
+ 91
362
+ 00:06:40,000 --> 00:06:48,000
363
+ After waiting a few moments GPT generated for me user story description with acceptance criteria and
364
+
365
+ 92
366
+ 00:06:48,000 --> 00:06:50,000
367
+ even generated a ticket in the Jira.
368
+
369
+ 93
370
+ 00:06:50,000 --> 00:06:52,000
371
+ Yeah, it is really fantastic.
372
+
373
+ 94
374
+ 00:06:53,000 --> 00:06:59,000
375
+ I use this tool that I developed in my company and it boosted the productivity in my team significantly.
376
+
377
+ 95
378
+ 00:06:59,000 --> 00:07:04,000
379
+ From now on we don't have user stories without complete description.
380
+
381
+ 96
382
+ 00:07:04,000 --> 00:07:07,000
383
+ Like I said, GPT is not a magic tool.
384
+
385
+ 97
386
+ 00:07:07,000 --> 00:07:13,000
387
+ I still recommend to verify everything what was generated here, but it doesn't take so much time in
388
+
389
+ 98
390
+ 00:07:13,000 --> 00:07:16,000
391
+ comparison when we create requirements from scratch.
392
+
393
+ 99
394
+ 00:07:17,000 --> 00:07:21,000
395
+ Here is a direct link to the Jira ticket generated too.
396
+
397
+ 100
398
+ 00:07:21,000 --> 00:07:24,000
399
+ Let's click on it and see what we have there.
400
+
401
+ 101
402
+ 00:07:25,000 --> 00:07:27,000
403
+ You can see that issue type is story.
404
+
405
+ 102
406
+ 00:07:28,000 --> 00:07:34,000
407
+ I will teach you how to develop your bot in such a way that it would recognize what issue type you want
408
+
409
+ 103
410
+ 00:07:34,000 --> 00:07:35,000
411
+ to create in Jira.
412
+
413
+ 104
414
+ 00:07:35,000 --> 00:07:37,000
415
+ Summary Description.
416
+
417
+ 105
418
+ 00:07:37,000 --> 00:07:39,000
419
+ Everything is on place.
420
+
421
+ 106
422
+ 00:07:39,000 --> 00:07:45,000
423
+ Pay attention that assignee is also configured and due date is set to August 31st.
424
+
425
+ 107
426
+ 00:07:45,000 --> 00:07:46,000
427
+ Like we asked.
428
+
429
+ 108
430
+ 00:07:47,000 --> 00:07:48,000
431
+ Amazing.
432
+
433
+ 109
434
+ 00:07:48,000 --> 00:07:52,000
435
+ And now imagine how this will boost productivity of your engineering teams.
436
+
437
+ 110
438
+ 00:07:52,000 --> 00:07:57,000
439
+ How much time and thus money will you able to save?
440
+
441
+ 111
442
+ 00:07:57,000 --> 00:08:00,000
443
+ And of course, this is just one simple example.
444
+
445
+ 112
446
+ 00:08:00,000 --> 00:08:04,000
447
+ Imagine that you can boost your planning or refinement sessions.
448
+
449
+ 113
450
+ 00:08:04,000 --> 00:08:11,000
451
+ For example, you can ask GPT to analyze the context and complexity of previously estimated user stories
452
+
453
+ 114
454
+ 00:08:11,000 --> 00:08:16,000
455
+ and ask it to make estimation of not estimated user stories.
456
+
457
+ 115
458
+ 00:08:16,000 --> 00:08:22,000
459
+ Of course, you can verify the estimation with the team and change it later if you wish, but again,
460
+
461
+ 116
462
+ 00:08:22,000 --> 00:08:24,000
463
+ this will boost your productivity.
464
+
465
+ 117
466
+ 00:08:25,000 --> 00:08:31,000
467
+ You can also ask the board that uses GPT capabilities to calculate average teams velocity and prepare
468
+
469
+ 118
470
+ 00:08:31,000 --> 00:08:39,000
471
+ the scope of the next sprint based on the estimated tickets from the backlog and even to make preliminary
472
+
473
+ 119
474
+ 00:08:39,000 --> 00:08:42,000
475
+ user stories assignment on team members.
476
+
477
+ 120
478
+ 00:08:42,000 --> 00:08:48,000
479
+ If only I was an owner of Jira Software or Azure DevOps, I would implement inbuilt support of so many
480
+
481
+ 121
482
+ 00:08:48,000 --> 00:08:49,000
483
+ cool features.
484
+
485
+ 122
486
+ 00:08:49,000 --> 00:08:55,000
487
+ But while they are still working on them inside my company, I implemented custom solutions that I use
488
+
489
+ 123
490
+ 00:08:55,000 --> 00:08:56,000
491
+ with my team.
492
+
493
+ 124
494
+ 00:08:57,000 --> 00:09:01,000
495
+ Now it is time to review the source code and implementation.
496
+
497
+ 125
498
+ 00:09:01,000 --> 00:09:06,000
499
+ As always, you can find the source code in attachments to the video.
500
+
501
+ 126
502
+ 00:09:06,000 --> 00:09:11,000
503
+ Taking into account that in this lesson we are going to use the same approach that we already learned
504
+
505
+ 127
506
+ 00:09:11,000 --> 00:09:13,000
507
+ in previous lesson.
508
+
509
+ 128
510
+ 00:09:13,000 --> 00:09:19,000
511
+ I will show you demo and will make an overview of the implementation without stopping on the things
512
+
513
+ 129
514
+ 00:09:19,000 --> 00:09:22,000
515
+ that we already learned in previous lesson.
516
+
517
+ 130
518
+ 00:09:22,000 --> 00:09:28,000
519
+ And even in case you would have any questions, please do not hesitate to ask your questions below the
520
+
521
+ 131
522
+ 00:09:28,000 --> 00:09:31,000
523
+ video and I will be happy to answer.
524
+
525
+ 132
526
+ 00:09:31,000 --> 00:09:37,000
527
+ Let me start the review from the implementation of scenarios that will generate tickets for us in Jira.
528
+
529
+ 133
530
+ 00:09:38,000 --> 00:09:44,000
531
+ Basically, together, we did a great job in previous lessons by implementing scalable architecture
532
+
533
+ 134
534
+ 00:09:45,000 --> 00:09:51,000
535
+ that is advantage of all approach in comparison to pure functional programming approach.
536
+
537
+ 135
538
+ 00:09:51,000 --> 00:10:00,000
539
+ The advantage becomes obvious on a bigger scale and as amount of code grows, the logic and principles
540
+
541
+ 136
542
+ 00:10:00,000 --> 00:10:07,000
543
+ used to build our program helps us to scale faster and reliably without the risk of breaking the code
544
+
545
+ 137
546
+ 00:10:07,000 --> 00:10:09,000
547
+ that we wrote before.
548
+
549
+ 138
550
+ 00:10:09,000 --> 00:10:15,000
551
+ So the only thing that we need to do is to add additional functions that would be in charge of creation
552
+
553
+ 139
554
+ 00:10:15,000 --> 00:10:22,000
555
+ ticket in Jira, because we already implemented code that gathers all beans of GPT functions and then
556
+
557
+ 140
558
+ 00:10:22,000 --> 00:10:24,000
559
+ request to call functions.
560
+
561
+ 141
562
+ 00:10:24,000 --> 00:10:27,000
563
+ All this was already implemented.
564
+
565
+ 142
566
+ 00:10:27,000 --> 00:10:31,000
567
+ So let me open beans configuration class here.
568
+
569
+ 143
570
+ 00:10:31,000 --> 00:10:39,000
571
+ I declared bin of GPT function and called it GPT Create Jira issue function as usual.
572
+
573
+ 144
574
+ 00:10:39,000 --> 00:10:42,000
575
+ I created function, set, name and description.
576
+
577
+ 145
578
+ 00:10:42,000 --> 00:10:45,000
579
+ And now let's talk about parameters.
580
+
581
+ 146
582
+ 00:10:45,000 --> 00:10:52,000
583
+ So my function would require GPT to define the following parameters based on the context and give me
584
+
585
+ 147
586
+ 00:10:52,000 --> 00:10:53,000
587
+ them in order.
588
+
589
+ 148
590
+ 00:10:53,000 --> 00:11:01,000
591
+ I can make a request to Jira API, so I need to assign name work item description.
592
+
593
+ 149
594
+ 00:11:01,000 --> 00:11:07,000
595
+ By the way, I expect that GPT will help me with both things to find the description for work item in
596
+
597
+ 150
598
+ 00:11:07,000 --> 00:11:12,000
599
+ the context and actually to generate it based on my request first.
600
+
601
+ 151
602
+ 00:11:12,000 --> 00:11:19,000
603
+ So GPT will generate the full description for the work item like you saw in the demo and then it will
604
+
605
+ 152
606
+ 00:11:19,000 --> 00:11:23,000
607
+ give me the description in order I can create a work item in Jira.
608
+
609
+ 153
610
+ 00:11:24,000 --> 00:11:32,000
611
+ Also, I need issue type attribute in order to understand what work item I need to create user story
612
+
613
+ 154
614
+ 00:11:32,000 --> 00:11:34,000
615
+ task epic bug.
616
+
617
+ 155
618
+ 00:11:34,000 --> 00:11:42,000
619
+ You can see that I also pass array of possible issue types in case ChatGPT can find information about
620
+
621
+ 156
622
+ 00:11:42,000 --> 00:11:45,000
623
+ you date based on the context.
624
+
625
+ 157
626
+ 00:11:45,000 --> 00:11:52,000
627
+ I would also ask it to provide me with it and the summary of the work item for the title in parameters.
628
+
629
+ 158
630
+ 00:11:52,000 --> 00:11:58,000
631
+ I also specified that summary description, issue type and due date are required attributes, but if
632
+
633
+ 159
634
+ 00:11:58,000 --> 00:12:05,000
635
+ you already worked with ChatGPT in previous lessons, I believe that you already understand that all
636
+
637
+ 160
638
+ 00:12:05,000 --> 00:12:08,000
639
+ of this is just a recommendation for ChatGPT.
640
+
641
+ 161
642
+ 00:12:09,000 --> 00:12:16,000
643
+ So even in case it wouldn't find due date, it still can request to call the function, but without
644
+
645
+ 162
646
+ 00:12:16,000 --> 00:12:16,000
647
+ due date.
648
+
649
+ 163
650
+ 00:12:17,000 --> 00:12:24,000
651
+ I had such cases and I will be honest with you, I hope that guys from OpenAI will keep improving their
652
+
653
+ 164
654
+ 00:12:24,000 --> 00:12:24,000
655
+ product.
656
+
657
+ 165
658
+ 00:12:24,000 --> 00:12:27,000
659
+ But based on today it works like this.
660
+
661
+ 166
662
+ 00:12:28,000 --> 00:12:31,000
663
+ Still, I decided to keep due date as required attribute.
664
+
665
+ 167
666
+ 00:12:32,000 --> 00:12:38,000
667
+ You can explore my source code and try different options and select the ones that works the best for
668
+
669
+ 168
670
+ 00:12:38,000 --> 00:12:40,000
671
+ you to address your business needs.
672
+
673
+ 169
674
+ 00:12:40,000 --> 00:12:46,000
675
+ You can see that all values are configurable and located in my properties file.
676
+
677
+ 170
678
+ 00:12:46,000 --> 00:12:53,000
679
+ Feel free to explore the attribute descriptions, but I bet there will not be any surprises for you.
680
+
681
+ 171
682
+ 00:12:53,000 --> 00:13:01,000
683
+ I just described for ChatGPT what each attribute means and in similar way I created classes of required
684
+
685
+ 172
686
+ 00:13:01,000 --> 00:13:02,000
687
+ entities.
688
+
689
+ 173
690
+ 00:13:02,000 --> 00:13:08,000
691
+ I wouldn't stop on that too, because in previous lesson we also created classes for entities.
692
+
693
+ 174
694
+ 00:13:08,000 --> 00:13:15,000
695
+ So I can just confirm that I used this same approach and principles here in case Jira will decide to
696
+
697
+ 175
698
+ 00:13:15,000 --> 00:13:23,000
699
+ invoke the function I will take from the context create Jira issue function been that I also configure
700
+
701
+ 176
702
+ 00:13:23,000 --> 00:13:24,000
703
+ it here.
704
+
705
+ 177
706
+ 00:13:24,000 --> 00:13:33,000
707
+ Let's check this function according to the interface it implements one method execute so I pass arguments
708
+
709
+ 178
710
+ 00:13:33,000 --> 00:13:40,000
711
+ in order to not pass arguments one by one, I created separate entity and pass all arguments directly
712
+
713
+ 179
714
+ 00:13:40,000 --> 00:13:41,000
715
+ to Jira.
716
+
717
+ 180
718
+ 00:13:41,000 --> 00:13:44,000
719
+ Issue fields object in general service.
720
+
721
+ 181
722
+ 00:13:44,000 --> 00:13:48,000
723
+ I implemented method that is called create Jira issue.
724
+
725
+ 182
726
+ 00:13:48,000 --> 00:13:53,000
727
+ It will be in charge of creation of work item in Jira.
728
+
729
+ 183
730
+ 00:13:54,000 --> 00:13:56,000
731
+ Let me open the source code of the default.
732
+
733
+ 184
734
+ 00:13:57,000 --> 00:14:00,000
735
+ Service class and show you the implementation of that message.
736
+
737
+ 185
738
+ 00:14:01,000 --> 00:14:08,000
739
+ And here you can see implementation of the message using Jira API documentation that we reviewed in
740
+
741
+ 186
742
+ 00:14:08,000 --> 00:14:09,000
743
+ the lesson about Jira API.
744
+
745
+ 187
746
+ 00:14:10,000 --> 00:14:17,000
747
+ I created URL and http post request object and here goes specifics of Jira API.
748
+
749
+ 188
750
+ 00:14:18,000 --> 00:14:23,000
751
+ I just need to prepare the body of the post request and also for assignee.
752
+
753
+ 189
754
+ 00:14:23,000 --> 00:14:30,000
755
+ I need to extract Jira user ID because according to API it is not enough to parse the name.
756
+
757
+ 190
758
+ 00:14:31,000 --> 00:14:37,000
759
+ So based on the name I extract Jira user id and I have separate method for that.
760
+
761
+ 191
762
+ 00:14:37,000 --> 00:14:44,000
763
+ In Jira Cloud there is an endpoint that returns the array of users and you can work with it as you wish.
764
+
765
+ 192
766
+ 00:14:44,000 --> 00:14:47,000
767
+ In order to find Jira user ID.
768
+
769
+ 193
770
+ 00:14:47,000 --> 00:14:54,000
771
+ So I created here Jira request body object that contains fields property.
772
+
773
+ 194
774
+ 00:14:54,000 --> 00:15:00,000
775
+ Fields contains assignee issue type project description due date summary.
776
+
777
+ 195
778
+ 00:15:01,000 --> 00:15:06,000
779
+ Then set the Jira request body to the Http post object as an entity.
780
+
781
+ 196
782
+ 00:15:07,000 --> 00:15:13,000
783
+ This is interface of Apache http client that we already used and learned before.
784
+
785
+ 197
786
+ 00:15:13,000 --> 00:15:16,000
787
+ That's why don't stop on this too much.
788
+
789
+ 198
790
+ 00:15:16,000 --> 00:15:19,000
791
+ Then I should receive response from Jira.
792
+
793
+ 199
794
+ 00:15:19,000 --> 00:15:25,000
795
+ And here in Commented Lines you can see the example of response that I expect to receive.
796
+
797
+ 200
798
+ 00:15:26,000 --> 00:15:33,000
799
+ I extract only value of the key attribute and in the create Jira issue function class you saw that I
800
+
801
+ 201
802
+ 00:15:33,000 --> 00:15:41,000
803
+ returned back the year of the ticket in know the GPT can let our end user know the idea of the ticket
804
+
805
+ 202
806
+ 00:15:41,000 --> 00:15:42,000
807
+ that was created.
808
+
809
+ 203
810
+ 00:15:42,000 --> 00:15:49,000
811
+ And also another important point in order to improve user experience in the default slack service method,
812
+
813
+ 204
814
+ 00:15:49,000 --> 00:15:54,000
815
+ I created a method that is called add hyper references to Jira.
816
+
817
+ 205
818
+ 00:15:55,000 --> 00:16:02,000
819
+ This method finds the Jira ticket IDs based on the pattern configured in the regular expression that
820
+
821
+ 206
822
+ 00:16:02,000 --> 00:16:10,000
823
+ takes into account Jira, project name, dash and number and substitute all Jira tickets mentions by
824
+
825
+ 207
826
+ 00:16:10,000 --> 00:16:12,000
827
+ adding hyper reference in the parentheses.
828
+
829
+ 208
830
+ 00:16:12,000 --> 00:16:14,000
831
+ Next is the Jira key.
832
+
833
+ 209
834
+ 00:16:14,000 --> 00:16:20,000
835
+ This is just an additional feature that I added in order to improve user experience for end user by
836
+
837
+ 210
838
+ 00:16:20,000 --> 00:16:24,000
839
+ having linked to the Jira in the chat like you saw in the demo.
840
+
841
+ 211
842
+ 00:16:25,000 --> 00:16:26,000
843
+ Basically that's it.
844
+
845
+ 212
846
+ 00:16:27,000 --> 00:16:32,000
847
+ Like I said, you can find the reference to the source code in attachments to the video.
848
+
849
+ 213
850
+ 00:16:32,000 --> 00:16:34,000
851
+ Feel free to look through the solution.
852
+
853
+ 214
854
+ 00:16:34,000 --> 00:16:40,000
855
+ I believe there will be nothing new to you because we learned already everything what is required to
856
+
857
+ 215
858
+ 00:16:40,000 --> 00:16:42,000
859
+ implement this solution.
860
+
861
+ 216
862
+ 00:16:42,000 --> 00:16:47,000
863
+ But still, in case you would have any specific question, I'm here to help.
864
+
865
+ 217
866
+ 00:16:47,000 --> 00:16:52,000
867
+ Let's review now the second scenario with sending an email in the similar way.
868
+
869
+ 218
870
+ 00:16:52,000 --> 00:16:55,000
871
+ Let me start overview from the beans configuration file.
872
+
873
+ 219
874
+ 00:16:56,000 --> 00:17:00,000
875
+ I declare the beans that is called GPT Send email function.
876
+
877
+ 220
878
+ 00:17:00,000 --> 00:17:08,000
879
+ I tell GPT which parameters I expect in order I can send an email so it is either addressee, email
880
+
881
+ 221
882
+ 00:17:08,000 --> 00:17:10,000
883
+ or addressee name.
884
+
885
+ 222
886
+ 00:17:10,000 --> 00:17:16,000
887
+ And again, everything will depend on the environment you work in and business requirements.
888
+
889
+ 223
890
+ 00:17:16,000 --> 00:17:23,000
891
+ For example, current solution will send an email in case there will be email address in the context
892
+
893
+ 224
894
+ 00:17:23,000 --> 00:17:30,000
895
+ and it will also send an email in case there will not be email address in the context, but in case
896
+
897
+ 225
898
+ 00:17:30,000 --> 00:17:34,000
899
+ ChatGPT can get the full name of the addressee from the context.
900
+
901
+ 226
902
+ 00:17:34,000 --> 00:17:42,000
903
+ In this case, ChatGPT will give me a name and I will find email address in the third party data source
904
+
905
+ 227
906
+ 00:17:42,000 --> 00:17:49,000
907
+ and in my case I can integrate with internal data source where I can find email by full name.
908
+
909
+ 228
910
+ 00:17:49,000 --> 00:17:57,000
911
+ For example, I can find email in Active Directory or whatever tool your organization uses, even from
912
+
913
+ 229
914
+ 00:17:57,000 --> 00:17:59,000
915
+ Excel file if needed.
916
+
917
+ 230
918
+ 00:17:59,000 --> 00:18:05,000
919
+ So just check the business requirements and decide how you want to implement this part of functionality.
920
+
921
+ 231
922
+ 00:18:05,000 --> 00:18:11,000
923
+ And there are also two other attributes that we need email, subject and email content.
924
+
925
+ 232
926
+ 00:18:11,000 --> 00:18:12,000
927
+ That's it.
928
+
929
+ 233
930
+ 00:18:12,000 --> 00:18:21,000
931
+ Required attributes are content and subject in case ChatGPT will not be able to identify an email address
932
+
933
+ 234
934
+ 00:18:21,000 --> 00:18:22,000
935
+ nor name of the addressee.
936
+
937
+ 235
938
+ 00:18:22,000 --> 00:18:29,000
939
+ In this case, I will let end user know that I can't execute this function and that I need is an email
940
+
941
+ 236
942
+ 00:18:29,000 --> 00:18:30,000
943
+ or full name.
944
+
945
+ 237
946
+ 00:18:31,000 --> 00:18:38,000
947
+ Then, in case ChatGPT would ask me to call this function, I will extract send email function being
948
+
949
+ 238
950
+ 00:18:38,000 --> 00:18:39,000
951
+ from the context.
952
+
953
+ 239
954
+ 00:18:39,000 --> 00:18:47,000
955
+ Let's check how it is implemented in the send email function been injected mail service.
956
+
957
+ 240
958
+ 00:18:47,000 --> 00:18:54,000
959
+ This is the type that will be responsible for sending an email in the execute method during the passing
960
+
961
+ 241
962
+ 00:18:54,000 --> 00:19:01,000
963
+ of the arguments in case there is no email or addressee name, I returns a message that tells that email
964
+
965
+ 242
966
+ 00:19:01,000 --> 00:19:02,000
967
+ wasn't sent and why.
968
+
969
+ 243
970
+ 00:19:03,000 --> 00:19:11,000
971
+ In case there is no email but there is an addressee name, I try to extract email address first of our
972
+
973
+ 244
974
+ 00:19:11,000 --> 00:19:15,000
975
+ user in case full email address can't be found.
976
+
977
+ 245
978
+ 00:19:15,000 --> 00:19:21,000
979
+ I send back information that email wasn't sent and explains the reason why.
980
+
981
+ 246
982
+ 00:19:21,000 --> 00:19:27,000
983
+ You can see that I use extract email by full name method from email service in order to extract the
984
+
985
+ 247
986
+ 00:19:27,000 --> 00:19:28,000
987
+ email.
988
+
989
+ 248
990
+ 00:19:29,000 --> 00:19:33,000
991
+ This is exactly the message that you need to decide how you would implement it.
992
+
993
+ 249
994
+ 00:19:33,000 --> 00:19:40,000
995
+ You can read email addresses and full names from external data source, like for example, from the
996
+
997
+ 250
998
+ 00:19:40,000 --> 00:19:47,000
999
+ database, from Active Directory, from Excel file, whatever data source you like the most.
1000
+
1001
+ 251
1002
+ 00:19:47,000 --> 00:19:54,000
1003
+ In this specific learning example, I hardcoded map with full names and email addresses taking into
1004
+
1005
+ 252
1006
+ 00:19:54,000 --> 00:19:57,000
1007
+ account this is application for my students.
1008
+
1009
+ 253
1010
+ 00:19:57,000 --> 00:20:02,000
1011
+ I don't want to overcomplicate this example with one more integration.
1012
+
1013
+ 254
1014
+ 00:20:02,000 --> 00:20:09,000
1015
+ One day we will learn about integration with Active Directory and we will update this example because
1016
+
1017
+ 255
1018
+ 00:20:09,000 --> 00:20:13,000
1019
+ it is a separate, larger topic to talk about, not in scope of this lesson.
1020
+
1021
+ 256
1022
+ 00:20:14,000 --> 00:20:19,000
1023
+ And send email method is implemented right above in the same file.
1024
+
1025
+ 257
1026
+ 00:20:19,000 --> 00:20:27,000
1027
+ I configured gmail Smtp server for sending emails and again, this method can be implemented in different
1028
+
1029
+ 258
1030
+ 00:20:27,000 --> 00:20:28,000
1031
+ ways.
1032
+
1033
+ 259
1034
+ 00:20:28,000 --> 00:20:35,000
1035
+ You can use dedicated email client for sending emails from your board, or you can find a way to authenticate
1036
+
1037
+ 260
1038
+ 00:20:35,000 --> 00:20:40,000
1039
+ and authorize access of the end user to his or her email.
1040
+
1041
+ 261
1042
+ 00:20:40,000 --> 00:20:46,000
1043
+ And this configuration can be done during the bot installation or when start using the bot.
1044
+
1045
+ 262
1046
+ 00:20:46,000 --> 00:20:52,000
1047
+ Again, there is unlimited variety of options of how you can build this integration.
1048
+
1049
+ 263
1050
+ 00:20:52,000 --> 00:20:59,000
1051
+ The main thing is that you understand the key principles and if you understand them well, you are limited
1052
+
1053
+ 264
1054
+ 00:20:59,000 --> 00:21:06,000
1055
+ only with your fantasy of how you want to implement this in the send email function source code.
1056
+
1057
+ 265
1058
+ 00:21:06,000 --> 00:21:11,000
1059
+ You can see that in case email was sent and sent, email message returned.
1060
+
1061
+ 266
1062
+ 00:21:11,000 --> 00:21:11,000
1063
+ True.
1064
+
1065
+ 267
1066
+ 00:21:12,000 --> 00:21:19,000
1067
+ In case of success, I notify my board and GPG that email was sent in case there was some exception
1068
+
1069
+ 268
1070
+ 00:21:19,000 --> 00:21:21,000
1071
+ during email sending.
1072
+
1073
+ 269
1074
+ 00:21:21,000 --> 00:21:28,000
1075
+ Send email message will return false and will confirm that email wasn't sent with adding reasoning message.
1076
+
1077
+ 270
1078
+ 00:21:29,000 --> 00:21:30,000
1079
+ Basically that's it.
1080
+
1081
+ 271
1082
+ 00:21:31,000 --> 00:21:36,000
1083
+ If you are interested in how I send an email, you can spend a little bit more time reviewing the source
1084
+
1085
+ 272
1086
+ 00:21:36,000 --> 00:21:38,000
1087
+ code of the default mail service.
1088
+
1089
+ 273
1090
+ 00:21:39,000 --> 00:21:44,000
1091
+ Even in case you would have any questions or in case you would like me to review this topic in details,
1092
+
1093
+ 274
1094
+ 00:21:44,000 --> 00:21:46,000
1095
+ I am just two clicks away.
1096
+
1097
+ 275
1098
+ 00:21:47,000 --> 00:21:51,000
1099
+ You can write your question below this video and I will be happy to answer.
1100
+
1101
+ 276
1102
+ 00:21:51,000 --> 00:21:54,000
1103
+ Okay, that's it for this lesson.
1104
+
1105
+ 277
1106
+ 00:21:54,000 --> 00:21:57,000
1107
+ Let's recap what we have learned today.
1108
+
1109
+ 278
1110
+ 00:21:57,000 --> 00:22:03,000
1111
+ In this lesson, we reviewed two scenarios to business use cases of how you can apply your knowledge
1112
+
1113
+ 279
1114
+ 00:22:03,000 --> 00:22:05,000
1115
+ and practice with ChatGPT.
1116
+
1117
+ 280
1118
+ 00:22:05,000 --> 00:22:12,000
1119
+ They are creating work item in Jira, generating description and summary for Jira ticket directly from
1120
+
1121
+ 281
1122
+ 00:22:12,000 --> 00:22:20,000
1123
+ the slack and the second scenario preparation of email and sending it via a chat interface.
1124
+
1125
+ 282
1126
+ 00:22:20,000 --> 00:22:22,000
1127
+ That's all for today.
1128
+
1129
+ 283
1130
+ 00:22:22,000 --> 00:22:24,000
1131
+ Thanks a lot for your attention.
1132
+
1133
+ 284
1134
+ 00:22:24,000 --> 00:22:27,000
1135
+ Have a great day and see you in the next lesson.
1136
+
100 - GPT + Slack + Jira + Gmail Integration/002 Generate-email-and-send-it-from-chat-Source-code-of-examples-from-the-lesson-commit-with-changes-.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/commit/5fa99c435a722527fccb152de538e113cb397985
100 - GPT + Slack + Jira + Gmail Integration/external-links.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+
2
+ 001 Source-code-of-examples-from-the-lesson-commit-with-changes-
3
+ https://github.com/AndriiPiatakha/openai-learnit/commit/cb46583146e15ddd4782ab32315c14ca55f73edf
4
+
5
+ 002 Create-Jira-ticket-from-chat-Source-code-of-examples-from-the-lesson-commit-with-changes-
6
+ https://github.com/AndriiPiatakha/openai-learnit/commit/7853021ac12529fcb1c58f49f6d9495624f8850b
7
+
8
+ 002 Generate-email-and-send-it-from-chat-Source-code-of-examples-from-the-lesson-commit-with-changes-
9
+ https://github.com/AndriiPiatakha/openai-learnit/commit/5fa99c435a722527fccb152de538e113cb397985
101 - Manage a Scrum Team with ChatGPT/001 Average-velocity-calculation-Source-code-of-examples-from-the-lesson-commit-with-changes-.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/commit/e4266b6cc3cb9c1021bd8810471fd6fa7c21ca64
101 - Manage a Scrum Team with ChatGPT/001 Managing Scrum & Risk Management with Custom Bot, Slack & GPT_en.srt ADDED
@@ -0,0 +1,560 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1
2
+ 00:00:05,000 --> 00:00:07,000
3
+ Hello, my name is Andre Petaja.
4
+
5
+ 2
6
+ 00:00:07,000 --> 00:00:14,000
7
+ Let me show you how I use boards that I develop that use capabilities of ChatGPT in order to perform
8
+
9
+ 3
10
+ 00:00:14,000 --> 00:00:16,000
11
+ project management operational activities.
12
+
13
+ 4
14
+ 00:00:17,000 --> 00:00:23,000
15
+ Right now, I want to show you the scenario, how I use board with ChatGPT to boost my sprint planning
16
+
17
+ 5
18
+ 00:00:23,000 --> 00:00:25,000
19
+ and sprint preparation activities.
20
+
21
+ 6
22
+ 00:00:25,000 --> 00:00:31,000
23
+ If you are a project manager who has experience with Scrum methodology, you know that during spring
24
+
25
+ 7
26
+ 00:00:31,000 --> 00:00:37,000
27
+ planning it is better to know teams capacity for the next sprint in order to be more accurate during
28
+
29
+ 8
30
+ 00:00:37,000 --> 00:00:38,000
31
+ the planning.
32
+
33
+ 9
34
+ 00:00:38,000 --> 00:00:44,000
35
+ There are different approaches how to calculate teams capacity, but one of the approaches that I use
36
+
37
+ 10
38
+ 00:00:44,000 --> 00:00:49,000
39
+ is calculation of sprint capacity based on the average velocity in story points.
40
+
41
+ 11
42
+ 00:00:49,000 --> 00:00:56,000
43
+ So usually I take amount of story points delivered in the last 2 or 3 sprints and calculate average
44
+
45
+ 12
46
+ 00:00:56,000 --> 00:00:57,000
47
+ velocity.
48
+
49
+ 13
50
+ 00:00:57,000 --> 00:01:03,000
51
+ Then, based on the average velocity, I define teams capacity in order to plan sprint.
52
+
53
+ 14
54
+ 00:01:04,000 --> 00:01:10,000
55
+ In the current example you can see that I created fake sprints with fake data in order to have some
56
+
57
+ 15
58
+ 00:01:10,000 --> 00:01:12,000
59
+ data for the use case that I want to demo.
60
+
61
+ 16
62
+ 00:01:13,000 --> 00:01:20,000
63
+ I closed three sprints with the user stories and I received the following data in the sprint.
64
+
65
+ 17
66
+ 00:01:20,000 --> 00:01:24,000
67
+ Number one, my team delivered 16 story points in the sprint.
68
+
69
+ 18
70
+ 00:01:24,000 --> 00:01:32,000
71
+ Number two, my team managed to complete 14 story points and in the sprint three also 14 story points.
72
+
73
+ 19
74
+ 00:01:33,000 --> 00:01:38,000
75
+ We are going to use this data in our example in order to review end to end scenario.
76
+
77
+ 20
78
+ 00:01:39,000 --> 00:01:45,000
79
+ And now imagine that I have a conversation in Slack Messenger with my team members or with my Scrum
80
+
81
+ 21
82
+ 00:01:45,000 --> 00:01:50,000
83
+ Masters and I just want to get more information about the average velocity.
84
+
85
+ 22
86
+ 00:01:50,000 --> 00:01:53,000
87
+ I need this information to hold planning.
88
+
89
+ 23
90
+ 00:01:53,000 --> 00:01:56,000
91
+ I can just ask my bot in chat.
92
+
93
+ 24
94
+ 00:01:56,000 --> 00:02:03,000
95
+ What is the average velocity based on the previously completed three sprints and receive a response.
96
+
97
+ 25
98
+ 00:02:03,000 --> 00:02:10,000
99
+ 14.67 story points, which is correct based on the data we received from Jira.
100
+
101
+ 26
102
+ 00:02:11,000 --> 00:02:19,000
103
+ I can clarify the average velocity based on the previous two sprints and the answer is 14 story points
104
+
105
+ 27
106
+ 00:02:19,000 --> 00:02:27,000
107
+ is it is also correct because in Sprint two and Sprint three, my team delivered 14 story points per
108
+
109
+ 28
110
+ 00:02:27,000 --> 00:02:34,000
111
+ each sprint and I know that I can open velocity charts in Jira and take information from there.
112
+
113
+ 29
114
+ 00:02:34,000 --> 00:02:39,000
115
+ But what if this is a live chat and I want to receive information faster?
116
+
117
+ 30
118
+ 00:02:39,000 --> 00:02:46,000
119
+ And this scenario is very simplified demo because in reality you can integrate these commands into more
120
+
121
+ 31
122
+ 00:02:46,000 --> 00:02:54,000
123
+ complex scenarios like email preparation and its auto generation reports generation and many other different
124
+
125
+ 32
126
+ 00:02:54,000 --> 00:02:55,000
127
+ generation scenarios.
128
+
129
+ 33
130
+ 00:02:55,000 --> 00:03:01,000
131
+ But even using it in chat is pretty comfortable knowing this information.
132
+
133
+ 34
134
+ 00:03:01,000 --> 00:03:07,000
135
+ I can proceed with planning, but in order you can understand the use case, let me show you how my
136
+
137
+ 35
138
+ 00:03:07,000 --> 00:03:09,000
139
+ backlog looks like now.
140
+
141
+ 36
142
+ 00:03:09,000 --> 00:03:16,000
143
+ In my backlog, I already have estimated workitems that by the way, also may be estimated with the
144
+
145
+ 37
146
+ 00:03:16,000 --> 00:03:22,000
147
+ help of board and ChatGPT based on the analysis of the text description of the previous user stories.
148
+
149
+ 38
150
+ 00:03:23,000 --> 00:03:31,000
151
+ Or we can train and fine tune our model in order to teach it how to define complexity based on the requirements.
152
+
153
+ 39
154
+ 00:03:31,000 --> 00:03:35,000
155
+ But that case will be described and shown in the separate demo.
156
+
157
+ 40
158
+ 00:03:36,000 --> 00:03:41,000
159
+ So here in the backlog, you can also see that user stories have priorities.
160
+
161
+ 41
162
+ 00:03:41,000 --> 00:03:48,000
163
+ And when I plan Sprint, I want to take into consideration priorities and plan the user stories with
164
+
165
+ 42
166
+ 00:03:48,000 --> 00:03:56,000
167
+ highest priorities and then with lowest, you can see that there are two heavy user stories with high
168
+
169
+ 43
170
+ 00:03:56,000 --> 00:03:59,000
171
+ priority eight story points each.
172
+
173
+ 44
174
+ 00:03:59,000 --> 00:04:04,000
175
+ That means, unfortunately, both of them doesn't fit into Sprint.
176
+
177
+ 45
178
+ 00:04:04,000 --> 00:04:12,000
179
+ If our capacity is 14 story points and in this case, remaining space in Sprint should be filled out
180
+
181
+ 46
182
+ 00:04:12,000 --> 00:04:14,000
183
+ by user stories with lower priorities.
184
+
185
+ 47
186
+ 00:04:14,000 --> 00:04:16,000
187
+ Does it sound logical for you?
188
+
189
+ 48
190
+ 00:04:16,000 --> 00:04:26,000
191
+ So let me ask now our board to plan Sprint four Considering that our capacity is 14 story points, I
192
+
193
+ 49
194
+ 00:04:26,000 --> 00:04:32,000
195
+ decided to use average velocity based on the previous two sprints to calculate our capacity for the
196
+
197
+ 50
198
+ 00:04:32,000 --> 00:04:33,000
199
+ next sprint.
200
+
201
+ 51
202
+ 00:04:33,000 --> 00:04:39,000
203
+ And after a few moments my boss replies me that sprint was planned and such stories are included into
204
+
205
+ 52
206
+ 00:04:39,000 --> 00:04:44,000
207
+ the sprint for the plan was done with respect to teams capacity.
208
+
209
+ 53
210
+ 00:04:45,000 --> 00:04:49,000
211
+ Let me open Jira now and make sure that these changes are reflected.
212
+
213
+ 54
214
+ 00:04:50,000 --> 00:04:57,000
215
+ So I refresh the page and I can see that Sprint four is planned with top priority items for certain
216
+
217
+ 55
218
+ 00:04:57,000 --> 00:05:02,000
219
+ story points, and the only thing that is left is to start the sprint.
220
+
221
+ 56
222
+ 00:05:03,000 --> 00:05:09,000
223
+ Another user story was high priority for eight story points, unfortunately doesn't fit into the sprint
224
+
225
+ 57
226
+ 00:05:09,000 --> 00:05:12,000
227
+ and will be left for the following sprint planning.
228
+
229
+ 58
230
+ 00:05:13,000 --> 00:05:20,000
231
+ That's how using chat interface I can check average velocity in story points and plan the following
232
+
233
+ 59
234
+ 00:05:20,000 --> 00:05:20,000
235
+ sprint.
236
+
237
+ 60
238
+ 00:05:20,000 --> 00:05:28,000
239
+ And just keep in mind that this is just one example and variety of other combinations or options for
240
+
241
+ 61
242
+ 00:05:28,000 --> 00:05:31,000
243
+ how you can build your own board with chat.
244
+
245
+ 62
246
+ 00:05:31,000 --> 00:05:33,000
247
+ GPT integration is unlimited.
248
+
249
+ 63
250
+ 00:05:34,000 --> 00:05:36,000
251
+ Okay, let's review another example.
252
+
253
+ 64
254
+ 00:05:36,000 --> 00:05:42,000
255
+ Now, I would like to show you how my board that is integrated with ChatGPT helps me to manage risks
256
+
257
+ 65
258
+ 00:05:42,000 --> 00:05:45,000
259
+ and work with risks on daily basis.
260
+
261
+ 66
262
+ 00:05:45,000 --> 00:05:46,000
263
+ Risk management.
264
+
265
+ 67
266
+ 00:05:46,000 --> 00:05:50,000
267
+ That is something what is not specific only for scrum projects.
268
+
269
+ 68
270
+ 00:05:50,000 --> 00:05:57,000
271
+ That's why no matter whether you worked with Scrum before or no, this example should be clear for you.
272
+
273
+ 69
274
+ 00:05:57,000 --> 00:06:01,000
275
+ In case you are familiar with project management techniques according to PMI.
276
+
277
+ 70
278
+ 00:06:02,000 --> 00:06:05,000
279
+ Let me start from the preconditions.
280
+
281
+ 71
282
+ 00:06:05,000 --> 00:06:09,000
283
+ In our specific example, I configured separate board for risk management.
284
+
285
+ 72
286
+ 00:06:09,000 --> 00:06:13,000
287
+ On this board I have only items with risk issue type.
288
+
289
+ 73
290
+ 00:06:14,000 --> 00:06:16,000
291
+ This is a custom type that I created.
292
+
293
+ 74
294
+ 00:06:17,000 --> 00:06:18,000
295
+ There are six risks.
296
+
297
+ 75
298
+ 00:06:18,000 --> 00:06:22,000
299
+ Each risk has its own impact and probability.
300
+
301
+ 76
302
+ 00:06:22,000 --> 00:06:30,000
303
+ Configure it and imagine that I want to streamline our conversation and have a chat about risks directly
304
+
305
+ 77
306
+ 00:06:30,000 --> 00:06:37,000
307
+ in the messenger with my colleagues so I can use my board to ask questions about risks that we have
308
+
309
+ 78
310
+ 00:06:37,000 --> 00:06:38,000
311
+ on our project.
312
+
313
+ 79
314
+ 00:06:39,000 --> 00:06:42,000
315
+ For example, let's start with simple questions.
316
+
317
+ 80
318
+ 00:06:42,000 --> 00:06:45,000
319
+ How many risks we have in total?
320
+
321
+ 81
322
+ 00:06:45,000 --> 00:06:49,000
323
+ And when Jira is connected as a data source to the board.
324
+
325
+ 82
326
+ 00:06:49,000 --> 00:06:56,000
327
+ I use ChatGPT linguistic capabilities to understand my request and provide me with the response.
328
+
329
+ 83
330
+ 00:06:56,000 --> 00:07:02,000
331
+ In case you set priorities to risks and you need to review risks by priorities, I can ask board to
332
+
333
+ 84
334
+ 00:07:02,000 --> 00:07:09,000
335
+ provide me with the requested information and you can see that I have one ticket with the highest priority,
336
+
337
+ 85
338
+ 00:07:09,000 --> 00:07:16,000
339
+ one with high priority, and the rest of risks have the medium priority on the Kanban board.
340
+
341
+ 86
342
+ 00:07:16,000 --> 00:07:23,000
343
+ You can check how accurate our board is and you can see that both provided us with correct information
344
+
345
+ 87
346
+ 00:07:23,000 --> 00:07:24,000
347
+ about priorities.
348
+
349
+ 88
350
+ 00:07:24,000 --> 00:07:30,000
351
+ That is because it is smart enough to process the data that is provided to the board on request.
352
+
353
+ 89
354
+ 00:07:30,000 --> 00:07:38,000
355
+ ChatGPT identifies what information is needed and asks my board to provide necessary information.
356
+
357
+ 90
358
+ 00:07:38,000 --> 00:07:45,000
359
+ My board fetches required information and provides it back to the GPT for the further analysis.
360
+
361
+ 91
362
+ 00:07:45,000 --> 00:07:47,000
363
+ That is what is happening in the background.
364
+
365
+ 92
366
+ 00:07:48,000 --> 00:07:56,000
367
+ If we want, we can ask to group all risks by statuses and a few moments after I receive the response,
368
+
369
+ 93
370
+ 00:07:56,000 --> 00:08:01,000
371
+ we can see here clear breakdown of risk items by statuses.
372
+
373
+ 94
374
+ 00:08:01,000 --> 00:08:09,000
375
+ I can request to group risks by impact and again, I receive information that I need that was analyzed
376
+
377
+ 95
378
+ 00:08:09,000 --> 00:08:11,000
379
+ and processed by ChatGPT.
380
+
381
+ 96
382
+ 00:08:11,000 --> 00:08:15,000
383
+ And you can ask to analyze any data you need.
384
+
385
+ 97
386
+ 00:08:15,000 --> 00:08:18,000
387
+ If you need to group risks by probabilities.
388
+
389
+ 98
390
+ 00:08:18,000 --> 00:08:20,000
391
+ You can also ask what to do.
392
+
393
+ 99
394
+ 00:08:20,000 --> 00:08:23,000
395
+ So believe me, result will be correct.
396
+
397
+ 100
398
+ 00:08:24,000 --> 00:08:30,000
399
+ And instead of this, imagine that you want to identify responsible team members who are in charge of
400
+
401
+ 101
402
+ 00:08:30,000 --> 00:08:33,000
403
+ risks that are in backlog state.
404
+
405
+ 102
406
+ 00:08:33,000 --> 00:08:39,000
407
+ I just want to know names of these heroes and team members in order to follow up with them and ask them
408
+
409
+ 103
410
+ 00:08:39,000 --> 00:08:45,000
411
+ to process risks as soon as possible and ask this question to my board.
412
+
413
+ 104
414
+ 00:08:45,000 --> 00:08:52,000
415
+ And it replies me that Andre Petaja is assigned to two risks that are in the backlog state now.
416
+
417
+ 105
418
+ 00:08:52,000 --> 00:08:56,000
419
+ Now I know the name with whom I need to follow up.
420
+
421
+ 106
422
+ 00:08:56,000 --> 00:09:01,000
423
+ I can tag the risk owner here or configure cron job with reminder.
424
+
425
+ 107
426
+ 00:09:02,000 --> 00:09:09,000
427
+ For example, each morning responsible people are attacked in case they have risks that are still not
428
+
429
+ 108
430
+ 00:09:09,000 --> 00:09:10,000
431
+ processed.
432
+
433
+ 109
434
+ 00:09:10,000 --> 00:09:17,000
435
+ This would be ideal for big programs and it will help to boost the communication inside the team significantly.
436
+
437
+ 110
438
+ 00:09:18,000 --> 00:09:22,000
439
+ Any team member, even without opening a Jira, can ask a follow up questions.
440
+
441
+ 111
442
+ 00:09:22,000 --> 00:09:29,000
443
+ Like, for example, we can request additional details about these two risks in order to remember what
444
+
445
+ 112
446
+ 00:09:29,000 --> 00:09:36,000
447
+ are they about and what provides me with only necessary information In order I can get better context
448
+
449
+ 113
450
+ 00:09:36,000 --> 00:09:37,000
451
+ of the risks.
452
+
453
+ 114
454
+ 00:09:37,000 --> 00:09:43,000
455
+ In response, I can find information about assignee, risk, description, impact and probability.
456
+
457
+ 115
458
+ 00:09:44,000 --> 00:09:51,000
459
+ GPT also knows that each of these risks has its own mitigation plan and response strategies.
460
+
461
+ 116
462
+ 00:09:51,000 --> 00:09:56,000
463
+ So let me then clarify these details and ask for additional details.
464
+
465
+ 117
466
+ 00:09:58,000 --> 00:10:03,000
467
+ And this time I see information about mitigation plan and response strategies included.
468
+
469
+ 118
470
+ 00:10:03,000 --> 00:10:10,000
471
+ The interesting thing to remember about is that ChatGPT sometimes generates additional details.
472
+
473
+ 119
474
+ 00:10:10,000 --> 00:10:18,000
475
+ For example, in our specific case response strategy is just a single value from the dropdown.
476
+
477
+ 120
478
+ 00:10:18,000 --> 00:10:22,000
479
+ But instead of writing that response strategy is mitigate.
480
+
481
+ 121
482
+ 00:10:22,000 --> 00:10:30,000
483
+ We can see that additional text is added like in this example, implement measures to mitigate risk
484
+
485
+ 122
486
+ 00:10:30,000 --> 00:10:32,000
487
+ instead of just mitigate.
488
+
489
+ 123
490
+ 00:10:32,000 --> 00:10:39,000
491
+ The main idea is delivered correctly, but be aware that GPT can generate additional wording sometimes.
492
+
493
+ 124
494
+ 00:10:39,000 --> 00:10:46,000
495
+ In the previous video I already showed you how we can create Jira issues using chat interface.
496
+
497
+ 125
498
+ 00:10:46,000 --> 00:10:48,000
499
+ The same things may be applied here.
500
+
501
+ 126
502
+ 00:10:48,000 --> 00:10:51,000
503
+ We can use our bot together with a chat.
504
+
505
+ 127
506
+ 00:10:51,000 --> 00:10:54,000
507
+ GPT capabilities to generate risk Description.
508
+
509
+ 128
510
+ 00:10:54,000 --> 00:11:01,000
511
+ Ask GPT to suggest US mitigation plan and put this data directly into the ticket.
512
+
513
+ 129
514
+ 00:11:01,000 --> 00:11:05,000
515
+ I just don't see the reason to demo all seamless scenarios.
516
+
517
+ 130
518
+ 00:11:05,000 --> 00:11:10,000
519
+ The main thing that I wanted to show you in this video is that you are not bound to the default types
520
+
521
+ 131
522
+ 00:11:10,000 --> 00:11:11,000
523
+ in Jira.
524
+
525
+ 132
526
+ 00:11:11,000 --> 00:11:18,000
527
+ You can customize your bot and take advantage of ChatGPT capabilities to build any customized business
528
+
529
+ 133
530
+ 00:11:18,000 --> 00:11:20,000
531
+ logic or business flow that you need.
532
+
533
+ 134
534
+ 00:11:21,000 --> 00:11:22,000
535
+ That's all for this video.
536
+
537
+ 135
538
+ 00:11:23,000 --> 00:11:29,000
539
+ In case you are interested in the topic, check video description and feel free to ask your questions
540
+
541
+ 136
542
+ 00:11:29,000 --> 00:11:30,000
543
+ in comments to the video.
544
+
545
+ 137
546
+ 00:11:31,000 --> 00:11:33,000
547
+ I hope you enjoyed the video.
548
+
549
+ 138
550
+ 00:11:33,000 --> 00:11:39,000
551
+ Put your thumbs up, leave the comments and follow the channel to not miss other interesting videos.
552
+
553
+ 139
554
+ 00:11:39,000 --> 00:11:40,000
555
+ Have a great day.
556
+
557
+ 140
558
+ 00:11:40,000 --> 00:11:41,000
559
+ Bye.
560
+
101 - Manage a Scrum Team with ChatGPT/001 Risk-management-Source-code-of-examples-from-the-lesson-commit-with-changes-.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/commit/3110d2ed017c5c6ab196916359cb8c3983f063b5
101 - Manage a Scrum Team with ChatGPT/001 Sprint-Planning-Source-code-of-examples-from-the-lesson-commit-with-changes-.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/commit/3f3e698451ac043734f0b0b56974a49385c9865d
101 - Manage a Scrum Team with ChatGPT/external-links.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+
2
+ 001 Average-velocity-calculation-Source-code-of-examples-from-the-lesson-commit-with-changes-
3
+ https://github.com/AndriiPiatakha/openai-learnit/commit/e4266b6cc3cb9c1021bd8810471fd6fa7c21ca64
4
+
5
+ 001 Sprint-Planning-Source-code-of-examples-from-the-lesson-commit-with-changes-
6
+ https://github.com/AndriiPiatakha/openai-learnit/commit/3f3e698451ac043734f0b0b56974a49385c9865d
7
+
8
+ 001 Risk-management-Source-code-of-examples-from-the-lesson-commit-with-changes-
9
+ https://github.com/AndriiPiatakha/openai-learnit/commit/3110d2ed017c5c6ab196916359cb8c3983f063b5
102 - DALL-E - Text to image AI Model by OpenAI/001 API-Reference-for-DALL-E-Model.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://platform.openai.com/docs/api-reference/images
102 - DALL-E - Text to image AI Model by OpenAI/001 DALL-E Model & API Overview With Examples in Postman_en.srt ADDED
@@ -0,0 +1,1676 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1
2
+ 00:00:05,000 --> 00:00:06,000
3
+ Hello, team.
4
+
5
+ 2
6
+ 00:00:06,000 --> 00:00:12,000
7
+ In this video we are going to learn how to work with the API and understand what it is.
8
+
9
+ 3
10
+ 00:00:12,000 --> 00:00:16,000
11
+ We are going to start this lesson from the general overview of the model.
12
+
13
+ 4
14
+ 00:00:16,000 --> 00:00:21,000
15
+ Then I will explain you what a decoder and encoder are.
16
+
17
+ 5
18
+ 00:00:21,000 --> 00:00:23,000
19
+ In transforming models.
20
+
21
+ 6
22
+ 00:00:23,000 --> 00:00:27,000
23
+ We will review business use cases and limitations of the model.
24
+
25
+ 7
26
+ 00:00:27,000 --> 00:00:34,000
27
+ I'm going to show you the API documentation and we will focus attention on the most important things.
28
+
29
+ 8
30
+ 00:00:34,000 --> 00:00:40,000
31
+ Then we will learn how to use API and real examples I will share with you Postman collections that I
32
+
33
+ 9
34
+ 00:00:40,000 --> 00:00:45,000
35
+ prepared specially for this lesson and we will work with the API.
36
+
37
+ 10
38
+ 00:00:45,000 --> 00:00:48,000
39
+ We will generate images based on a text prompt.
40
+
41
+ 11
42
+ 00:00:48,000 --> 00:00:53,000
43
+ Will edit images based on a text prompt and will create variations of an existing image.
44
+
45
+ 12
46
+ 00:00:53,000 --> 00:00:55,000
47
+ Let's start our lesson.
48
+
49
+ 13
50
+ 00:00:56,000 --> 00:00:59,000
51
+ Let's start from understanding of what Dali is.
52
+
53
+ 14
54
+ 00:00:59,000 --> 00:01:07,000
55
+ Dali is a neural network model developed by OpenAI for generating images from textual descriptions.
56
+
57
+ 15
58
+ 00:01:07,000 --> 00:01:15,000
59
+ This model is trained on a dataset of text image pairs and has the capability to generate a wide range
60
+
61
+ 16
62
+ 00:01:15,000 --> 00:01:18,000
63
+ of images based on natural language descriptions.
64
+
65
+ 17
66
+ 00:01:19,000 --> 00:01:27,000
67
+ Dali is a decoder only transformer models that takes both text and image data as input and models them
68
+
69
+ 18
70
+ 00:01:27,000 --> 00:01:32,000
71
+ autoregressively to generate images based on a textual descriptions.
72
+
73
+ 19
74
+ 00:01:33,000 --> 00:01:39,000
75
+ The model's architecture and training procedure are detailed in OpenAI research paper.
76
+
77
+ 20
78
+ 00:01:40,000 --> 00:01:46,000
79
+ In a minute, I'm going to explain you what decoder and encoder concepts are in transforming models.
80
+
81
+ 21
82
+ 00:01:46,000 --> 00:01:53,000
83
+ The capabilities of the opened up possibilities for various applications, including content generation,
84
+
85
+ 22
86
+ 00:01:53,000 --> 00:02:01,000
87
+ design, art and potentially many more areas where the translation of textual ideas into visual representations
88
+
89
+ 23
90
+ 00:02:01,000 --> 00:02:02,000
91
+ is required.
92
+
93
+ 24
94
+ 00:02:03,000 --> 00:02:08,000
95
+ Let's understand what a decoder and encoder are in transforming models.
96
+
97
+ 25
98
+ 00:02:08,000 --> 00:02:11,000
99
+ It will be useful for your general education.
100
+
101
+ 26
102
+ 00:02:11,000 --> 00:02:16,000
103
+ Also, it will help you to understand architectures of other transforming models.
104
+
105
+ 27
106
+ 00:02:16,000 --> 00:02:20,000
107
+ I said that Delhi is a decoder only transformer model.
108
+
109
+ 28
110
+ 00:02:20,000 --> 00:02:27,000
111
+ It means that the model consists only of the decoder part of the transformer architecture without the
112
+
113
+ 29
114
+ 00:02:27,000 --> 00:02:34,000
115
+ encoder in the context of transformer models, the encoder is typically responsible for processing input
116
+
117
+ 30
118
+ 00:02:34,000 --> 00:02:40,000
119
+ data, while the decoder generates output data based on that processed input.
120
+
121
+ 31
122
+ 00:02:40,000 --> 00:02:46,000
123
+ Here is breakdown of the roles of the encoder and decoder in a typical transformer architecture.
124
+
125
+ 32
126
+ 00:02:46,000 --> 00:02:53,000
127
+ The encoder is responsible for processing and encoding the input data in natural language processing
128
+
129
+ 33
130
+ 00:02:53,000 --> 00:02:53,000
131
+ tasks.
132
+
133
+ 34
134
+ 00:02:53,000 --> 00:02:57,000
135
+ The input data is usually a sequence of words or tokens.
136
+
137
+ 35
138
+ 00:02:58,000 --> 00:03:05,000
139
+ The encoder processes this input sequence and generates a set of hidden representations or embeddings
140
+
141
+ 36
142
+ 00:03:05,000 --> 00:03:06,000
143
+ for each token.
144
+
145
+ 37
146
+ 00:03:06,000 --> 00:03:13,000
147
+ These representations capture contextual information about each token in relation to the others in the
148
+
149
+ 38
150
+ 00:03:13,000 --> 00:03:14,000
151
+ sequence.
152
+
153
+ 39
154
+ 00:03:14,000 --> 00:03:18,000
155
+ The encoder's output is then used as an input to the decoder.
156
+
157
+ 40
158
+ 00:03:19,000 --> 00:03:25,000
159
+ The decoder takes the encoded information from the encoder and generates the output sequence.
160
+
161
+ 41
162
+ 00:03:25,000 --> 00:03:31,000
163
+ In the case of text generation, this output sequence could be a sequence of words or tokens.
164
+
165
+ 42
166
+ 00:03:31,000 --> 00:03:38,000
167
+ The decoder processes the encoded information autoregressively generating one token at a time while
168
+
169
+ 43
170
+ 00:03:38,000 --> 00:03:40,000
171
+ considering the previously generated tokens.
172
+
173
+ 44
174
+ 00:03:41,000 --> 00:03:46,000
175
+ This autoregressive process continues until the desired output sequence is generated.
176
+
177
+ 45
178
+ 00:03:47,000 --> 00:03:53,000
179
+ In the context of the and similar models, we generate images from textual descriptions.
180
+
181
+ 46
182
+ 00:03:53,000 --> 00:04:01,000
183
+ The decoder only architecture means that the model takes the textual description as an input and directly
184
+
185
+ 47
186
+ 00:04:01,000 --> 00:04:06,000
187
+ generates a corresponding image without needing an encoder to process the input text.
188
+
189
+ 48
190
+ 00:04:07,000 --> 00:04:13,000
191
+ The model's decoder is responsible for both understanding the text and generating the image based on
192
+
193
+ 49
194
+ 00:04:13,000 --> 00:04:14,000
195
+ the understanding.
196
+
197
+ 50
198
+ 00:04:14,000 --> 00:04:21,000
199
+ This architecture simplifies the model structure and makes it more suitable for tasks where the primary
200
+
201
+ 51
202
+ 00:04:21,000 --> 00:04:23,000
203
+ goal is to generate content.
204
+
205
+ 52
206
+ 00:04:23,000 --> 00:04:28,000
207
+ In this case, images based on textual input descriptions.
208
+
209
+ 53
210
+ 00:04:28,000 --> 00:04:35,000
211
+ It eliminates the need for an encoder that might be used in tasks like text understanding or text to
212
+
213
+ 54
214
+ 00:04:35,000 --> 00:04:36,000
215
+ text translation.
216
+
217
+ 55
218
+ 00:04:37,000 --> 00:04:39,000
219
+ To understand the better.
220
+
221
+ 56
222
+ 00:04:39,000 --> 00:04:41,000
223
+ Let's learn its key features.
224
+
225
+ 57
226
+ 00:04:42,000 --> 00:04:50,000
227
+ The Li is a remarkable neural network model developed by OpenAI that combines natural language understanding
228
+
229
+ 58
230
+ 00:04:50,000 --> 00:04:52,000
231
+ with image generation.
232
+
233
+ 59
234
+ 00:04:52,000 --> 00:04:58,000
235
+ It is designed to generate images from textual descriptions and exhibits, several key features and
236
+
237
+ 60
238
+ 00:04:58,000 --> 00:04:59,000
239
+ capabilities.
240
+
241
+ 61
242
+ 00:05:00,000 --> 00:05:01,000
243
+ Let's review them.
244
+
245
+ 62
246
+ 00:05:02,000 --> 00:05:03,000
247
+ Text to image generation.
248
+
249
+ 63
250
+ 00:05:03,000 --> 00:05:10,000
251
+ The Li can generate images from textual prompts allowing users to describe a concept or scene in natural
252
+
253
+ 64
254
+ 00:05:10,000 --> 00:05:14,000
255
+ language, and the model produces corresponding images.
256
+
257
+ 65
258
+ 00:05:14,000 --> 00:05:16,000
259
+ Creative Imagery.
260
+
261
+ 66
262
+ 00:05:16,000 --> 00:05:24,000
263
+ One of its standout features is its ability to generate highly creative images based on textual descriptions,
264
+
265
+ 67
266
+ 00:05:24,000 --> 00:05:29,000
267
+ often combining concepts in unexpected and novel ways.
268
+
269
+ 68
270
+ 00:05:30,000 --> 00:05:32,000
271
+ Large model size.
272
+
273
+ 69
274
+ 00:05:32,000 --> 00:05:39,000
275
+ The Li is a substantial model with 12 billion parameters, making it powerful and capable model for
276
+
277
+ 70
278
+ 00:05:39,000 --> 00:05:42,000
279
+ generating high quality images.
280
+
281
+ 71
282
+ 00:05:43,000 --> 00:05:44,000
283
+ Diverse capabilities.
284
+
285
+ 72
286
+ 00:05:45,000 --> 00:05:52,000
287
+ It has a diverse set of capabilities, including creating anthropomorphized versions of animals and
288
+
289
+ 73
290
+ 00:05:52,000 --> 00:06:00,000
291
+ objects, combining unrelated concepts in plausible ways, rendering text and applying transformations
292
+
293
+ 74
294
+ 00:06:00,000 --> 00:06:02,000
295
+ to existing images.
296
+
297
+ 75
298
+ 00:06:03,000 --> 00:06:04,000
299
+ A resolution.
300
+
301
+ 76
302
+ 00:06:04,000 --> 00:06:10,000
303
+ The can generate images with high resolution up to 1024 by 1024 pixels.
304
+
305
+ 77
306
+ 00:06:10,000 --> 00:06:11,000
307
+ Fine control.
308
+
309
+ 78
310
+ 00:06:12,000 --> 00:06:18,000
311
+ The model offers fine control over attributes and positions of objects within the generated images,
312
+
313
+ 79
314
+ 00:06:18,000 --> 00:06:23,000
315
+ allowing for specific adjustments such as changing colors, sizes and relative positions.
316
+
317
+ 80
318
+ 00:06:24,000 --> 00:06:31,000
319
+ Viewpoint and 3D rendering the leak and control the viewpoint of a scene and render scenes in different
320
+
321
+ 81
322
+ 00:06:31,000 --> 00:06:37,000
323
+ 3D styles, adding a sense of depth and perspective to the generated images.
324
+
325
+ 82
326
+ 00:06:38,000 --> 00:06:40,000
327
+ Variable binding.
328
+
329
+ 83
330
+ 00:06:40,000 --> 00:06:47,000
331
+ It can interpret and correctly compose complex textual descriptions involving multiple objects, their
332
+
333
+ 84
334
+ 00:06:47,000 --> 00:06:50,000
335
+ attributes and spatial relationships.
336
+
337
+ 85
338
+ 00:06:51,000 --> 00:06:57,000
339
+ Combining unrelated concepts, the league can creatively combine unrelated ideas to synthesize unique
340
+
341
+ 86
342
+ 00:06:57,000 --> 00:07:03,000
343
+ objects or scenes demonstrating its ability to generate imaginative content.
344
+
345
+ 87
346
+ 00:07:04,000 --> 00:07:06,000
347
+ Geographic and temporal knowledge.
348
+
349
+ 88
350
+ 00:07:06,000 --> 00:07:13,000
351
+ The model has learned about geographic facts, landmarks, neighborhoods and concepts that vary over
352
+
353
+ 89
354
+ 00:07:13,000 --> 00:07:18,000
355
+ time, making it versatile for generating images related to different locations and areas.
356
+
357
+ 90
358
+ 00:07:19,000 --> 00:07:25,000
359
+ The Li represents a significant progress in AI's ability to bridge the gap between natural language
360
+
361
+ 91
362
+ 00:07:25,000 --> 00:07:28,000
363
+ understanding and image generation.
364
+
365
+ 92
366
+ 00:07:29,000 --> 00:07:30,000
367
+ I believe that you may be wondered.
368
+
369
+ 93
370
+ 00:07:30,000 --> 00:07:32,000
371
+ Okay, the lead generates pictures.
372
+
373
+ 94
374
+ 00:07:32,000 --> 00:07:33,000
375
+ Okay.
376
+
377
+ 95
378
+ 00:07:33,000 --> 00:07:35,000
379
+ It converts text to image.
380
+
381
+ 96
382
+ 00:07:35,000 --> 00:07:37,000
383
+ But why do I need it?
384
+
385
+ 97
386
+ 00:07:37,000 --> 00:07:44,000
387
+ If you ask this question, let's review some common business cases and let's try to understand when
388
+
389
+ 98
390
+ 00:07:44,000 --> 00:07:49,000
391
+ it is applicable to use Delhi, in which cases and applications.
392
+
393
+ 99
394
+ 00:07:49,000 --> 00:07:55,000
395
+ The cases that we are going to review will be mostly declarative and will describe the cases where text
396
+
397
+ 100
398
+ 00:07:55,000 --> 00:08:01,000
399
+ to image models might be used in general and how the model is promoted on the market.
400
+
401
+ 101
402
+ 00:08:01,000 --> 00:08:09,000
403
+ I need to make this note because based on today, Delhi still has some challenges with being suitable
404
+
405
+ 102
406
+ 00:08:09,000 --> 00:08:14,000
407
+ to most of business cases it's supposed to be used for and during.
408
+
409
+ 103
410
+ 00:08:14,000 --> 00:08:21,000
411
+ The lesson will try to understand whether Delhi really can handle cases on the expected level of quality
412
+
413
+ 104
414
+ 00:08:21,000 --> 00:08:25,000
415
+ and quality is a key when we talk about transforming models.
416
+
417
+ 105
418
+ 00:08:26,000 --> 00:08:30,000
419
+ I tried to brainstorm and group cases by categories.
420
+
421
+ 106
422
+ 00:08:30,000 --> 00:08:33,000
423
+ The first category content generation.
424
+
425
+ 107
426
+ 00:08:33,000 --> 00:08:41,000
427
+ It includes graphic design, advertising, marketing materials, for example, create custom graphics,
428
+
429
+ 108
430
+ 00:08:41,000 --> 00:08:45,000
431
+ logos or illustrations based on textual description.
432
+
433
+ 109
434
+ 00:08:45,000 --> 00:08:50,000
435
+ Or generate eye catching visuals and advertisements with the help of the Lee.
436
+
437
+ 110
438
+ 00:08:51,000 --> 00:08:55,000
439
+ Create visuals for brochures, posters and social media posts.
440
+
441
+ 111
442
+ 00:08:55,000 --> 00:08:58,000
443
+ By the way, you can use the leave for social media content generation.
444
+
445
+ 112
446
+ 00:08:58,000 --> 00:09:03,000
447
+ It is really helpful tool in case you need creative visuals.
448
+
449
+ 113
450
+ 00:09:03,000 --> 00:09:04,000
451
+ Product design.
452
+
453
+ 114
454
+ 00:09:05,000 --> 00:09:12,000
455
+ You can use the li for interior designing, fashion, designing, industrial design, like, for example,
456
+
457
+ 115
458
+ 00:09:12,000 --> 00:09:16,000
459
+ to generate concept art for product prototypes.
460
+
461
+ 116
462
+ 00:09:16,000 --> 00:09:18,000
463
+ Entertainment and media.
464
+
465
+ 117
466
+ 00:09:18,000 --> 00:09:20,000
467
+ Video games.
468
+
469
+ 118
470
+ 00:09:20,000 --> 00:09:24,000
471
+ Generate game assets, characters and scenes from narrative descriptions.
472
+
473
+ 119
474
+ 00:09:25,000 --> 00:09:26,000
475
+ Film and animation.
476
+
477
+ 120
478
+ 00:09:27,000 --> 00:09:31,000
479
+ Create storyboards and concept art for movies and animations.
480
+
481
+ 121
482
+ 00:09:31,000 --> 00:09:33,000
483
+ Book Covers.
484
+
485
+ 122
486
+ 00:09:33,000 --> 00:09:34,000
487
+ Design Book Cover.
488
+
489
+ 123
490
+ 00:09:34,000 --> 00:09:37,000
491
+ Illustrations based on book summaries.
492
+
493
+ 124
494
+ 00:09:38,000 --> 00:09:39,000
495
+ Art and Creativity.
496
+
497
+ 125
498
+ 00:09:39,000 --> 00:09:45,000
499
+ Artists can use the lead to explore creative ideas and generate novel artwork.
500
+
501
+ 126
502
+ 00:09:46,000 --> 00:09:51,000
503
+ Educational resources you can use daily for textbook illustrations.
504
+
505
+ 127
506
+ 00:09:51,000 --> 00:09:54,000
507
+ Interactive learning and PowerPoint presentations.
508
+
509
+ 128
510
+ 00:09:54,000 --> 00:09:55,000
511
+ For example.
512
+
513
+ 129
514
+ 00:09:55,000 --> 00:10:00,000
515
+ If you want, you can use the Li to create visuals for your PowerPoint presentation.
516
+
517
+ 130
518
+ 00:10:00,000 --> 00:10:04,000
519
+ This will help you to stay consistent in style of your visuals.
520
+
521
+ 131
522
+ 00:10:04,000 --> 00:10:12,000
523
+ Or you can even create a web application that helps to generate slides using chat GPT model for text
524
+
525
+ 132
526
+ 00:10:12,000 --> 00:10:15,000
527
+ generation and the Li for image generation.
528
+
529
+ 133
530
+ 00:10:15,000 --> 00:10:16,000
531
+ Think about it.
532
+
533
+ 134
534
+ 00:10:17,000 --> 00:10:19,000
535
+ Storytelling and writing.
536
+
537
+ 135
538
+ 00:10:19,000 --> 00:10:26,000
539
+ You can use the model to generate visual references for scenes and characters in stories, enhance interactive
540
+
541
+ 136
542
+ 00:10:26,000 --> 00:10:28,000
543
+ fiction and games with dynamic visuals.
544
+
545
+ 137
546
+ 00:10:29,000 --> 00:10:37,000
547
+ Concept prototyping product prototypes generate visual representations of product concepts for early
548
+
549
+ 138
550
+ 00:10:37,000 --> 00:10:38,000
551
+ stage prototyping.
552
+
553
+ 139
554
+ 00:10:38,000 --> 00:10:44,000
555
+ Visualize architectural design ideas before construction and lots more.
556
+
557
+ 140
558
+ 00:10:44,000 --> 00:10:51,000
559
+ Basically any task for visualization, you can challenge the lead to help you and to master the lead.
560
+
561
+ 141
562
+ 00:10:51,000 --> 00:10:55,000
563
+ Like a pro, you should know its limitations.
564
+
565
+ 142
566
+ 00:10:55,000 --> 00:11:00,000
567
+ Like all models, the Li has its own challenges and limitations.
568
+
569
+ 143
570
+ 00:11:00,000 --> 00:11:01,000
571
+ What is a.
572
+
573
+ 144
574
+ 00:11:02,000 --> 00:11:04,000
575
+ The first one Data dependency.
576
+
577
+ 145
578
+ 00:11:04,000 --> 00:11:09,000
579
+ The li relies on text image pairs it was trained on.
580
+
581
+ 146
582
+ 00:11:09,000 --> 00:11:16,000
583
+ It may have difficulty generating images for concepts or scenes that were not well represented in its
584
+
585
+ 147
586
+ 00:11:16,000 --> 00:11:17,000
587
+ training data.
588
+
589
+ 148
590
+ 00:11:17,000 --> 00:11:21,000
591
+ You should always remember about this ambiguity.
592
+
593
+ 149
594
+ 00:11:21,000 --> 00:11:28,000
595
+ If a textual description is ambiguous or can be interpreted in multiple ways, the Li might generate
596
+
597
+ 150
598
+ 00:11:28,000 --> 00:11:32,000
599
+ images that align with one interpretation but not another.
600
+
601
+ 151
602
+ 00:11:33,000 --> 00:11:35,000
603
+ Complex descriptions.
604
+
605
+ 152
606
+ 00:11:35,000 --> 00:11:43,000
607
+ While the league can handle complex descriptions, extremely detailed prompts might not bring you satisfactory
608
+
609
+ 153
610
+ 00:11:43,000 --> 00:11:44,000
611
+ results.
612
+
613
+ 154
614
+ 00:11:44,000 --> 00:11:45,000
615
+ Image Realism.
616
+
617
+ 155
618
+ 00:11:46,000 --> 00:11:52,000
619
+ While the league generates creative images, they may not always appear realistic or high quality,
620
+
621
+ 156
622
+ 00:11:52,000 --> 00:11:56,000
623
+ especially for scenes with complex textures and details.
624
+
625
+ 157
626
+ 00:11:56,000 --> 00:11:59,000
627
+ And probably this is one of the key challenges.
628
+
629
+ 158
630
+ 00:11:59,000 --> 00:12:03,000
631
+ You will understand it better when you will start using the league more actively.
632
+
633
+ 159
634
+ 00:12:05,000 --> 00:12:06,000
635
+ Control challenges.
636
+
637
+ 160
638
+ 00:12:06,000 --> 00:12:11,000
639
+ Fine grained control over attributes such as color or position can be challenging.
640
+
641
+ 161
642
+ 00:12:12,000 --> 00:12:16,000
643
+ The model may not always precisely capture user specified details.
644
+
645
+ 162
646
+ 00:12:17,000 --> 00:12:19,000
647
+ Creative interpretations.
648
+
649
+ 163
650
+ 00:12:19,000 --> 00:12:23,000
651
+ Daily creativity can be a double edged sword.
652
+
653
+ 164
654
+ 00:12:23,000 --> 00:12:31,000
655
+ While it can produce novel and imaginative images, it may not always adhere to conventional or expected
656
+
657
+ 165
658
+ 00:12:31,000 --> 00:12:33,000
659
+ interpretations.
660
+
661
+ 166
662
+ 00:12:33,000 --> 00:12:34,000
663
+ Interactivity.
664
+
665
+ 167
666
+ 00:12:34,000 --> 00:12:41,000
667
+ While the leat generates images based on text prompts, it doesn't have the capability for interactive
668
+
669
+ 168
670
+ 00:12:41,000 --> 00:12:46,000
671
+ back and forth conversations like some other AI models by OpenAI.
672
+
673
+ 169
674
+ 00:12:46,000 --> 00:12:50,000
675
+ You can't edit generated image with Dall-e.
676
+
677
+ 170
678
+ 00:12:51,000 --> 00:12:55,000
679
+ You need to submit another prompt and generate a new image.
680
+
681
+ 171
682
+ 00:12:55,000 --> 00:13:02,000
683
+ It's important to be aware of these limitations and use the leave within its intended scope and with
684
+
685
+ 172
686
+ 00:13:02,000 --> 00:13:03,000
687
+ a critical eye.
688
+
689
+ 173
690
+ 00:13:03,000 --> 00:13:09,000
691
+ OpenAI is the organization behind Dall-e continues to research and improve AI models to address these
692
+
693
+ 174
694
+ 00:13:09,000 --> 00:13:16,000
695
+ challenges, but users should exercise caution and apply human judgment when utilizing AI generated
696
+
697
+ 175
698
+ 00:13:16,000 --> 00:13:17,000
699
+ content.
700
+
701
+ 176
702
+ 00:13:18,000 --> 00:13:24,000
703
+ I believe that we have learned enough Syrian we can proceed with learning details and practical examples
704
+
705
+ 177
706
+ 00:13:24,000 --> 00:13:26,000
707
+ in the attachments to the video.
708
+
709
+ 178
710
+ 00:13:26,000 --> 00:13:29,000
711
+ You will be able to find link to the API reference.
712
+
713
+ 179
714
+ 00:13:29,000 --> 00:13:32,000
715
+ Let me make a brief overview of an API.
716
+
717
+ 180
718
+ 00:13:33,000 --> 00:13:38,000
719
+ The first important thing that I would like to mention is about three key methods for interacting with
720
+
721
+ 181
722
+ 00:13:38,000 --> 00:13:39,000
723
+ the Li API.
724
+
725
+ 182
726
+ 00:13:39,000 --> 00:13:44,000
727
+ They are creating images from scratch based on a text prompt.
728
+
729
+ 183
730
+ 00:13:44,000 --> 00:13:48,000
731
+ Creating edits of an existing image based on a new text prompt.
732
+
733
+ 184
734
+ 00:13:49,000 --> 00:13:51,000
735
+ Creating variations of an existing image.
736
+
737
+ 185
738
+ 00:13:52,000 --> 00:13:56,000
739
+ And here you can find three end points in the API reference.
740
+
741
+ 186
742
+ 00:13:56,000 --> 00:13:58,000
743
+ Let's start from the simple one.
744
+
745
+ 187
746
+ 00:13:58,000 --> 00:14:00,000
747
+ Image creation.
748
+
749
+ 188
750
+ 00:14:00,000 --> 00:14:05,000
751
+ Basically, you just need to send the prompt with a post message to the specific resource.
752
+
753
+ 189
754
+ 00:14:05,000 --> 00:14:11,000
755
+ Also, I prepared for you postman collection that you can just import into your postman and execute
756
+
757
+ 190
758
+ 00:14:11,000 --> 00:14:12,000
759
+ queries.
760
+
761
+ 191
762
+ 00:14:12,000 --> 00:14:18,000
763
+ You can either import my postman collection or create a new request from scratch.
764
+
765
+ 192
766
+ 00:14:18,000 --> 00:14:22,000
767
+ It doesn't matter because we don't have super complex requests here.
768
+
769
+ 193
770
+ 00:14:23,000 --> 00:14:29,000
771
+ After importing postman collection, don't forget to add your OpenAI API key.
772
+
773
+ 194
774
+ 00:14:29,000 --> 00:14:32,000
775
+ I use variable for API key.
776
+
777
+ 195
778
+ 00:14:32,000 --> 00:14:35,000
779
+ You have to add it into your authorization header.
780
+
781
+ 196
782
+ 00:14:36,000 --> 00:14:43,000
783
+ Content type is application Json because OpenAI API will reply us with a generated URL.
784
+
785
+ 197
786
+ 00:14:44,000 --> 00:14:46,000
787
+ Let's go to the body now.
788
+
789
+ 198
790
+ 00:14:46,000 --> 00:14:49,000
791
+ There is only one required attribute that is prompt.
792
+
793
+ 199
794
+ 00:14:50,000 --> 00:14:54,000
795
+ You need to describe what you want to see on the generated picture.
796
+
797
+ 200
798
+ 00:14:54,000 --> 00:14:56,000
799
+ Let's try something creative.
800
+
801
+ 201
802
+ 00:14:56,000 --> 00:15:03,000
803
+ For example, an astronaut rides a motorcycle on Mars in photorealistic style.
804
+
805
+ 202
806
+ 00:15:03,000 --> 00:15:09,000
807
+ As you already understood, you can specify details in the prompt like colors, position of elements
808
+
809
+ 203
810
+ 00:15:09,000 --> 00:15:12,000
811
+ or even style like I did now.
812
+
813
+ 204
814
+ 00:15:13,000 --> 00:15:16,000
815
+ And we'll see how the imagines this.
816
+
817
+ 205
818
+ 00:15:16,000 --> 00:15:21,000
819
+ Another attribute that is called n, it is the number of items to be generated.
820
+
821
+ 206
822
+ 00:15:21,000 --> 00:15:24,000
823
+ It can be between 1 and 10.
824
+
825
+ 207
826
+ 00:15:24,000 --> 00:15:31,000
827
+ By default, it is equal to one, but decided to keep it here and request just for the learning purposes.
828
+
829
+ 208
830
+ 00:15:31,000 --> 00:15:33,000
831
+ The next attribute is size.
832
+
833
+ 209
834
+ 00:15:34,000 --> 00:15:45,000
835
+ I selected 1024 by 1024 pixels, which is default value, but you can also set here to 156 by 256 or
836
+
837
+ 210
838
+ 00:15:45,000 --> 00:15:48,000
839
+ 512 by 512.
840
+
841
+ 211
842
+ 00:15:49,000 --> 00:15:55,000
843
+ This size will impact costs per image in the model you pay per image generated.
844
+
845
+ 212
846
+ 00:15:56,000 --> 00:16:01,000
847
+ As always, you can check the most relevant and up to date pricing on the pricing page.
848
+
849
+ 213
850
+ 00:16:01,000 --> 00:16:06,000
851
+ As you can see, pricing will depend on the image size that you want to generate.
852
+
853
+ 214
854
+ 00:16:06,000 --> 00:16:09,000
855
+ So I configure it size.
856
+
857
+ 215
858
+ 00:16:09,000 --> 00:16:16,000
859
+ There is also user attributes that you can use as a unique identifier representing your end user, which
860
+
861
+ 216
862
+ 00:16:16,000 --> 00:16:20,000
863
+ can help OpenAI to monitor and detect abuse.
864
+
865
+ 217
866
+ 00:16:20,000 --> 00:16:25,000
867
+ In our example, I would just use an email as a fake unique identifier.
868
+
869
+ 218
870
+ 00:16:26,000 --> 00:16:32,000
871
+ Do not forget that this attribute is optional, and if you don't need it, you can just omit it.
872
+
873
+ 219
874
+ 00:16:33,000 --> 00:16:36,000
875
+ And also there is an attribute that is called response format.
876
+
877
+ 220
878
+ 00:16:36,000 --> 00:16:44,000
879
+ It can be just one out of two possible options is a URL or b64 Json.
880
+
881
+ 221
882
+ 00:16:45,000 --> 00:16:51,000
883
+ If you use b64 Json, the image is encoded in b64 json.
884
+
885
+ 222
886
+ 00:16:51,000 --> 00:16:53,000
887
+ Not a normal image file type.
888
+
889
+ 223
890
+ 00:16:53,000 --> 00:16:57,000
891
+ By default it is URL and I'm going to show you how it works.
892
+
893
+ 224
894
+ 00:16:58,000 --> 00:17:05,000
895
+ Let me vividly leave this attribute here, but as I said, it is optional and you can rely on default
896
+
897
+ 225
898
+ 00:17:05,000 --> 00:17:06,000
899
+ values.
900
+
901
+ 226
902
+ 00:17:06,000 --> 00:17:10,000
903
+ Let's send this query now and see what we would receive.
904
+
905
+ 227
906
+ 00:17:11,000 --> 00:17:19,000
907
+ We received an URL, we can copy this URL and paste it into the browser and see what we received.
908
+
909
+ 228
910
+ 00:17:19,000 --> 00:17:25,000
911
+ Once you reviewed the image in the browser, you can save it to the local computer.
912
+
913
+ 229
914
+ 00:17:25,000 --> 00:17:29,000
915
+ As you can see, images may be of different quality.
916
+
917
+ 230
918
+ 00:17:29,000 --> 00:17:32,000
919
+ Some lines may be not perfect.
920
+
921
+ 231
922
+ 00:17:32,000 --> 00:17:38,000
923
+ That's why sometimes you can just change the number of images to generate and just try one more time.
924
+
925
+ 232
926
+ 00:17:39,000 --> 00:17:43,000
927
+ For example, you can ask the lead to generate ten images per prompt.
928
+
929
+ 233
930
+ 00:17:43,000 --> 00:17:50,000
931
+ In this case, you are going to have higher chances that at least some options will look as you expected.
932
+
933
+ 234
934
+ 00:17:51,000 --> 00:17:52,000
935
+ Attention.
936
+
937
+ 235
938
+ 00:17:52,000 --> 00:17:57,000
939
+ I recommend you to save images just in case, because they can be lost easily.
940
+
941
+ 236
942
+ 00:17:57,000 --> 00:18:01,000
943
+ The link is available only for a limited amount of time.
944
+
945
+ 237
946
+ 00:18:01,000 --> 00:18:07,000
947
+ Some time passed when you use the link to open image, the link will be broken.
948
+
949
+ 238
950
+ 00:18:07,000 --> 00:18:14,000
951
+ I believe that is done on purpose because in case OpenAI would store all possible generated images,
952
+
953
+ 239
954
+ 00:18:14,000 --> 00:18:19,000
955
+ it wouldn't be enough space to support image generation in the whole world on daily basis.
956
+
957
+ 240
958
+ 00:18:20,000 --> 00:18:22,000
959
+ That's how easy you can generate images.
960
+
961
+ 241
962
+ 00:18:23,000 --> 00:18:28,000
963
+ Let's review the second method of interaction with the OpenAI API.
964
+
965
+ 242
966
+ 00:18:29,000 --> 00:18:33,000
967
+ Creating edits of an existing image based on a new text prompt.
968
+
969
+ 243
970
+ 00:18:34,000 --> 00:18:35,000
971
+ Before we review.
972
+
973
+ 244
974
+ 00:18:36,000 --> 00:18:38,000
975
+ Let me explain you how edits work.
976
+
977
+ 245
978
+ 00:18:38,000 --> 00:18:45,000
979
+ The image editing endpoint offers the capability to enhance and modify an image through the inclusion
980
+
981
+ 246
982
+ 00:18:45,000 --> 00:18:48,000
983
+ of a mask during the upload process.
984
+
985
+ 247
986
+ 00:18:48,000 --> 00:18:56,000
987
+ Transparent regions within the mask serve as guidelines for where adjustments should be made to the
988
+
989
+ 248
990
+ 00:18:56,000 --> 00:18:56,000
991
+ image.
992
+
993
+ 249
994
+ 00:18:57,000 --> 00:19:04,000
995
+ Additionally, it's important to note that the prompt should describe the whole new image rather than
996
+
997
+ 250
998
+ 00:19:04,000 --> 00:19:07,000
999
+ focusing solely on the erased spaces.
1000
+
1001
+ 251
1002
+ 00:19:08,000 --> 00:19:12,000
1003
+ On the slide you can see example from OpenAI Dall-e documentation.
1004
+
1005
+ 252
1006
+ 00:19:12,000 --> 00:19:14,000
1007
+ Pay attention to the original image.
1008
+
1009
+ 253
1010
+ 00:19:15,000 --> 00:19:18,000
1011
+ Then create mask by saying mask.
1012
+
1013
+ 254
1014
+ 00:19:18,000 --> 00:19:22,000
1015
+ I mean creation of transparent areas on the same image.
1016
+
1017
+ 255
1018
+ 00:19:22,000 --> 00:19:27,000
1019
+ You can do this in Photoshop, for example, or in any other image editor.
1020
+
1021
+ 256
1022
+ 00:19:28,000 --> 00:19:38,000
1023
+ PNG file format allows you to save transparency on the image and then describe in the prompt is a whole
1024
+
1025
+ 257
1026
+ 00:19:38,000 --> 00:19:44,000
1027
+ picture, a sunlit indoor lounge area with a pool containing a flamingo.
1028
+
1029
+ 258
1030
+ 00:19:44,000 --> 00:19:50,000
1031
+ As you can see, Dall-e gave us back edited image taken into consideration.
1032
+
1033
+ 259
1034
+ 00:19:50,000 --> 00:19:52,000
1035
+ Our prompt is in the school.
1036
+
1037
+ 260
1038
+ 00:19:53,000 --> 00:19:59,000
1039
+ Both the uploaded image and the related mosque must adhere to specific criteria.
1040
+
1041
+ 261
1042
+ 00:19:59,000 --> 00:20:06,000
1043
+ They should be square PNG images with file sizes under four megabytes and their dimensions must match
1044
+
1045
+ 262
1046
+ 00:20:06,000 --> 00:20:07,000
1047
+ each other.
1048
+
1049
+ 263
1050
+ 00:20:08,000 --> 00:20:15,000
1051
+ It's worth highlighting that the non transparent sections of the mosque do not play a role in generating
1052
+
1053
+ 264
1054
+ 00:20:15,000 --> 00:20:16,000
1055
+ the output.
1056
+
1057
+ 265
1058
+ 00:20:16,000 --> 00:20:22,000
1059
+ As a result, there is no strict requirement for them to align precisely with the original image.
1060
+
1061
+ 266
1062
+ 00:20:22,000 --> 00:20:25,000
1063
+ Unlike the example provided on the slide.
1064
+
1065
+ 267
1066
+ 00:20:26,000 --> 00:20:32,000
1067
+ Now let's take a look at demo and learn how this works in practice, especially for you.
1068
+
1069
+ 268
1070
+ 00:20:32,000 --> 00:20:36,000
1071
+ I prepared a set of original images and related images with mask.
1072
+
1073
+ 269
1074
+ 00:20:36,000 --> 00:20:43,000
1075
+ This can save your time during the preparing examples to test an API, you can find images for this
1076
+
1077
+ 270
1078
+ 00:20:43,000 --> 00:20:47,000
1079
+ example in attachments to the lesson in the postman.
1080
+
1081
+ 271
1082
+ 00:20:47,000 --> 00:20:49,000
1083
+ You can find template requests for edits.
1084
+
1085
+ 272
1086
+ 00:20:50,000 --> 00:20:57,000
1087
+ There are few attributes here that you can configure and only two out of all these attributes are required,
1088
+
1089
+ 273
1090
+ 00:20:57,000 --> 00:21:00,000
1091
+ so only image and prompt attributes are required.
1092
+
1093
+ 274
1094
+ 00:21:01,000 --> 00:21:04,000
1095
+ Image attribute is an object a file.
1096
+
1097
+ 275
1098
+ 00:21:04,000 --> 00:21:10,000
1099
+ The image to edit must be a valid PNG file less than four megabytes and square.
1100
+
1101
+ 276
1102
+ 00:21:11,000 --> 00:21:15,000
1103
+ And you see that mask attribute is an optional one.
1104
+
1105
+ 277
1106
+ 00:21:15,000 --> 00:21:21,000
1107
+ If mask is not provided, image must have transparency which will be used as the mask.
1108
+
1109
+ 278
1110
+ 00:21:22,000 --> 00:21:26,000
1111
+ I'm going to show you this example too, at the end of the lesson.
1112
+
1113
+ 279
1114
+ 00:21:26,000 --> 00:21:33,000
1115
+ In postman I select form data and here for each attribute I can change attribute type.
1116
+
1117
+ 280
1118
+ 00:21:33,000 --> 00:21:39,000
1119
+ You can see that for image and for mask attribute I selected file type.
1120
+
1121
+ 281
1122
+ 00:21:39,000 --> 00:21:44,000
1123
+ Just hover mouse over the field and change the selector here.
1124
+
1125
+ 282
1126
+ 00:21:45,000 --> 00:21:48,000
1127
+ And now I can select file as a value.
1128
+
1129
+ 283
1130
+ 00:21:49,000 --> 00:21:55,000
1131
+ For mask attribute, you need to select image with transparent area like I showed you on the slide.
1132
+
1133
+ 284
1134
+ 00:21:55,000 --> 00:22:02,000
1135
+ In a minute we are going to review a dataset that I prepared for you and results that we received.
1136
+
1137
+ 285
1138
+ 00:22:02,000 --> 00:22:11,000
1139
+ So Mask is an additional image whose fully transparent areas where alpha is zero indicate where image
1140
+
1141
+ 286
1142
+ 00:22:11,000 --> 00:22:17,000
1143
+ should be edited, must be a valid PNG file less than four megabytes and have the same dimensions as
1144
+
1145
+ 287
1146
+ 00:22:17,000 --> 00:22:18,000
1147
+ image.
1148
+
1149
+ 288
1150
+ 00:22:19,000 --> 00:22:21,000
1151
+ Who is prompt attribute everything a symbol.
1152
+
1153
+ 289
1154
+ 00:22:21,000 --> 00:22:25,000
1155
+ It is a text description of the desired image.
1156
+
1157
+ 290
1158
+ 00:22:25,000 --> 00:22:30,000
1159
+ And as we already discussed, you need to describe the whole image.
1160
+
1161
+ 291
1162
+ 00:22:30,000 --> 00:22:32,000
1163
+ But not only the transparent part.
1164
+
1165
+ 292
1166
+ 00:22:33,000 --> 00:22:37,000
1167
+ There's only one important thing that I didn't mention yet is a prompt limit.
1168
+
1169
+ 293
1170
+ 00:22:38,000 --> 00:22:41,000
1171
+ This is a maximum length is 1000 characters.
1172
+
1173
+ 294
1174
+ 00:22:42,000 --> 00:22:47,000
1175
+ An attribute is for amount of images to be generated must be between 1 and 10.
1176
+
1177
+ 295
1178
+ 00:22:48,000 --> 00:22:55,000
1179
+ Size attribute sets the size of generated images the same as with image generation.
1180
+
1181
+ 296
1182
+ 00:22:55,000 --> 00:22:59,000
1183
+ There are three size variations are supported at the moment.
1184
+
1185
+ 297
1186
+ 00:22:59,000 --> 00:23:02,000
1187
+ 256 by 256.
1188
+
1189
+ 298
1190
+ 00:23:02,000 --> 00:23:08,000
1191
+ 512 by 512 and ten, 24 by 1024.
1192
+
1193
+ 299
1194
+ 00:23:08,000 --> 00:23:15,000
1195
+ And in the similar way, like in Create API that we already reviewed, we have response format with
1196
+
1197
+ 300
1198
+ 00:23:15,000 --> 00:23:17,000
1199
+ two possible values and user.
1200
+
1201
+ 301
1202
+ 00:23:18,000 --> 00:23:21,000
1203
+ These are all available attributes based on today.
1204
+
1205
+ 302
1206
+ 00:23:21,000 --> 00:23:23,000
1207
+ So let's get back to the postman now.
1208
+
1209
+ 303
1210
+ 00:23:24,000 --> 00:23:30,000
1211
+ I configured all attributes in the form data and I'm ready to send the request.
1212
+
1213
+ 304
1214
+ 00:23:30,000 --> 00:23:38,000
1215
+ In response, I receive URL that I can copy and paste to the browser for better visualization and better
1216
+
1217
+ 305
1218
+ 00:23:38,000 --> 00:23:40,000
1219
+ comparison of input and output.
1220
+
1221
+ 306
1222
+ 00:23:40,000 --> 00:23:44,000
1223
+ Let me present the results with the help of slides.
1224
+
1225
+ 307
1226
+ 00:23:44,000 --> 00:23:47,000
1227
+ Let's start from the successful example.
1228
+
1229
+ 308
1230
+ 00:23:47,000 --> 00:23:55,000
1231
+ I used Unsplash to download royalty free images and work with them and I tried to find the similar image
1232
+
1233
+ 309
1234
+ 00:23:55,000 --> 00:23:57,000
1235
+ like I showed you from OpenAI.
1236
+
1237
+ 310
1238
+ 00:23:57,000 --> 00:23:59,000
1239
+ API documentation.
1240
+
1241
+ 311
1242
+ 00:23:59,000 --> 00:24:06,000
1243
+ You can see here we also have swimming pool and the graphic is a cartoon like style.
1244
+
1245
+ 312
1246
+ 00:24:06,000 --> 00:24:09,000
1247
+ As you may see, it looks unrealistic.
1248
+
1249
+ 313
1250
+ 00:24:10,000 --> 00:24:17,000
1251
+ And in case I submit this page with the mask like you can see on the slide and prompt swimming pool
1252
+
1253
+ 314
1254
+ 00:24:17,000 --> 00:24:20,000
1255
+ with Flamingo, then I receive such result.
1256
+
1257
+ 315
1258
+ 00:24:20,000 --> 00:24:26,000
1259
+ And to be honest, this is the best result that I managed to achieve based on today.
1260
+
1261
+ 316
1262
+ 00:24:26,000 --> 00:24:33,000
1263
+ Edit Feature of Dali is more for marketing purposes rather than to handle real use cases.
1264
+
1265
+ 317
1266
+ 00:24:33,000 --> 00:24:39,000
1267
+ I really believe that this will be improved over time, but it is not the fact, based on the day of
1268
+
1269
+ 318
1270
+ 00:24:39,000 --> 00:24:41,000
1271
+ the creation of this video lesson.
1272
+
1273
+ 319
1274
+ 00:24:41,000 --> 00:24:42,000
1275
+ Why I say so?
1276
+
1277
+ 320
1278
+ 00:24:42,000 --> 00:24:49,000
1279
+ First of all, to receive an image of at least this quality, I had to generate few images.
1280
+
1281
+ 321
1282
+ 00:24:49,000 --> 00:24:53,000
1283
+ You can also see the previous generated version, which is not good.
1284
+
1285
+ 322
1286
+ 00:24:54,000 --> 00:24:59,000
1287
+ The second thing is look at the examples that I say is the most successful one.
1288
+
1289
+ 323
1290
+ 00:24:59,000 --> 00:25:06,000
1291
+ If you would scale it and start look to the details, you can see that the drawing itself is not the
1292
+
1293
+ 324
1294
+ 00:25:06,000 --> 00:25:07,000
1295
+ best.
1296
+
1297
+ 325
1298
+ 00:25:08,000 --> 00:25:15,000
1299
+ Somewhere lines are broken, somewhere it just looks not natural or other things.
1300
+
1301
+ 326
1302
+ 00:25:15,000 --> 00:25:23,000
1303
+ And the third thing why I think that added endpoint in the list, super raw, is the generated images.
1304
+
1305
+ 327
1306
+ 00:25:23,000 --> 00:25:27,000
1307
+ Let's review a few more examples for the next case.
1308
+
1309
+ 328
1310
+ 00:25:27,000 --> 00:25:33,000
1311
+ I wanted to edit the image in order it would look like a man riding a bicycle in the park in autumn.
1312
+
1313
+ 329
1314
+ 00:25:34,000 --> 00:25:40,000
1315
+ You can see that the lead tried to draw a man riding a bike, but at the same time we have to admit
1316
+
1317
+ 330
1318
+ 00:25:40,000 --> 00:25:45,000
1319
+ that it didn't succeed, at least as I expected.
1320
+
1321
+ 331
1322
+ 00:25:45,000 --> 00:25:49,000
1323
+ Sometimes the league simply ignores my prompts.
1324
+
1325
+ 332
1326
+ 00:25:49,000 --> 00:25:50,000
1327
+ Like I asked.
1328
+
1329
+ 333
1330
+ 00:25:50,000 --> 00:25:51,000
1331
+ Nothing.
1332
+
1333
+ 334
1334
+ 00:25:51,000 --> 00:25:59,000
1335
+ For example, I expected to have a small yard here on the image, but instead of yard is a transparent
1336
+
1337
+ 335
1338
+ 00:25:59,000 --> 00:26:02,000
1339
+ area was filled out with the sea and that's it.
1340
+
1341
+ 336
1342
+ 00:26:03,000 --> 00:26:08,000
1343
+ Also, I wanted to paste a street musician on this image in first option.
1344
+
1345
+ 337
1346
+ 00:26:08,000 --> 00:26:13,000
1347
+ The list simply ignored my prompt and just draw a wall almost like it was.
1348
+
1349
+ 338
1350
+ 00:26:13,000 --> 00:26:19,000
1351
+ And during the second attempt, the league created something what was supposed to look like a musician.
1352
+
1353
+ 339
1354
+ 00:26:19,000 --> 00:26:21,000
1355
+ But apparently it is not.
1356
+
1357
+ 340
1358
+ 00:26:22,000 --> 00:26:29,000
1359
+ And one more example is about a group of people who works together in the office in this imaginary example
1360
+
1361
+ 341
1362
+ 00:26:29,000 --> 00:26:32,000
1363
+ imagines that we want to substitute one colleague.
1364
+
1365
+ 342
1366
+ 00:26:32,000 --> 00:26:38,000
1367
+ For example, our colleague took a day off that day, but came to the team building activities and Pizza
1368
+
1369
+ 343
1370
+ 00:26:38,000 --> 00:26:40,000
1371
+ Friday party.
1372
+
1373
+ 344
1374
+ 00:26:40,000 --> 00:26:45,000
1375
+ So I want to edit this image with the Dali in order to erase this colleague.
1376
+
1377
+ 345
1378
+ 00:26:46,000 --> 00:26:49,000
1379
+ As you can see, result is not realistic at all.
1380
+
1381
+ 346
1382
+ 00:26:49,000 --> 00:26:57,000
1383
+ And even for cartoon like style or for painting, it doesn't look mature enough to be shared with somebody.
1384
+
1385
+ 347
1386
+ 00:26:58,000 --> 00:27:03,000
1387
+ You also know that the mask attribute is not required and not a mandatory one.
1388
+
1389
+ 348
1390
+ 00:27:03,000 --> 00:27:09,000
1391
+ We learned this during an API review, but let's try now how it works in practice.
1392
+
1393
+ 349
1394
+ 00:27:10,000 --> 00:27:13,000
1395
+ What would be in case I would upload just mask straight away.
1396
+
1397
+ 350
1398
+ 00:27:13,000 --> 00:27:19,000
1399
+ In such case, model shouldn't understand that it should draw a person on that place.
1400
+
1401
+ 351
1402
+ 00:27:19,000 --> 00:27:20,000
1403
+ What do you think?
1404
+
1405
+ 352
1406
+ 00:27:21,000 --> 00:27:28,000
1407
+ So in case I upload image with transparent areas into an image attribute and don't send any mask at
1408
+
1409
+ 353
1410
+ 00:27:28,000 --> 00:27:31,000
1411
+ all, we receive the following results.
1412
+
1413
+ 354
1414
+ 00:27:31,000 --> 00:27:37,000
1415
+ I would say that the first one is slightly better now, but it still draws a person during the second
1416
+
1417
+ 355
1418
+ 00:27:37,000 --> 00:27:38,000
1419
+ attempt.
1420
+
1421
+ 356
1422
+ 00:27:38,000 --> 00:27:45,000
1423
+ So now you understand my conclusion about the lee, but at least we learned an API which is most likely
1424
+
1425
+ 357
1426
+ 00:27:45,000 --> 00:27:48,000
1427
+ will remain the same or at least similar.
1428
+
1429
+ 358
1430
+ 00:27:49,000 --> 00:27:54,000
1431
+ And with the new release of the Lee, you can try the added feature one more time.
1432
+
1433
+ 359
1434
+ 00:27:55,000 --> 00:27:56,000
1435
+ Who knows?
1436
+
1437
+ 360
1438
+ 00:27:56,000 --> 00:28:03,000
1439
+ Probably next version of added feature in the Lee will work much better and the set method of interaction
1440
+
1441
+ 361
1442
+ 00:28:03,000 --> 00:28:07,000
1443
+ with the Lee API is about variations of an existing image.
1444
+
1445
+ 362
1446
+ 00:28:07,000 --> 00:28:09,000
1447
+ Everything is simple here.
1448
+
1449
+ 363
1450
+ 00:28:09,000 --> 00:28:15,000
1451
+ Imagine that you have an image and you need to create another variation of the image.
1452
+
1453
+ 364
1454
+ 00:28:15,000 --> 00:28:17,000
1455
+ You may have a different motivation.
1456
+
1457
+ 365
1458
+ 00:28:17,000 --> 00:28:24,000
1459
+ Is it to get inspiration or just have a legal workaround about using the original image and create its
1460
+
1461
+ 366
1462
+ 00:28:24,000 --> 00:28:26,000
1463
+ unique variation?
1464
+
1465
+ 367
1466
+ 00:28:26,000 --> 00:28:28,000
1467
+ This is just an example.
1468
+
1469
+ 368
1470
+ 00:28:28,000 --> 00:28:30,000
1471
+ There can be different cases.
1472
+
1473
+ 369
1474
+ 00:28:31,000 --> 00:28:35,000
1475
+ Let's review API reference and we'll try to understand it better.
1476
+
1477
+ 370
1478
+ 00:28:35,000 --> 00:28:39,000
1479
+ We have one required attribute that is image.
1480
+
1481
+ 371
1482
+ 00:28:39,000 --> 00:28:41,000
1483
+ Requirements are similar.
1484
+
1485
+ 372
1486
+ 00:28:41,000 --> 00:28:50,000
1487
+ Image should be a valid PNG file square and not more than four megabytes and all other attributes like
1488
+
1489
+ 373
1490
+ 00:28:50,000 --> 00:28:52,000
1491
+ n size response format.
1492
+
1493
+ 374
1494
+ 00:28:52,000 --> 00:29:00,000
1495
+ We already discussed during the review of previous endpoints, so let's check how it looks like in Postman
1496
+
1497
+ 375
1498
+ 00:29:00,000 --> 00:29:03,000
1499
+ in the Postman collection that you can find in attachment.
1500
+
1501
+ 376
1502
+ 00:29:03,000 --> 00:29:07,000
1503
+ You will be able also to find request for image variation endpoint.
1504
+
1505
+ 377
1506
+ 00:29:07,000 --> 00:29:09,000
1507
+ Nothing special here.
1508
+
1509
+ 378
1510
+ 00:29:09,000 --> 00:29:14,000
1511
+ For the sake of example, let's make variation for different images.
1512
+
1513
+ 379
1514
+ 00:29:15,000 --> 00:29:19,000
1515
+ Mona Lisa, probably the most famous piece of art in the world.
1516
+
1517
+ 380
1518
+ 00:29:19,000 --> 00:29:24,000
1519
+ Let's ask the lead to make its own variation of this masterpiece.
1520
+
1521
+ 381
1522
+ 00:29:24,000 --> 00:29:32,000
1523
+ And as you can see, it is hard to beat Da Vinci in general when you are dealing with human images using
1524
+
1525
+ 382
1526
+ 00:29:32,000 --> 00:29:32,000
1527
+ Dali.
1528
+
1529
+ 383
1530
+ 00:29:33,000 --> 00:29:39,000
1531
+ It works approximately in the way like you can see on the slides, whether it is good or bad, it is
1532
+
1533
+ 384
1534
+ 00:29:39,000 --> 00:29:40,000
1535
+ you to decide.
1536
+
1537
+ 385
1538
+ 00:29:40,000 --> 00:29:42,000
1539
+ Because all of us have different tastes.
1540
+
1541
+ 386
1542
+ 00:29:43,000 --> 00:29:49,000
1543
+ And you remember we had example with the pork, as you can see, in case there are no requirements to
1544
+
1545
+ 387
1546
+ 00:29:49,000 --> 00:29:52,000
1547
+ draw human or extra small details.
1548
+
1549
+ 388
1550
+ 00:29:52,000 --> 00:29:55,000
1551
+ Dali can handle such cases.
1552
+
1553
+ 389
1554
+ 00:29:55,000 --> 00:29:59,000
1555
+ So in this case, we can say that we receive expected variations.
1556
+
1557
+ 390
1558
+ 00:30:00,000 --> 00:30:02,000
1559
+ So what would be the conclusion?
1560
+
1561
+ 391
1562
+ 00:30:02,000 --> 00:30:07,000
1563
+ As you can see, I always try to avoid making conclusions instead of you.
1564
+
1565
+ 392
1566
+ 00:30:07,000 --> 00:30:16,000
1567
+ Instead, I tried to do the best what I can to give you 360 degree overview of the topic and let you
1568
+
1569
+ 393
1570
+ 00:30:16,000 --> 00:30:18,000
1571
+ form your own opinion.
1572
+
1573
+ 394
1574
+ 00:30:18,000 --> 00:30:24,000
1575
+ But if you are interested, I can just share my opinion about Delhi in general, and this is related
1576
+
1577
+ 395
1578
+ 00:30:24,000 --> 00:30:26,000
1579
+ to all Delhi features.
1580
+
1581
+ 396
1582
+ 00:30:26,000 --> 00:30:31,000
1583
+ The lower requirements for details you have the better really?
1584
+
1585
+ 397
1586
+ 00:30:31,000 --> 00:30:35,000
1587
+ Because you saw that not all scenarios Delhi can handle with ease.
1588
+
1589
+ 398
1590
+ 00:30:36,000 --> 00:30:43,000
1591
+ Obviously it has huge advantages and it is really an amazing thing for brainstorming, for inspiration
1592
+
1593
+ 399
1594
+ 00:30:43,000 --> 00:30:45,000
1595
+ and other things.
1596
+
1597
+ 400
1598
+ 00:30:45,000 --> 00:30:51,000
1599
+ For example, I used the lead to take inspiration during the design of the logo for one of my projects.
1600
+
1601
+ 401
1602
+ 00:30:51,000 --> 00:30:59,000
1603
+ I was wondered what associations can arise with different words, and Delhi helped me with this goal.
1604
+
1605
+ 402
1606
+ 00:31:00,000 --> 00:31:05,000
1607
+ So really a lot will depend on your expectations and how you plan to use Delhi.
1608
+
1609
+ 403
1610
+ 00:31:05,000 --> 00:31:11,000
1611
+ And today we did a useful deep dive into API in order to help you understand how you can use Delhi in
1612
+
1613
+ 404
1614
+ 00:31:11,000 --> 00:31:12,000
1615
+ your work.
1616
+
1617
+ 405
1618
+ 00:31:12,000 --> 00:31:16,000
1619
+ So let's recap now what we have learned during the lesson.
1620
+
1621
+ 406
1622
+ 00:31:17,000 --> 00:31:19,000
1623
+ We learned a lot of things today.
1624
+
1625
+ 407
1626
+ 00:31:19,000 --> 00:31:22,000
1627
+ Now you know what the Lee model is.
1628
+
1629
+ 408
1630
+ 00:31:22,000 --> 00:31:27,000
1631
+ I explained what a decoder and encoder are in transforming models.
1632
+
1633
+ 409
1634
+ 00:31:27,000 --> 00:31:34,000
1635
+ This is some basic terminology and will help you with understanding of the topic and architecture of
1636
+
1637
+ 410
1638
+ 00:31:34,000 --> 00:31:35,000
1639
+ other models.
1640
+
1641
+ 411
1642
+ 00:31:35,000 --> 00:31:39,000
1643
+ We've used key features of Delhi to help you understand the topic better.
1644
+
1645
+ 412
1646
+ 00:31:39,000 --> 00:31:46,000
1647
+ We learned business use cases when the league can be applied, and then we reviewed documentation and
1648
+
1649
+ 413
1650
+ 00:31:46,000 --> 00:31:51,000
1651
+ practical examples about three ways of interaction with the league API.
1652
+
1653
+ 414
1654
+ 00:31:51,000 --> 00:31:59,000
1655
+ Namely, we learned how to create images based on text prompt, how to edit images based on a text prompt,
1656
+
1657
+ 415
1658
+ 00:31:59,000 --> 00:32:03,000
1659
+ and how to create variations based on an existing image.
1660
+
1661
+ 416
1662
+ 00:32:03,000 --> 00:32:08,000
1663
+ And for each case, we reviewed documentation and practical examples.
1664
+
1665
+ 417
1666
+ 00:32:08,000 --> 00:32:11,000
1667
+ That's all what I wanted to share with you today.
1668
+
1669
+ 418
1670
+ 00:32:11,000 --> 00:32:13,000
1671
+ Thanks a lot for your attention.
1672
+
1673
+ 419
1674
+ 00:32:13,000 --> 00:32:16,000
1675
+ Have a great day and see you in the next lesson.
1676
+
102 - DALL-E - Text to image AI Model by OpenAI/001 Examples-of-images-and-masks.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/tree/master/dall-e
102 - DALL-E - Text to image AI Model by OpenAI/001 Postman-collection-used-in-lesson.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/blob/master/dall-e/OpenAI%20DALL-E.postman_collection.json
102 - DALL-E - Text to image AI Model by OpenAI/001 Pricing.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://openai.com/pricing
102 - DALL-E - Text to image AI Model by OpenAI/external-links.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ 001 API-Reference-for-DALL-E-Model
3
+ https://platform.openai.com/docs/api-reference/images
4
+
5
+ 001 Postman-collection-used-in-lesson
6
+ https://github.com/AndriiPiatakha/openai-learnit/blob/master/dall-e/OpenAI%20DALL-E.postman_collection.json
7
+
8
+ 001 Examples-of-images-and-masks
9
+ https://github.com/AndriiPiatakha/openai-learnit/tree/master/dall-e
10
+
11
+ 001 Pricing
12
+ https://openai.com/pricing
103 - Whisper - Speech to text AI model by OpenAI/001 API-Reference.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://platform.openai.com/docs/api-reference/audio
103 - Whisper - Speech to text AI model by OpenAI/001 Audio-file-1-used-in-the-lesson-for-transcription-demo.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/blob/master/whisper/01_demo_file.mp3
103 - Whisper - Speech to text AI model by OpenAI/001 Audio-file-2-used-in-the-lesson-for-translation-demo.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/blob/master/whisper/02_demo_file.mp3
103 - Whisper - Speech to text AI model by OpenAI/001 Postman-collection.url ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [InternetShortcut]
2
+ URL=https://github.com/AndriiPiatakha/openai-learnit/blob/master/whisper/OpenAI%20Whisper.postman_collection.json
103 - Whisper - Speech to text AI model by OpenAI/001 Whisper Model & API Overview With Examples in Postman_en.srt ADDED
@@ -0,0 +1,1552 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1
2
+ 00:00:05,000 --> 00:00:06,000
3
+ Hello, Tim.
4
+
5
+ 2
6
+ 00:00:06,000 --> 00:00:11,000
7
+ In this lesson we are going to talk about such OpenAI model as Whisper.
8
+
9
+ 3
10
+ 00:00:11,000 --> 00:00:16,000
11
+ We are going to start lesson from the general overview of OpenAI whisper model.
12
+
13
+ 4
14
+ 00:00:17,000 --> 00:00:22,000
15
+ I will explain you its key features to understand what a whisper model is.
16
+
17
+ 5
18
+ 00:00:22,000 --> 00:00:26,000
19
+ We will review business use cases when whisper may be applicable.
20
+
21
+ 6
22
+ 00:00:26,000 --> 00:00:33,000
23
+ Also I will tell you limitations of the model that you need to consider if you plan to work with Whisper.
24
+
25
+ 7
26
+ 00:00:33,000 --> 00:00:39,000
27
+ While learning about Whisper, we are going to learn some basic concepts about speech recognition as
28
+
29
+ 8
30
+ 00:00:39,000 --> 00:00:41,000
31
+ word error rate.
32
+
33
+ 9
34
+ 00:00:41,000 --> 00:00:46,000
35
+ Also in the lesson, we are going to have a lot of practical exercises.
36
+
37
+ 10
38
+ 00:00:46,000 --> 00:00:53,000
39
+ We will learn whisper API from the documentation and when we will complete review of the API, we will
40
+
41
+ 11
42
+ 00:00:53,000 --> 00:00:55,000
43
+ proceed with practical examples.
44
+
45
+ 12
46
+ 00:00:55,000 --> 00:01:00,000
47
+ I'm going to show you transcription and translation demo with Whisper API.
48
+
49
+ 13
50
+ 00:01:00,000 --> 00:01:07,000
51
+ We'll use different attributes and will understand how using of different attributes can impact the
52
+
53
+ 14
54
+ 00:01:07,000 --> 00:01:08,000
55
+ response.
56
+
57
+ 15
58
+ 00:01:08,000 --> 00:01:10,000
59
+ Let's start our lesson.
60
+
61
+ 16
62
+ 00:01:10,000 --> 00:01:13,000
63
+ Let's understand first what a whisper model is.
64
+
65
+ 17
66
+ 00:01:13,000 --> 00:01:18,000
67
+ Whisper is an automatic speech recognition system developed by OpenAI.
68
+
69
+ 18
70
+ 00:01:19,000 --> 00:01:24,000
71
+ Trained on a vast and diverse dataset collected from the Internet.
72
+
73
+ 19
74
+ 00:01:24,000 --> 00:01:34,000
75
+ Whisper is trained on an extensive dataset comprising 680,000 hours of multilingual and multi-task supervised
76
+
77
+ 20
78
+ 00:01:34,000 --> 00:01:35,000
79
+ data.
80
+
81
+ 21
82
+ 00:01:35,000 --> 00:01:43,000
83
+ This large and diverse dataset contributes to its robustness in handling various accents, background
84
+
85
+ 22
86
+ 00:01:43,000 --> 00:01:47,000
87
+ noise, technical vocabulary and multiple languages.
88
+
89
+ 23
90
+ 00:01:47,000 --> 00:01:54,000
91
+ The whisper architecture follows a simple end to end approach implemented as an encoder decoder.
92
+
93
+ 24
94
+ 00:01:54,000 --> 00:02:04,000
95
+ Transformer input audio is divided into 32nd segments, converted into log mel spectrograms and processed
96
+
97
+ 25
98
+ 00:02:04,000 --> 00:02:05,000
99
+ through an encoder.
100
+
101
+ 26
102
+ 00:02:06,000 --> 00:02:07,000
103
+ What is log?
104
+
105
+ 27
106
+ 00:02:07,000 --> 00:02:09,000
107
+ Mel spectrogram a log.
108
+
109
+ 28
110
+ 00:02:09,000 --> 00:02:17,000
111
+ Mel spectrogram short for logarithmic mel frequency spectrogram is a representation of the spectrum
112
+
113
+ 29
114
+ 00:02:17,000 --> 00:02:24,000
115
+ of a signal typically an audio signal that is widely used in speech and audio processing.
116
+
117
+ 30
118
+ 00:02:24,000 --> 00:02:32,000
119
+ It is a valuable tool for various tasks such as speech recognition, music analysis and sound classification.
120
+
121
+ 31
122
+ 00:02:32,000 --> 00:02:36,000
123
+ At this stage, I don't see a lot of benefits for you going deeper in Learn of Log.
124
+
125
+ 32
126
+ 00:02:36,000 --> 00:02:37,000
127
+ Mel Spectrogram.
128
+
129
+ 33
130
+ 00:02:38,000 --> 00:02:43,000
131
+ If you will be interested, you can type your questions and comments to this video and I will be happy
132
+
133
+ 34
134
+ 00:02:43,000 --> 00:02:44,000
135
+ to answer.
136
+
137
+ 35
138
+ 00:02:44,000 --> 00:02:46,000
139
+ Let's learn more about Whisper System.
140
+
141
+ 36
142
+ 00:02:47,000 --> 00:02:55,000
143
+ After audio was divided into 32nd segments and processed through an encoder and decoder of Whisper is
144
+
145
+ 37
146
+ 00:02:55,000 --> 00:03:02,000
147
+ then trained to predict the corresponding text captions with special tokens to direct the model's tasks
148
+
149
+ 38
150
+ 00:03:02,000 --> 00:03:09,000
151
+ such as language identification, timestamps, multilingual transcription and speech translation to
152
+
153
+ 39
154
+ 00:03:09,000 --> 00:03:14,000
155
+ English due to its training on a large and diverse dataset.
156
+
157
+ 40
158
+ 00:03:14,000 --> 00:03:20,000
159
+ Whisper demonstrates improved robustness compared to other similar models.
160
+
161
+ 41
162
+ 00:03:20,000 --> 00:03:28,000
163
+ It makes fewer errors when tested on various datasets, highlighting its adaptability and versatility.
164
+
165
+ 42
166
+ 00:03:28,000 --> 00:03:36,000
167
+ Whispers dataset includes a significant portion of non-English audio and it can transcribe in the original
168
+
169
+ 43
170
+ 00:03:36,000 --> 00:03:39,000
171
+ language or translate it into English.
172
+
173
+ 44
174
+ 00:03:39,000 --> 00:03:47,000
175
+ This approach is found to be effective for speech, to text translation and outperforms supervised state
176
+
177
+ 45
178
+ 00:03:47,000 --> 00:03:50,000
179
+ of the art models in certain translation tasks.
180
+
181
+ 46
182
+ 00:03:51,000 --> 00:03:54,000
183
+ To understand it better what a whisper model is.
184
+
185
+ 47
186
+ 00:03:54,000 --> 00:03:57,000
187
+ Let's review its key features.
188
+
189
+ 48
190
+ 00:03:57,000 --> 00:03:59,000
191
+ The first one.
192
+
193
+ 49
194
+ 00:03:59,000 --> 00:04:00,000
195
+ Transcription.
196
+
197
+ 50
198
+ 00:04:00,000 --> 00:04:06,000
199
+ Whisper can transcribe audio into text written in the original language of the audio.
200
+
201
+ 51
202
+ 00:04:06,000 --> 00:04:09,000
203
+ The second one translation.
204
+
205
+ 52
206
+ 00:04:09,000 --> 00:04:16,000
207
+ In addition to transcription, Whisper can translate audio from supported languages into English, making
208
+
209
+ 53
210
+ 00:04:16,000 --> 00:04:20,000
211
+ it a valuable tool for multilingual applications.
212
+
213
+ 54
214
+ 00:04:20,000 --> 00:04:22,000
215
+ File format Support.
216
+
217
+ 55
218
+ 00:04:22,000 --> 00:04:27,000
219
+ Whisper supports multiple input and output file formats.
220
+
221
+ 56
222
+ 00:04:27,000 --> 00:04:39,000
223
+ The file can be of the following formats Flac, MP3, MP4 and PAC, Mpeg, M4A, Ogg, Vov or Wepm.
224
+
225
+ 57
226
+ 00:04:40,000 --> 00:04:43,000
227
+ It can handle various common audio file types.
228
+
229
+ 58
230
+ 00:04:44,000 --> 00:04:46,000
231
+ Huge amount of supported languages.
232
+
233
+ 59
234
+ 00:04:46,000 --> 00:04:55,000
235
+ Whisper supports a wide range of languages, including Afrikaans, Arabic, Chinese, French, English,
236
+
237
+ 60
238
+ 00:04:55,000 --> 00:05:01,000
239
+ German, Japanese, Korean, Russian, Spanish and many more.
240
+
241
+ 61
242
+ 00:05:01,000 --> 00:05:06,000
243
+ These languages are supported for both transcriptions and translations.
244
+
245
+ 62
246
+ 00:05:07,000 --> 00:05:14,000
247
+ Handling longer inputs, while the default limit for input files is 25MB.
248
+
249
+ 63
250
+ 00:05:14,000 --> 00:05:18,000
251
+ Whisper provides guidance on how to handle longer audio files.
252
+
253
+ 64
254
+ 00:05:18,000 --> 00:05:25,000
255
+ Users can split longer files into chunks of 25MB or less for processing.
256
+
257
+ 65
258
+ 00:05:26,000 --> 00:05:28,000
259
+ Prompting for improved quality.
260
+
261
+ 66
262
+ 00:05:28,000 --> 00:05:34,000
263
+ Users can use prompts to improve the quality of transcripts generated by whisper.
264
+
265
+ 67
266
+ 00:05:34,000 --> 00:05:40,000
267
+ Prompts allow for some control over the style and content of the generated text.
268
+
269
+ 68
270
+ 00:05:41,000 --> 00:05:43,000
271
+ Reliability improvement techniques.
272
+
273
+ 69
274
+ 00:05:43,000 --> 00:05:51,000
275
+ Whisper offers techniques to address common challenges, such as recognizing uncommon words or acronyms.
276
+
277
+ 70
278
+ 00:05:51,000 --> 00:05:57,000
279
+ Prompting and specific prompt styles can be used to enhance the reliability of transcriptions.
280
+
281
+ 71
282
+ 00:05:57,000 --> 00:06:04,000
283
+ As you can see, Whisper is designed to be a versatile tool for converting audio into text and support
284
+
285
+ 72
286
+ 00:06:04,000 --> 00:06:11,000
287
+ applications in various fields, including transcription services, language translation and more.
288
+
289
+ 73
290
+ 00:06:11,000 --> 00:06:17,000
291
+ And before we jump to learn the details, let's understand business use cases.
292
+
293
+ 74
294
+ 00:06:17,000 --> 00:06:25,000
295
+ Or in other words, why Whisper model might be interested to you and when you can use it and in which
296
+
297
+ 75
298
+ 00:06:25,000 --> 00:06:26,000
299
+ cases?
300
+
301
+ 76
302
+ 00:06:26,000 --> 00:06:32,000
303
+ Let's brainstorm and let me suggest a few ideas for application and start up.
304
+
305
+ 77
306
+ 00:06:32,000 --> 00:06:39,000
307
+ The whisper model can be applied in various scenarios depending on your specific needs and use cases.
308
+
309
+ 78
310
+ 00:06:39,000 --> 00:06:43,000
311
+ Here are some situations where you might find the whisper model useful.
312
+
313
+ 79
314
+ 00:06:43,000 --> 00:06:47,000
315
+ Automatic speech recognition, for example.
316
+
317
+ 80
318
+ 00:06:47,000 --> 00:06:48,000
319
+ Transcription Services.
320
+
321
+ 81
322
+ 00:06:49,000 --> 00:06:52,000
323
+ If you need to convert recordings into text.
324
+
325
+ 82
326
+ 00:06:52,000 --> 00:06:57,000
327
+ Whisper can be used to transcribe these audio inputs accurately.
328
+
329
+ 83
330
+ 00:06:57,000 --> 00:07:00,000
331
+ This can be helpful in messaging apps.
332
+
333
+ 84
334
+ 00:07:00,000 --> 00:07:06,000
335
+ For example, such messenger as telegram has premium features that allows to convert audio messages
336
+
337
+ 85
338
+ 00:07:06,000 --> 00:07:07,000
339
+ into text.
340
+
341
+ 86
342
+ 00:07:07,000 --> 00:07:15,000
343
+ This is helpful in case person who received audio message don't want or can't listen to an audio message
344
+
345
+ 87
346
+ 00:07:15,000 --> 00:07:16,000
347
+ at the moment.
348
+
349
+ 88
350
+ 00:07:17,000 --> 00:07:18,000
351
+ Voice assistance.
352
+
353
+ 89
354
+ 00:07:18,000 --> 00:07:25,000
355
+ Whisper can power the speech recognition component of voice assistance or chat bots, enabling them
356
+
357
+ 90
358
+ 00:07:25,000 --> 00:07:30,000
359
+ to understand and respond to spoken commands or questions.
360
+
361
+ 91
362
+ 00:07:30,000 --> 00:07:32,000
363
+ Or imagine another case.
364
+
365
+ 92
366
+ 00:07:32,000 --> 00:07:39,000
367
+ You developed an application similar to the one we created in our course application for automation
368
+
369
+ 93
370
+ 00:07:39,000 --> 00:07:41,000
371
+ of project management activities.
372
+
373
+ 94
374
+ 00:07:41,000 --> 00:07:44,000
375
+ And you don't want to give commands via a chat.
376
+
377
+ 95
378
+ 00:07:44,000 --> 00:07:48,000
379
+ You want to send audio message, for example, like this.
380
+
381
+ 96
382
+ 00:07:48,000 --> 00:07:52,000
383
+ Create a user story to implement chat bot and assign it to Andre.
384
+
385
+ 97
386
+ 00:07:52,000 --> 00:07:54,000
387
+ And that's it.
388
+
389
+ 98
390
+ 00:07:54,000 --> 00:08:00,000
391
+ Our application will use Whisper to recognize audio and convert speech to text.
392
+
393
+ 99
394
+ 00:08:00,000 --> 00:08:05,000
395
+ Then speech will be sent to the chat GPT, then chat.
396
+
397
+ 100
398
+ 00:08:05,000 --> 00:08:10,000
399
+ GPT will understand that we want to make a function call and then we'll be back to the scenarios that
400
+
401
+ 101
402
+ 00:08:10,000 --> 00:08:12,000
403
+ we already implemented in the previous lesson.
404
+
405
+ 102
406
+ 00:08:13,000 --> 00:08:15,000
407
+ The second business use case.
408
+
409
+ 103
410
+ 00:08:15,000 --> 00:08:21,000
411
+ Multilingual applications like language translation applications, for example.
412
+
413
+ 104
414
+ 00:08:22,000 --> 00:08:28,000
415
+ If you want to create applications that translate spoken content from multiple languages into English,
416
+
417
+ 105
418
+ 00:08:28,000 --> 00:08:35,000
419
+ whisper can be a valuable component for handling the transcription and translation tasks.
420
+
421
+ 106
422
+ 00:08:35,000 --> 00:08:41,000
423
+ For example, you have multilingual team you can use Whisper to boost your communication.
424
+
425
+ 107
426
+ 00:08:42,000 --> 00:08:47,000
427
+ Everyone can speak in their original language and it will be translated to English.
428
+
429
+ 108
430
+ 00:08:47,000 --> 00:08:50,000
431
+ Another use case Multilingual transcription.
432
+
433
+ 109
434
+ 00:08:50,000 --> 00:08:57,000
435
+ Whisper can be used to transcribe audio content in various languages, making it suitable for applications
436
+
437
+ 110
438
+ 00:08:57,000 --> 00:09:00,000
439
+ involving multilingual audio data.
440
+
441
+ 111
442
+ 00:09:01,000 --> 00:09:05,000
443
+ The group of accessibility and captioning use cases.
444
+
445
+ 112
446
+ 00:09:05,000 --> 00:09:10,000
447
+ Imagine closed captioning for video content.
448
+
449
+ 113
450
+ 00:09:10,000 --> 00:09:17,000
451
+ Whisper can be used to generate closed captions making your videos accessible to individuals with hearing
452
+
453
+ 114
454
+ 00:09:17,000 --> 00:09:20,000
455
+ disabilities or for content localization.
456
+
457
+ 115
458
+ 00:09:21,000 --> 00:09:22,000
459
+ Accessibility tools.
460
+
461
+ 116
462
+ 00:09:23,000 --> 00:09:29,000
463
+ It can be integrated into accessibility tools that converts spoken content in real time into text,
464
+
465
+ 117
466
+ 00:09:29,000 --> 00:09:33,000
467
+ helping individuals with hearing disabilities.
468
+
469
+ 118
470
+ 00:09:33,000 --> 00:09:36,000
471
+ Content indexing and search.
472
+
473
+ 119
474
+ 00:09:36,000 --> 00:09:43,000
475
+ Whisper can assist in indexing and searching audio or video content by transcribing the audio.
476
+
477
+ 120
478
+ 00:09:43,000 --> 00:09:48,000
479
+ You can make the content searchable based on its spoken words and phrases.
480
+
481
+ 121
482
+ 00:09:49,000 --> 00:09:50,000
483
+ Voice Data analysis.
484
+
485
+ 122
486
+ 00:09:51,000 --> 00:09:52,000
487
+ Market Research.
488
+
489
+ 123
490
+ 00:09:52,000 --> 00:10:00,000
491
+ Use Case Analyzing recorded phone interviews, customer service calls or user feedback can provide valuable
492
+
493
+ 124
494
+ 00:10:00,000 --> 00:10:01,000
495
+ insights.
496
+
497
+ 125
498
+ 00:10:01,000 --> 00:10:06,000
499
+ Whisper can transcribe and then using chat GPT post-processing.
500
+
501
+ 126
502
+ 00:10:06,000 --> 00:10:09,000
503
+ You can analyze these audio records.
504
+
505
+ 127
506
+ 00:10:09,000 --> 00:10:11,000
507
+ Voice Data Mining.
508
+
509
+ 128
510
+ 00:10:11,000 --> 00:10:18,000
511
+ Whisper can help organizations extract useful information from voice data for business intelligence,
512
+
513
+ 129
514
+ 00:10:18,000 --> 00:10:20,000
515
+ quality control and trend analysis.
516
+
517
+ 130
518
+ 00:10:21,000 --> 00:10:22,000
519
+ Meeting minutes.
520
+
521
+ 131
522
+ 00:10:23,000 --> 00:10:28,000
523
+ Imagine that you have productive meeting and you don't want to write meeting minutes in case you have
524
+
525
+ 132
526
+ 00:10:28,000 --> 00:10:30,000
527
+ audio recording of the meeting.
528
+
529
+ 133
530
+ 00:10:30,000 --> 00:10:37,000
531
+ You can use Whisper model to convert audio to text and then ask ChatGPT to structure meeting minutes
532
+
533
+ 134
534
+ 00:10:37,000 --> 00:10:38,000
535
+ on your request.
536
+
537
+ 135
538
+ 00:10:39,000 --> 00:10:45,000
539
+ Assign action items to responsible team members and even to send an email to accountable team members.
540
+
541
+ 136
542
+ 00:10:46,000 --> 00:10:53,000
543
+ And we already had the lesson in the course about how to generate and send email using ChatGPT and custom
544
+
545
+ 137
546
+ 00:10:53,000 --> 00:10:53,000
547
+ application.
548
+
549
+ 138
550
+ 00:10:54,000 --> 00:10:55,000
551
+ Language learning.
552
+
553
+ 139
554
+ 00:10:56,000 --> 00:11:02,000
555
+ If you develop in language learning platforms or applications, whisper can be used to transcribe and
556
+
557
+ 140
558
+ 00:11:02,000 --> 00:11:10,000
559
+ translate spoken content, facilitating language acquisition, podcasts and media production.
560
+
561
+ 141
562
+ 00:11:10,000 --> 00:11:17,000
563
+ Whisper can be used to generate transcripts for podcasts or spoken content, making it easier to create
564
+
565
+ 142
566
+ 00:11:17,000 --> 00:11:21,000
567
+ written summaries, articles, or searchable show notes.
568
+
569
+ 143
570
+ 00:11:22,000 --> 00:11:23,000
571
+ Content Moderation.
572
+
573
+ 144
574
+ 00:11:23,000 --> 00:11:30,000
575
+ Whisper can be part of content moderation systems helping identify and flag inappropriate or offensive
576
+
577
+ 145
578
+ 00:11:30,000 --> 00:11:32,000
579
+ audio content.
580
+
581
+ 146
582
+ 00:11:32,000 --> 00:11:34,000
583
+ Research and data collection.
584
+
585
+ 147
586
+ 00:11:35,000 --> 00:11:42,000
587
+ Researchers can use Whisper to transcribe interviews, field recordings or oral history, making it
588
+
589
+ 148
590
+ 00:11:42,000 --> 00:11:45,000
591
+ easier to analyze and store data.
592
+
593
+ 149
594
+ 00:11:45,000 --> 00:11:52,000
595
+ Custom applications You can integrate, whisper into custom applications or workflows tailored to your
596
+
597
+ 150
598
+ 00:11:52,000 --> 00:11:54,000
599
+ specific needs.
600
+
601
+ 151
602
+ 00:11:54,000 --> 00:11:59,000
603
+ For example, creating a custom voice assistant for industry specific tasks.
604
+
605
+ 152
606
+ 00:11:59,000 --> 00:12:05,000
607
+ Keep in mind that whisper, like any tool, has its strengths and limitations.
608
+
609
+ 153
610
+ 00:12:05,000 --> 00:12:14,000
611
+ It excels in handling diverse accents, languages and audio conditions, but may not be perfect in all
612
+
613
+ 154
614
+ 00:12:14,000 --> 00:12:15,000
615
+ situations.
616
+
617
+ 155
618
+ 00:12:15,000 --> 00:12:22,000
619
+ As you can see, Whisper can be a valuable tool for converting spoken language into text and opening
620
+
621
+ 156
622
+ 00:12:22,000 --> 00:12:27,000
623
+ up a wide range of possibilities for audio data processing and analysis.
624
+
625
+ 157
626
+ 00:12:27,000 --> 00:12:34,000
627
+ Even despite all advantages and features, it is always worse to know the existing limitations of the
628
+
629
+ 158
630
+ 00:12:34,000 --> 00:12:34,000
631
+ model.
632
+
633
+ 159
634
+ 00:12:34,000 --> 00:12:38,000
635
+ So let me share with you limitations that you need to consider.
636
+
637
+ 160
638
+ 00:12:38,000 --> 00:12:46,000
639
+ File Size Limitation Whispers API supports file uploads of up to 25MB.
640
+
641
+ 161
642
+ 00:12:46,000 --> 00:12:53,000
643
+ Larger audio files need to be split into smaller chunks or compressed, potentially leading to context
644
+
645
+ 162
646
+ 00:12:53,000 --> 00:12:55,000
647
+ loss if not handled carefully.
648
+
649
+ 163
650
+ 00:12:56,000 --> 00:13:03,000
651
+ I'm talking about cases when you split audio file in the middle of sentence or in the middle of a word.
652
+
653
+ 164
654
+ 00:13:03,000 --> 00:13:08,000
655
+ To avoid such cases, you can use special libraries to divide audio properly.
656
+
657
+ 165
658
+ 00:13:09,000 --> 00:13:17,000
659
+ English only translation is a translation feature of whisper is limited to translating audio into English.
660
+
661
+ 166
662
+ 00:13:17,000 --> 00:13:20,000
663
+ It doesn't support translation into other languages.
664
+
665
+ 167
666
+ 00:13:20,000 --> 00:13:24,000
667
+ In my opinion, this is probably one of the most critical limitation.
668
+
669
+ 168
670
+ 00:13:25,000 --> 00:13:27,000
671
+ Limited language support.
672
+
673
+ 169
674
+ 00:13:27,000 --> 00:13:35,000
675
+ While the whisper model was trained on 98 languages, it may not achieve high accuracy for all of them.
676
+
677
+ 170
678
+ 00:13:35,000 --> 00:13:42,000
679
+ Only languages with a word error rate of less than 50% are officially supported.
680
+
681
+ 171
682
+ 00:13:43,000 --> 00:13:49,000
683
+ After this slide, I'm going to explain you what a word error rate is in more details.
684
+
685
+ 172
686
+ 00:13:50,000 --> 00:13:52,000
687
+ Limited audio format support.
688
+
689
+ 173
690
+ 00:13:53,000 --> 00:14:05,000
691
+ Whisper supports specific audio file formats Flac, MP3, MP4 and pack Mpeg, M4A, Ogg, Vov or WebP
692
+
693
+ 174
694
+ 00:14:05,000 --> 00:14:05,000
695
+ Em.
696
+
697
+ 175
698
+ 00:14:06,000 --> 00:14:09,000
699
+ Using unsupported formats can be a limitation.
700
+
701
+ 176
702
+ 00:14:10,000 --> 00:14:12,000
703
+ Segmented Audio Context.
704
+
705
+ 177
706
+ 00:14:12,000 --> 00:14:20,000
707
+ Whisper considers only the final 224 tokens of a prompt for context when dealing with segmented audio.
708
+
709
+ 178
710
+ 00:14:20,000 --> 00:14:28,000
711
+ This limitation can impact the handling of long and complex segments, prompting system limitations
712
+
713
+ 179
714
+ 00:14:28,000 --> 00:14:31,000
715
+ while prompts can improve transcription quality.
716
+
717
+ 180
718
+ 00:14:31,000 --> 00:14:37,000
719
+ The whisper model's prompting system is more limited compared to other language models.
720
+
721
+ 181
722
+ 00:14:37,000 --> 00:14:40,000
723
+ It provides less control over generated audio.
724
+
725
+ 182
726
+ 00:14:41,000 --> 00:14:43,000
727
+ How to use prompts in whisper.
728
+
729
+ 183
730
+ 00:14:43,000 --> 00:14:47,000
731
+ We We're going to learn later in this lesson.
732
+
733
+ 184
734
+ 00:14:47,000 --> 00:14:54,000
735
+ Style marching while the model adapts to the style of the prompt, it may not always match the desired
736
+
737
+ 185
738
+ 00:14:54,000 --> 00:15:01,000
739
+ writing style for languages with variations such as simplified and traditional Chinese.
740
+
741
+ 186
742
+ 00:15:01,000 --> 00:15:06,000
743
+ For example, recognition of uncommon words and acronyms.
744
+
745
+ 187
746
+ 00:15:06,000 --> 00:15:13,000
747
+ Whisper may not always recognize uncommon words or acronyms accurately in the audio prompts can help
748
+
749
+ 188
750
+ 00:15:13,000 --> 00:15:15,000
751
+ address this limitation.
752
+
753
+ 189
754
+ 00:15:16,000 --> 00:15:18,000
755
+ His ability of third party software.
756
+
757
+ 190
758
+ 00:15:19,000 --> 00:15:26,000
759
+ Whisper recommends using third party software like Pi DOP for handling longer audio inputs.
760
+
761
+ 191
762
+ 00:15:27,000 --> 00:15:34,000
763
+ We already talked about risk in case you would divide audio file into multiple chunks, you can interrupt
764
+
765
+ 192
766
+ 00:15:34,000 --> 00:15:38,000
767
+ the audience the middle of the sentence and even in the middle of the word.
768
+
769
+ 193
770
+ 00:15:38,000 --> 00:15:43,000
771
+ And this may impact consistency of the transcription and translation.
772
+
773
+ 194
774
+ 00:15:43,000 --> 00:15:52,000
775
+ However, OpenAI makes no guarantees about usability or security of third party libraries, so these
776
+
777
+ 195
778
+ 00:15:52,000 --> 00:15:56,000
779
+ are important limitations to consider when you are dealing with whisper model.
780
+
781
+ 196
782
+ 00:15:56,000 --> 00:16:00,000
783
+ And I hope with the new versions of Whisper, they will be addressed.
784
+
785
+ 197
786
+ 00:16:00,000 --> 00:16:01,000
787
+ So stay tuned.
788
+
789
+ 198
790
+ 00:16:02,000 --> 00:16:07,000
791
+ I also promised to explain to you such concepts as word error rate.
792
+
793
+ 199
794
+ 00:16:07,000 --> 00:16:12,000
795
+ I believe it will be useful for your general education of speech recognition.
796
+
797
+ 200
798
+ 00:16:12,000 --> 00:16:19,000
799
+ Word error rate is a measure used to evaluate the accuracy of automatic speech recognition systems.
800
+
801
+ 201
802
+ 00:16:19,000 --> 00:16:27,000
803
+ In simple terms, it calculates the percentage of words that are incorrect or have errors in the transcribed
804
+
805
+ 202
806
+ 00:16:27,000 --> 00:16:31,000
807
+ output compared to the reference or original text.
808
+
809
+ 203
810
+ 00:16:32,000 --> 00:16:42,000
811
+ A lower word error rate indicates higher accuracy, while a higher word error rate suggests more errors
812
+
813
+ 204
814
+ 00:16:42,000 --> 00:16:43,000
815
+ in the transcription.
816
+
817
+ 205
818
+ 00:16:43,000 --> 00:16:51,000
819
+ For example, if an automatic speech recognition system transcribes a sentence with three errors out
820
+
821
+ 206
822
+ 00:16:51,000 --> 00:17:00,000
823
+ of ten words, the word error rate would be 30% because three out of ten words are incorrect or mismatched.
824
+
825
+ 207
826
+ 00:17:00,000 --> 00:17:08,000
827
+ Word error rate provides a straightforward way to assess how well an automatic speech recognition system
828
+
829
+ 208
830
+ 00:17:08,000 --> 00:17:12,000
831
+ performs in converting spoken language into written text.
832
+
833
+ 209
834
+ 00:17:12,000 --> 00:17:20,000
835
+ And now let's learn API of whisper model and implement simple scenarios in order to understand how to
836
+
837
+ 210
838
+ 00:17:20,000 --> 00:17:22,000
839
+ interact with whisper model.
840
+
841
+ 211
842
+ 00:17:22,000 --> 00:17:27,000
843
+ As you already learned from the slides, there are two main scenarios for whisper model.
844
+
845
+ 212
846
+ 00:17:27,000 --> 00:17:31,000
847
+ They are transcription and translation.
848
+
849
+ 213
850
+ 00:17:32,000 --> 00:17:37,000
851
+ I'm going to use Postman and send request from Postman to demo Whisper API.
852
+
853
+ 214
854
+ 00:17:38,000 --> 00:17:40,000
855
+ Let's start from the transcription.
856
+
857
+ 215
858
+ 00:17:41,000 --> 00:17:45,000
859
+ I created test audio file in the MP3 format as it want to.
860
+
861
+ 216
862
+ 00:17:45,000 --> 00:17:46,000
863
+ Transcript.
864
+
865
+ 217
866
+ 00:17:46,000 --> 00:17:52,000
867
+ With the help of Whisper model in attachments to the lesson, you can find all files to proceed with
868
+
869
+ 218
870
+ 00:17:52,000 --> 00:17:53,000
871
+ this scenario.
872
+
873
+ 219
874
+ 00:17:54,000 --> 00:17:56,000
875
+ I added necessary audio files.
876
+
877
+ 220
878
+ 00:17:56,000 --> 00:18:00,000
879
+ I also added export of my postman collection.
880
+
881
+ 221
882
+ 00:18:01,000 --> 00:18:07,000
883
+ So for this example use file with the name zero one underscore demo underscore file.
884
+
885
+ 222
886
+ 00:18:08,000 --> 00:18:12,000
887
+ You can download it and put it in any location on your computer.
888
+
889
+ 223
890
+ 00:18:13,000 --> 00:18:16,000
891
+ Then you can import Postman collection.
892
+
893
+ 224
894
+ 00:18:16,000 --> 00:18:20,000
895
+ I had a separate lesson about how to work with Postman.
896
+
897
+ 225
898
+ 00:18:20,000 --> 00:18:23,000
899
+ That's why I wouldn't stop on this too much.
900
+
901
+ 226
902
+ 00:18:23,000 --> 00:18:29,000
903
+ In case you would need advice regarding Postman, let me know in comments below the video and I will
904
+
905
+ 227
906
+ 00:18:29,000 --> 00:18:30,000
907
+ be happy to answer.
908
+
909
+ 228
910
+ 00:18:31,000 --> 00:18:33,000
911
+ After you imported postman collection.
912
+
913
+ 229
914
+ 00:18:33,000 --> 00:18:42,000
915
+ Do not forget to configure API key because in postman collection I use OpenAI key variable and you need
916
+
917
+ 230
918
+ 00:18:42,000 --> 00:18:47,000
919
+ to configure OpenAI API key in order to be able to execute API queries.
920
+
921
+ 231
922
+ 00:18:48,000 --> 00:18:51,000
923
+ Also another important thing in attachments.
924
+
925
+ 232
926
+ 00:18:51,000 --> 00:18:55,000
927
+ You will be able to find the link to the official API reference.
928
+
929
+ 233
930
+ 00:18:55,000 --> 00:19:03,000
931
+ OpenAI is famous for dynamic pace of development and sometimes ignorance of backward compatibility with
932
+
933
+ 234
934
+ 00:19:03,000 --> 00:19:04,000
935
+ new releases.
936
+
937
+ 235
938
+ 00:19:04,000 --> 00:19:11,000
939
+ That's why I recommend you always to check the content in the lesson with the latest updates in the
940
+
941
+ 236
942
+ 00:19:11,000 --> 00:19:19,000
943
+ official API documentation in case there will be some changes, use latest API from the documentation.
944
+
945
+ 237
946
+ 00:19:20,000 --> 00:19:24,000
947
+ Here we can see that this is a post request to this URL.
948
+
949
+ 238
950
+ 00:19:25,000 --> 00:19:32,000
951
+ As you can see here in API reference, it is specified that we have to mandatory and required attributes.
952
+
953
+ 239
954
+ 00:19:32,000 --> 00:19:36,000
955
+ They are file and model in the file.
956
+
957
+ 240
958
+ 00:19:36,000 --> 00:19:41,000
959
+ You need to pass the real file object, not just the name of the file.
960
+
961
+ 241
962
+ 00:19:41,000 --> 00:19:48,000
963
+ In this video I'm going to show you how to pass the file object in the postman today and how to pass
964
+
965
+ 242
966
+ 00:19:48,000 --> 00:19:49,000
967
+ it from the code.
968
+
969
+ 243
970
+ 00:19:49,000 --> 00:19:52,000
971
+ I will show you in another lesson.
972
+
973
+ 244
974
+ 00:19:52,000 --> 00:19:59,000
975
+ As you can see, file can be of different formats like we already discussed when we talked about limitations.
976
+
977
+ 245
978
+ 00:19:59,000 --> 00:20:11,000
979
+ The file can be of the following formats flac, mp3, mp4, Mpeg, M4A, ogg Vov or WebP.
980
+
981
+ 246
982
+ 00:20:11,000 --> 00:20:12,000
983
+ M.
984
+
985
+ 247
986
+ 00:20:12,000 --> 00:20:14,000
987
+ For the model attribute.
988
+
989
+ 248
990
+ 00:20:14,000 --> 00:20:15,000
991
+ We just need to pass value.
992
+
993
+ 249
994
+ 00:20:15,000 --> 00:20:17,000
995
+ Whisper Dash one.
996
+
997
+ 250
998
+ 00:20:17,000 --> 00:20:23,000
999
+ Currently, and based on today, OpenAI has just one model for speech to text.
1000
+
1001
+ 251
1002
+ 00:20:23,000 --> 00:20:26,000
1003
+ Probably in the nearest future there will be updates and there will be new.
1004
+
1005
+ 252
1006
+ 00:20:26,000 --> 00:20:27,000
1007
+ Models.
1008
+
1009
+ 253
1010
+ 00:20:27,000 --> 00:20:34,000
1011
+ But so far you can just put whisper dash one as a attributes are optional and we are going to use them
1012
+
1013
+ 254
1014
+ 00:20:34,000 --> 00:20:37,000
1015
+ a little bit later in this lesson.
1016
+
1017
+ 255
1018
+ 00:20:37,000 --> 00:20:42,000
1019
+ Let's just try to get a transcription with just required attributes.
1020
+
1021
+ 256
1022
+ 00:20:43,000 --> 00:20:49,000
1023
+ Here in Postman, you can import the collection that I shared in attachments to the video or just create
1024
+
1025
+ 257
1026
+ 00:20:49,000 --> 00:20:51,000
1027
+ this request from scratch.
1028
+
1029
+ 258
1030
+ 00:20:51,000 --> 00:20:59,000
1031
+ It wouldn't be super complex, so we need to create a post request URL you can take from the API reference
1032
+
1033
+ 259
1034
+ 00:20:59,000 --> 00:21:02,000
1035
+ page that we just reviewed in headers.
1036
+
1037
+ 260
1038
+ 00:21:02,000 --> 00:21:10,000
1039
+ You need to specify authorization header and insert your OpenAI API key here and content type.
1040
+
1041
+ 261
1042
+ 00:21:10,000 --> 00:21:13,000
1043
+ Content type is multi-part form data.
1044
+
1045
+ 262
1046
+ 00:21:14,000 --> 00:21:18,000
1047
+ Now we need to configure body of our request.
1048
+
1049
+ 263
1050
+ 00:21:18,000 --> 00:21:22,000
1051
+ Open Body tap select form data.
1052
+
1053
+ 264
1054
+ 00:21:22,000 --> 00:21:25,000
1055
+ Here we have file and model attributes.
1056
+
1057
+ 265
1058
+ 00:21:26,000 --> 00:21:30,000
1059
+ Pay attention that here you can specify type of the value.
1060
+
1061
+ 266
1062
+ 00:21:30,000 --> 00:21:35,000
1063
+ If you hover mouse in this field, you can change text to file type.
1064
+
1065
+ 267
1066
+ 00:21:35,000 --> 00:21:37,000
1067
+ That is exactly what we need.
1068
+
1069
+ 268
1070
+ 00:21:37,000 --> 00:21:44,000
1071
+ And in the value field you can select audio file that you can also download from attachments to the
1072
+
1073
+ 269
1074
+ 00:21:44,000 --> 00:21:47,000
1075
+ video or create a new file if you want.
1076
+
1077
+ 270
1078
+ 00:21:47,000 --> 00:21:49,000
1079
+ That's it.
1080
+
1081
+ 271
1082
+ 00:21:49,000 --> 00:21:50,000
1083
+ Pretty simple, don't you think?
1084
+
1085
+ 272
1086
+ 00:21:50,000 --> 00:21:54,000
1087
+ So Now we are ready to send the request.
1088
+
1089
+ 273
1090
+ 00:21:54,000 --> 00:21:58,000
1091
+ Let me click Send button and here it is.
1092
+
1093
+ 274
1094
+ 00:21:58,000 --> 00:22:05,000
1095
+ We received a response By default, the data is returned in the Json format.
1096
+
1097
+ 275
1098
+ 00:22:05,000 --> 00:22:13,000
1099
+ If you want, you can select any other supported format like for example, text SRT, verbose Json or
1100
+
1101
+ 276
1102
+ 00:22:13,000 --> 00:22:14,000
1103
+ V double T.
1104
+
1105
+ 277
1106
+ 00:22:15,000 --> 00:22:18,000
1107
+ Let me show you an example of verbose Json.
1108
+
1109
+ 278
1110
+ 00:22:19,000 --> 00:22:27,000
1111
+ I just add one more attribute that is called response format, and I write verbose Json as value here
1112
+
1113
+ 279
1114
+ 00:22:27,000 --> 00:22:29,000
1115
+ and I send request one more time.
1116
+
1117
+ 280
1118
+ 00:22:30,000 --> 00:22:37,000
1119
+ Verbose Json gives you a lot of meta information like for example, task language, duration of the
1120
+
1121
+ 281
1122
+ 00:22:37,000 --> 00:22:40,000
1123
+ audio array of segments and tokens.
1124
+
1125
+ 282
1126
+ 00:22:40,000 --> 00:22:48,000
1127
+ You know that OpenAI language models operate on tokens rather than on the whole words or characters.
1128
+
1129
+ 283
1130
+ 00:22:48,000 --> 00:22:53,000
1131
+ And in the previous lesson we discussed this tokenized model and other details.
1132
+
1133
+ 284
1134
+ 00:22:53,000 --> 00:22:57,000
1135
+ So if you are interested you can use verbose mode.
1136
+
1137
+ 285
1138
+ 00:22:57,000 --> 00:23:02,000
1139
+ For example, this can be useful if you want to gather some analytics.
1140
+
1141
+ 286
1142
+ 00:23:03,000 --> 00:23:08,000
1143
+ Like I said, it is up to you which format works the best for your business needs.
1144
+
1145
+ 287
1146
+ 00:23:08,000 --> 00:23:11,000
1147
+ You can make transcription on various languages.
1148
+
1149
+ 288
1150
+ 00:23:12,000 --> 00:23:18,000
1151
+ The demo file number two that you can find in attachments to the lesson is recorded in the Russian language
1152
+
1153
+ 289
1154
+ 00:23:19,000 --> 00:23:26,000
1155
+ and if you would select it for transcription and send request, then you would see that language is
1156
+
1157
+ 290
1158
+ 00:23:26,000 --> 00:23:31,000
1159
+ auto detected and transcript is in the original language.
1160
+
1161
+ 291
1162
+ 00:23:31,000 --> 00:23:33,000
1163
+ That's amazing, don't you think so?
1164
+
1165
+ 292
1166
+ 00:23:34,000 --> 00:23:37,000
1167
+ And the quality of transcription is really high.
1168
+
1169
+ 293
1170
+ 00:23:38,000 --> 00:23:42,000
1171
+ Let's review other attributes that we have available for this endpoint.
1172
+
1173
+ 294
1174
+ 00:23:42,000 --> 00:23:43,000
1175
+ Prompt.
1176
+
1177
+ 295
1178
+ 00:23:43,000 --> 00:23:47,000
1179
+ You can use prompt to improve the quality of transcripts.
1180
+
1181
+ 296
1182
+ 00:23:47,000 --> 00:23:53,000
1183
+ Important thing to mention here is that prompt should be written in the same language as audio.
1184
+
1185
+ 297
1186
+ 00:23:53,000 --> 00:24:01,000
1187
+ The model adapts its style based on the provided prompt, including capitalization and punctuation.
1188
+
1189
+ 298
1190
+ 00:24:01,000 --> 00:24:08,000
1191
+ When you provide a prompt, the model adjusts its style to match, including factors like capitalization
1192
+
1193
+ 299
1194
+ 00:24:08,000 --> 00:24:09,000
1195
+ and punctuation.
1196
+
1197
+ 300
1198
+ 00:24:10,000 --> 00:24:16,000
1199
+ Note that the prompting system in whisper is more limited compared to other language models.
1200
+
1201
+ 301
1202
+ 00:24:16,000 --> 00:24:20,000
1203
+ It is not just GPT model and you need to consider this limitation.
1204
+
1205
+ 302
1206
+ 00:24:20,000 --> 00:24:27,000
1207
+ Despite its limitations, prompts offer valuable advantages for refining transcriptions.
1208
+
1209
+ 303
1210
+ 00:24:27,000 --> 00:24:32,000
1211
+ Let's review some examples when you may need to use, prompting for transcription.
1212
+
1213
+ 304
1214
+ 00:24:32,000 --> 00:24:35,000
1215
+ Correcting Misrecognized words.
1216
+
1217
+ 305
1218
+ 00:24:36,000 --> 00:24:39,000
1219
+ Use prompts to address specific mis recognitions.
1220
+
1221
+ 306
1222
+ 00:24:39,000 --> 00:24:48,000
1223
+ For example, the Li or GPT four Just specify to help the model understand the sound better and transcript
1224
+
1225
+ 307
1226
+ 00:24:48,000 --> 00:24:52,000
1227
+ it with higher quality context preservation.
1228
+
1229
+ 308
1230
+ 00:24:52,000 --> 00:24:57,000
1231
+ Maintain context when dealing with segmented audio files.
1232
+
1233
+ 309
1234
+ 00:24:57,000 --> 00:25:04,000
1235
+ We already discussed limitations and I believe you can understand that in case that single audio file
1236
+
1237
+ 310
1238
+ 00:25:04,000 --> 00:25:12,000
1239
+ was segmented into multiple files, there is a risk of losing context of what was said in the previous
1240
+
1241
+ 311
1242
+ 00:25:12,000 --> 00:25:12,000
1243
+ transcription.
1244
+
1245
+ 312
1246
+ 00:25:13,000 --> 00:25:18,000
1247
+ To improve this, we can pass prompt with a transcript of the preceding segment.
1248
+
1249
+ 313
1250
+ 00:25:19,000 --> 00:25:23,000
1251
+ Model considers the final 224 tokens of the prompt.
1252
+
1253
+ 314
1254
+ 00:25:24,000 --> 00:25:25,000
1255
+ Punctuation.
1256
+
1257
+ 315
1258
+ 00:25:25,000 --> 00:25:29,000
1259
+ Sometimes during the transcription model can skip punctuation.
1260
+
1261
+ 316
1262
+ 00:25:29,000 --> 00:25:37,000
1263
+ To ensure proper punctuation, you need just submit simple prompt with punctuation marks as simple as
1264
+
1265
+ 317
1266
+ 00:25:37,000 --> 00:25:39,000
1267
+ Hello comma.
1268
+
1269
+ 318
1270
+ 00:25:39,000 --> 00:25:41,000
1271
+ Welcome to my lecture point.
1272
+
1273
+ 319
1274
+ 00:25:43,000 --> 00:25:50,000
1275
+ Retained filler words model can skip some common filler words, but if you want to keep them in the
1276
+
1277
+ 320
1278
+ 00:25:50,000 --> 00:25:55,000
1279
+ transcript, you need just to use prompt that contains these filler words.
1280
+
1281
+ 321
1282
+ 00:25:55,000 --> 00:25:57,000
1283
+ For example.
1284
+
1285
+ 322
1286
+ 00:25:57,000 --> 00:26:00,000
1287
+ Um, let me think like, Hmm.
1288
+
1289
+ 323
1290
+ 00:26:00,000 --> 00:26:05,000
1291
+ Okay, here is what I'm like thinking.
1292
+
1293
+ 324
1294
+ 00:26:06,000 --> 00:26:07,000
1295
+ Language style.
1296
+
1297
+ 325
1298
+ 00:26:07,000 --> 00:26:14,000
1299
+ Certain languages can have variations in writing styles like simplified and traditional Chinese.
1300
+
1301
+ 326
1302
+ 00:26:14,000 --> 00:26:20,000
1303
+ The model may not consistently adapt the desired writing style for your transcript by default.
1304
+
1305
+ 327
1306
+ 00:26:20,000 --> 00:26:25,000
1307
+ You can improve this by using a prompt in your preferred writing style.
1308
+
1309
+ 328
1310
+ 00:26:25,000 --> 00:26:28,000
1311
+ Let's continue review of other attributes.
1312
+
1313
+ 329
1314
+ 00:26:28,000 --> 00:26:35,000
1315
+ So far we learned and reviewed response format and prompt temperature attribute is a similar one to
1316
+
1317
+ 330
1318
+ 00:26:35,000 --> 00:26:37,000
1319
+ other language models.
1320
+
1321
+ 331
1322
+ 00:26:37,000 --> 00:26:42,000
1323
+ In simple words, it impacts randomness of transcription.
1324
+
1325
+ 332
1326
+ 00:26:42,000 --> 00:26:50,000
1327
+ When you usually do transcription, randomness or creativity, it is not something what you are looking
1328
+
1329
+ 333
1330
+ 00:26:50,000 --> 00:26:50,000
1331
+ for.
1332
+
1333
+ 334
1334
+ 00:26:50,000 --> 00:26:51,000
1335
+ Agree.
1336
+
1337
+ 335
1338
+ 00:26:51,000 --> 00:26:58,000
1339
+ That's why I personally myself don't use this attribute too often for transcription cases, but you
1340
+
1341
+ 336
1342
+ 00:26:58,000 --> 00:27:01,000
1343
+ can consider it for your business case if you wish.
1344
+
1345
+ 337
1346
+ 00:27:02,000 --> 00:27:06,000
1347
+ And the last attribute here in the list is the language attribute.
1348
+
1349
+ 338
1350
+ 00:27:06,000 --> 00:27:11,000
1351
+ This attribute is used to tell model what language is used in audio.
1352
+
1353
+ 339
1354
+ 00:27:11,000 --> 00:27:15,000
1355
+ You can describe language via two letter code.
1356
+
1357
+ 340
1358
+ 00:27:15,000 --> 00:27:19,000
1359
+ According to the ISO standard 639 one.
1360
+
1361
+ 341
1362
+ 00:27:19,000 --> 00:27:21,000
1363
+ Basically that's it.
1364
+
1365
+ 342
1366
+ 00:27:21,000 --> 00:27:22,000
1367
+ Regarding transcription.
1368
+
1369
+ 343
1370
+ 00:27:22,000 --> 00:27:30,000
1371
+ Now, when you know API, you can use this API with any programming language and built in this functionality
1372
+
1373
+ 344
1374
+ 00:27:30,000 --> 00:27:33,000
1375
+ into your business case scenario and business flow.
1376
+
1377
+ 345
1378
+ 00:27:34,000 --> 00:27:39,000
1379
+ Let's now review translation feature and API for translation.
1380
+
1381
+ 346
1382
+ 00:27:39,000 --> 00:27:47,000
1383
+ As you already learned, translation API has its own limitations, and one of its limitations is that
1384
+
1385
+ 347
1386
+ 00:27:47,000 --> 00:27:50,000
1387
+ it translates only into English.
1388
+
1389
+ 348
1390
+ 00:27:50,000 --> 00:27:55,000
1391
+ So I need to have audio file with the speech in another language.
1392
+
1393
+ 349
1394
+ 00:27:55,000 --> 00:28:01,000
1395
+ So that's why you need to download another audio file for the following example.
1396
+
1397
+ 350
1398
+ 00:28:01,000 --> 00:28:08,000
1399
+ The second audio file that you can find in attachments contains my voice speaking in Russian, and we
1400
+
1401
+ 351
1402
+ 00:28:08,000 --> 00:28:15,000
1403
+ want to use Whisper model in order to get translation of what was said in the audio in the Postman collection
1404
+
1405
+ 352
1406
+ 00:28:15,000 --> 00:28:16,000
1407
+ that I have shared with you.
1408
+
1409
+ 353
1410
+ 00:28:16,000 --> 00:28:20,000
1411
+ You can find another request that is called translation.
1412
+
1413
+ 354
1414
+ 00:28:21,000 --> 00:28:24,000
1415
+ You can open it or create a new one from scratch.
1416
+
1417
+ 355
1418
+ 00:28:25,000 --> 00:28:27,000
1419
+ The URL is different.
1420
+
1421
+ 356
1422
+ 00:28:27,000 --> 00:28:30,000
1423
+ I send request to translations resource.
1424
+
1425
+ 357
1426
+ 00:28:31,000 --> 00:28:36,000
1427
+ I also change file in order to select file where I speak in Russian.
1428
+
1429
+ 358
1430
+ 00:28:36,000 --> 00:28:43,000
1431
+ In the model attribute I leave Whisper one because OpenAI has just one model for speech to text so far
1432
+
1433
+ 359
1434
+ 00:28:43,000 --> 00:28:45,000
1435
+ and for response format.
1436
+
1437
+ 360
1438
+ 00:28:45,000 --> 00:28:51,000
1439
+ I would add text value just to remind you that the response format is optional.
1440
+
1441
+ 361
1442
+ 00:28:51,000 --> 00:28:54,000
1443
+ All other configurations are similar.
1444
+
1445
+ 362
1446
+ 00:28:54,000 --> 00:29:00,000
1447
+ I mean, you need also to specify authorization header and content type header in the similar way like
1448
+
1449
+ 363
1450
+ 00:29:00,000 --> 00:29:02,000
1451
+ we configured in the previous example.
1452
+
1453
+ 364
1454
+ 00:29:03,000 --> 00:29:09,000
1455
+ So we are ready to send the request and in response I receive a translated text.
1456
+
1457
+ 365
1458
+ 00:29:09,000 --> 00:29:10,000
1459
+ Amazing.
1460
+
1461
+ 366
1462
+ 00:29:10,000 --> 00:29:12,000
1463
+ Looks really cool.
1464
+
1465
+ 367
1466
+ 00:29:12,000 --> 00:29:16,000
1467
+ I can confirm that translation is absolutely correct.
1468
+
1469
+ 368
1470
+ 00:29:16,000 --> 00:29:24,000
1471
+ So with Whisper model we receive an amazing helper in audio translation and you can use this API inside
1472
+
1473
+ 369
1474
+ 00:29:24,000 --> 00:29:26,000
1475
+ your applications.
1476
+
1477
+ 370
1478
+ 00:29:27,000 --> 00:29:32,000
1479
+ Regarding additional attributes and customization, I can say that there are no specific attributes
1480
+
1481
+ 371
1482
+ 00:29:32,000 --> 00:29:35,000
1483
+ besides the ones we already reviewed.
1484
+
1485
+ 372
1486
+ 00:29:35,000 --> 00:29:39,000
1487
+ Response format prompt that should be in English.
1488
+
1489
+ 373
1490
+ 00:29:39,000 --> 00:29:42,000
1491
+ And this is the difference attention.
1492
+
1493
+ 374
1494
+ 00:29:42,000 --> 00:29:50,000
1495
+ Because if you remember in transcription API prompt should match the audio language and in translation
1496
+
1497
+ 375
1498
+ 00:29:50,000 --> 00:29:52,000
1499
+ API it should be in English.
1500
+
1501
+ 376
1502
+ 00:29:53,000 --> 00:29:56,000
1503
+ And temperature attribute that is also already familiar to you.
1504
+
1505
+ 377
1506
+ 00:29:57,000 --> 00:30:00,000
1507
+ Basically, that's all what I wanted to share with you in this lesson.
1508
+
1509
+ 378
1510
+ 00:30:00,000 --> 00:30:07,000
1511
+ And just to remind you that in case you have any questions, please let me know below this video.
1512
+
1513
+ 379
1514
+ 00:30:07,000 --> 00:30:11,000
1515
+ Now let's recap what we have learned in this video.
1516
+
1517
+ 380
1518
+ 00:30:12,000 --> 00:30:15,000
1519
+ We learned what an OpenAI whisper model is.
1520
+
1521
+ 381
1522
+ 00:30:15,000 --> 00:30:20,000
1523
+ I explained its key features, reviewed business use cases.
1524
+
1525
+ 382
1526
+ 00:30:20,000 --> 00:30:27,000
1527
+ Also, I explained you limitations of the models that you need to be aware about and consider when you
1528
+
1529
+ 383
1530
+ 00:30:27,000 --> 00:30:28,000
1531
+ work with Whisper.
1532
+
1533
+ 384
1534
+ 00:30:28,000 --> 00:30:35,000
1535
+ Together we learned API documentation of Whisper model and we saw practical examples of transcription
1536
+
1537
+ 385
1538
+ 00:30:35,000 --> 00:30:37,000
1539
+ and translation.
1540
+
1541
+ 386
1542
+ 00:30:37,000 --> 00:30:42,000
1543
+ I hope you liked this lesson and that it was interesting for you.
1544
+
1545
+ 387
1546
+ 00:30:42,000 --> 00:30:44,000
1547
+ Thanks a lot for your attention.
1548
+
1549
+ 388
1550
+ 00:30:44,000 --> 00:30:47,000
1551
+ I wish you a great day and see you in the next lesson.
1552
+