openai_101 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.releaserc.json +1 -1
  3. data/.rubocop.yml +24 -7
  4. data/.tool-versions +1 -1
  5. data/CHANGELOG.md +11 -4
  6. data/README.md +65 -41
  7. data/bin/automate-chatgpt.js +60 -0
  8. data/bin/automate-midjourney.js +75 -0
  9. data/bin/convert_webp_to_png.rb +86 -0
  10. data/bin/gpt_context_gatherer.rb +63 -0
  11. data/course/course.md +64 -0
  12. data/course/images/beautiful-llm-models.png +0 -0
  13. data/course/images/prompts/beautiful-llm-models.txt +1 -0
  14. data/course/images/prompts/series-2-appydave-gpt-summit.txt +1 -0
  15. data/course/images/series-2-appydave-gpt-summit.png +0 -0
  16. data/gpt-context/openai-documentation.md +498 -0
  17. data/gpt-context/ruby-openai-documenation.md +747 -0
  18. data/gpt-context/theme-prompts.csv +21 -0
  19. data/lib/openai_101/config/openai.rb +15 -0
  20. data/lib/openai_101/tools/automate-images-chatgpt.js +60 -0
  21. data/lib/openai_101/tools/automate-images-midjourney.js +75 -0
  22. data/lib/openai_101/tools/bulk_image_bot/base_automator.js +53 -0
  23. data/lib/openai_101/tools/bulk_image_bot/chatgpt_automator.js +27 -0
  24. data/lib/openai_101/tools/bulk_image_bot/midjourney_automator.js +49 -0
  25. data/lib/openai_101/tools/clean_ruby_errors.rb +274 -0
  26. data/lib/openai_101/tools/edl_to_chapters.rb +56 -0
  27. data/lib/openai_101/tools/file_content_gatherer.rb +36 -0
  28. data/lib/openai_101/tools/webp_to_png.rb +124 -0
  29. data/lib/openai_101/version.rb +1 -1
  30. data/lib/openai_101.rb +11 -0
  31. data/package-lock.json +1432 -2271
  32. data/package.json +5 -2
  33. metadata +89 -11
  34. data/.builders/_.rb +0 -1
  35. data/.builders/boot.rb +0 -39
  36. data/.builders/generators/01-bootstrap.rb +0 -135
data/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "openai_101",
3
- "version": "0.2.0",
4
- "description": "OpenAI 101 working through the API endpoints",
3
+ "version": "1.0.0",
4
+ "description": "OpenAI 101 Series on using OpenAI ChatGPT, DALL·E, and other OpenAI endpoints",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
7
7
  },
8
+ "dependencies": {},
8
9
  "devDependencies": {
10
+ "commander": "^10.0.1",
11
+ "robotjs": "^0.6.0",
9
12
  "@klueless-js/semantic-release-rubygem": "github:klueless-js/semantic-release-rubygem",
10
13
  "@semantic-release/changelog": "^6.0.3",
11
14
  "@semantic-release/git": "^10.0.1",
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openai_101
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-19 00:00:00.000000000 Z
11
+ date: 2024-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: clipboard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: dotenv
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2'
13
41
  - !ruby/object:Gem::Dependency
14
42
  name: k_log
15
43
  requirement: !ruby/object:Gem::Requirement
@@ -24,16 +52,42 @@ dependencies:
24
52
  - - "~>"
25
53
  - !ruby/object:Gem::Version
26
54
  version: '0'
27
- description: " OpenAI 101 working through the API endpoints\n"
55
+ - !ruby/object:Gem::Dependency
56
+ name: mini_magick
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '4'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '4'
69
+ - !ruby/object:Gem::Dependency
70
+ name: ruby-openai
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '6'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '6'
83
+ description: " OpenAI 101 Series on using OpenAI ChatGPT, DALL·E, and other OpenAI
84
+ endpoints\n"
28
85
  email:
29
86
  - david@ideasmen.com.au
30
87
  executables: []
31
88
  extensions: []
32
89
  extra_rdoc_files: []
33
90
  files:
34
- - ".builders/_.rb"
35
- - ".builders/boot.rb"
36
- - ".builders/generators/01-bootstrap.rb"
37
91
  - ".releaserc.json"
38
92
  - ".rspec"
39
93
  - ".rubocop.yml"
@@ -45,9 +99,31 @@ files:
45
99
  - LICENSE.txt
46
100
  - README.md
47
101
  - Rakefile
102
+ - bin/automate-chatgpt.js
103
+ - bin/automate-midjourney.js
48
104
  - bin/console
105
+ - bin/convert_webp_to_png.rb
106
+ - bin/gpt_context_gatherer.rb
49
107
  - bin/setup
108
+ - course/course.md
109
+ - course/images/beautiful-llm-models.png
110
+ - course/images/prompts/beautiful-llm-models.txt
111
+ - course/images/prompts/series-2-appydave-gpt-summit.txt
112
+ - course/images/series-2-appydave-gpt-summit.png
113
+ - gpt-context/openai-documentation.md
114
+ - gpt-context/ruby-openai-documenation.md
115
+ - gpt-context/theme-prompts.csv
50
116
  - lib/openai_101.rb
117
+ - lib/openai_101/config/openai.rb
118
+ - lib/openai_101/tools/automate-images-chatgpt.js
119
+ - lib/openai_101/tools/automate-images-midjourney.js
120
+ - lib/openai_101/tools/bulk_image_bot/base_automator.js
121
+ - lib/openai_101/tools/bulk_image_bot/chatgpt_automator.js
122
+ - lib/openai_101/tools/bulk_image_bot/midjourney_automator.js
123
+ - lib/openai_101/tools/clean_ruby_errors.rb
124
+ - lib/openai_101/tools/edl_to_chapters.rb
125
+ - lib/openai_101/tools/file_content_gatherer.rb
126
+ - lib/openai_101/tools/webp_to_png.rb
51
127
  - lib/openai_101/version.rb
52
128
  - package-lock.json
53
129
  - package.json
@@ -57,10 +133,12 @@ licenses:
57
133
  - MIT
58
134
  metadata:
59
135
  homepage_uri: http://appydave.com/gems/openai_101
60
- source_code_uri: https://github.com/appydave/openai_101
61
- changelog_uri: https://github.com/appydave/openai_101/blob/main/CHANGELOG.md
136
+ source_code_uri: https://github.com/klueless-io/openai_101
137
+ changelog_uri: https://github.com/klueless-io/openai_101/blob/main/CHANGELOG.md
62
138
  rubygems_mfa_required: 'true'
63
- post_install_message:
139
+ post_install_message: Remember to run 'npm install' in the gem directory to install
140
+ JavaScript dependencies. These are optional command line tools that can be helpful
141
+ but not required
64
142
  rdoc_options: []
65
143
  require_paths:
66
144
  - lib
@@ -68,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
146
  requirements:
69
147
  - - ">="
70
148
  - !ruby/object:Gem::Version
71
- version: '3.0'
149
+ version: '3.2'
72
150
  required_rubygems_version: !ruby/object:Gem::Requirement
73
151
  requirements:
74
152
  - - ">="
@@ -78,5 +156,5 @@ requirements: []
78
156
  rubygems_version: 3.3.5
79
157
  signing_key:
80
158
  specification_version: 4
81
- summary: OpenAI 101 working through the API endpoints
159
+ summary: OpenAI 101 Series on using OpenAI ChatGPT, DALL·E, and other OpenAI endpoints
82
160
  test_files: []
data/.builders/_.rb DELETED
@@ -1 +0,0 @@
1
- # require_relative './path/here'
data/.builders/boot.rb DELETED
@@ -1,39 +0,0 @@
1
- # Boot Sequence
2
-
3
- include KLog::Logging
4
-
5
- CONFIG_KEY = :openai_101
6
-
7
- log.kv 'working folder', Dir.pwd
8
-
9
- KConfig.configure do |config|
10
- config.handlebars.defaults.add_all_defaults
11
- end
12
-
13
- def k_builder
14
- @k_builder ||= KBuilder::BaseBuilder.init(KConfig.configuration(CONFIG_KEY))
15
- end
16
-
17
- KConfig.configure(CONFIG_KEY) do |config|
18
- builder_folder = Dir.pwd
19
- base_folder = File.expand_path('../', builder_folder)
20
- global_template = File.expand_path('~/dev/kgems/k_templates/templates')
21
-
22
- config.template_folders.add(:global_template , global_template)
23
- config.template_folders.add(:template , File.expand_path('.templates', Dir.pwd))
24
-
25
- config.target_folders.add(:app , base_folder)
26
- config.target_folders.add(:builder , builder_folder)
27
- end
28
-
29
- KConfig.configuration(CONFIG_KEY).debug
30
-
31
- area = KManager.add_area(CONFIG_KEY)
32
- resource_manager = area.resource_manager
33
- resource_manager
34
- .fileset
35
- .glob('*.rb', exclude: ['boot.rb'])
36
- .glob('generators/**/*.rb')
37
- resource_manager.add_resources
38
-
39
- KManager.boot
@@ -1,135 +0,0 @@
1
- KManager.action :bootstrap do
2
- action do
3
- application_name = :openai_101
4
-
5
- # Ruby Gem Bootstrap
6
- director = KDirector::Dsls::RubyGemDsl
7
- .init(k_builder,
8
- on_exist: :skip, # %i[skip write compare]
9
- on_action: :queue # %i[queue execute]
10
- )
11
- .data(
12
- ruby_version: '3.0',
13
- application: application_name,
14
- application_description: 'OpenAI 101 working through the API endpoints',
15
- application_lib_path: application_name.to_s, # need a specialized handlebars helper to turn this into a path, e.g ps-common => ps/common
16
- application_lib_namespace: 'Openai101',
17
- namespaces: ['Openai101'],
18
- author: 'David Cruwys',
19
- author_email: 'david@ideasmen.com.au',
20
- initial_semver: '0.0.1',
21
- main_story: 'As a Developer, I want to understand openai/chatgpt APIs, so that I can build AI applications effectively',
22
- copyright_date: '2024',
23
- website: 'http://appydave.com/gems/openai_101'
24
- )
25
- .github(
26
- active: false,
27
- repo_name: application_name,
28
- organization: 'appydave'
29
- ) do
30
- create_repository
31
- # delete_repository
32
- # list_repositories
33
- open_repository
34
- # run_command('git init')
35
- end
36
- .blueprint(
37
- active: false,
38
- name: :bin_hook,
39
- description: 'initialize repository',
40
- on_exist: :write) do
41
-
42
- cd(:app)
43
-
44
- run_template_script('bin/runonce/git-setup.sh', dom: dom)
45
-
46
- add('.githooks/commit-msg').run_command('chmod +x .githooks/commit-msg')
47
- add('.githooks/pre-commit').run_command('chmod +x .githooks/pre-commit')
48
-
49
- add('.gitignore')
50
-
51
- run_command('git config core.hooksPath .githooks') # enable sharable githooks (developer needs to turn this on before editing rep)
52
-
53
- run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
54
- run_command("gh repo edit -d \"#{dom[:application_description]}\"")
55
- end
56
- .package_json(
57
- active: false,
58
- name: :package_json,
59
- description: 'Set up the package.json file for semantic versioning'
60
- ) do
61
- self
62
- .add('package.json', dom: dom)
63
- .play_actions
64
-
65
- self
66
- .add_script('release', 'semantic-release')
67
- .sort
68
- .development
69
- .npm_add_group('semver-ruby')
70
-
71
- run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
72
- end
73
- .blueprint(
74
- active: false,
75
- name: :opinionated,
76
- description: 'opinionated GEM files',
77
- on_exist: :write) do
78
-
79
- cd(:app)
80
-
81
- add('bin/setup')
82
- add('bin/console')
83
-
84
- applet_path = typed_dom.namespaces.map { |ns| ns.downcase }.join('/')
85
-
86
- add("lib/#{applet_path}.rb" , template_file: 'lib/applet_name.rb' , dom: dom)
87
- add("lib/#{applet_path}/version.rb" , template_file: 'lib/applet_name/version.rb' , dom: dom)
88
-
89
- add('spec/spec_helper.rb')
90
- add("spec/#{applet_path}_spec.rb" , template_file: 'spec/applet_name_spec.rb', dom: dom)
91
-
92
- add("#{typed_dom.application}.gemspec" , template_file: 'applet_name.gemspec', dom: dom)
93
- add('Gemfile', dom: dom)
94
- add('Guardfile', dom: dom)
95
- add('Rakefile', dom: dom)
96
- add('.rspec', dom: dom)
97
- add('.rubocop.yml', dom: dom)
98
- add('README.md', dom: dom)
99
- add('CODE_OF_CONDUCT.md', dom: dom)
100
- add('LICENSE.txt', dom: dom)
101
-
102
- run_command("rubocop -a")
103
-
104
- run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
105
- end
106
- .blueprint(
107
- active: true,
108
- name: :ci_cd,
109
- description: 'github actions (CI/CD)',
110
- on_exist: :write) do
111
-
112
- cd(:app)
113
-
114
- # run_command("gh secret set SLACK_WEBHOOK --body \"$SLACK_REPO_WEBHOOK\"")
115
- run_command("gh secret set GEM_HOST_API_KEY --body \"$GEM_HOST_API_KEY\"")
116
-
117
- add('.github/workflows/main.yml')
118
- add('.releaserc.json')
119
-
120
- run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
121
- end
122
-
123
- director.play_actions
124
- # director.builder.logit
125
- end
126
- end
127
-
128
- KManager.opts.app_name = 'openai_101'
129
- KManager.opts.sleep = 2
130
- KManager.opts.reboot_on_kill = 0
131
- KManager.opts.reboot_sleep = 4
132
- KManager.opts.exception_style = :short
133
- KManager.opts.show.time_taken = true
134
- KManager.opts.show.finished = true
135
- KManager.opts.show.finished_message = 'FINISHED :)'