openai_101 0.0.2 → 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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +20 -1
  3. data/CHANGELOG.md +14 -0
  4. data/README.md +63 -39
  5. data/bin/automate-chatgpt.js +60 -0
  6. data/bin/automate-midjourney.js +75 -0
  7. data/bin/convert_webp_to_png.rb +86 -0
  8. data/bin/gpt_context_gatherer.rb +63 -0
  9. data/course/course.md +64 -0
  10. data/course/images/beautiful-llm-models.png +0 -0
  11. data/course/images/prompts/beautiful-llm-models.txt +1 -0
  12. data/course/images/prompts/series-2-appydave-gpt-summit.txt +1 -0
  13. data/course/images/series-2-appydave-gpt-summit.png +0 -0
  14. data/gpt-context/openai-documentation.md +498 -0
  15. data/gpt-context/ruby-openai-documenation.md +747 -0
  16. data/gpt-context/theme-prompts.csv +21 -0
  17. data/lib/openai_101/config/openai.rb +15 -0
  18. data/lib/openai_101/tools/automate-images-chatgpt.js +60 -0
  19. data/lib/openai_101/tools/automate-images-midjourney.js +75 -0
  20. data/lib/openai_101/tools/bulk_image_bot/base_automator.js +53 -0
  21. data/lib/openai_101/tools/bulk_image_bot/chatgpt_automator.js +27 -0
  22. data/lib/openai_101/tools/bulk_image_bot/midjourney_automator.js +49 -0
  23. data/lib/openai_101/tools/clean_ruby_errors.rb +274 -0
  24. data/lib/openai_101/tools/edl_to_chapters.rb +56 -0
  25. data/lib/openai_101/tools/file_content_gatherer.rb +36 -0
  26. data/lib/openai_101/tools/webp_to_png.rb +124 -0
  27. data/lib/openai_101/version.rb +1 -1
  28. data/lib/openai_101.rb +9 -0
  29. data/package-lock.json +1154 -159
  30. data/package.json +4 -1
  31. metadata +83 -6
  32. data/.builders/_.rb +0 -1
  33. data/.builders/boot.rb +0 -39
  34. data/.builders/generators/01-bootstrap.rb +0 -134
data/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "openai_101",
3
- "version": "0.0.2",
3
+ "version": "1.0.0",
4
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.0.2
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-02-08 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,6 +52,34 @@ dependencies:
24
52
  - - "~>"
25
53
  - !ruby/object:Gem::Version
26
54
  version: '0'
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'
27
83
  description: " OpenAI 101 Series on using OpenAI ChatGPT, DALL·E, and other OpenAI
28
84
  endpoints\n"
29
85
  email:
@@ -32,9 +88,6 @@ executables: []
32
88
  extensions: []
33
89
  extra_rdoc_files: []
34
90
  files:
35
- - ".builders/_.rb"
36
- - ".builders/boot.rb"
37
- - ".builders/generators/01-bootstrap.rb"
38
91
  - ".releaserc.json"
39
92
  - ".rspec"
40
93
  - ".rubocop.yml"
@@ -46,9 +99,31 @@ files:
46
99
  - LICENSE.txt
47
100
  - README.md
48
101
  - Rakefile
102
+ - bin/automate-chatgpt.js
103
+ - bin/automate-midjourney.js
49
104
  - bin/console
105
+ - bin/convert_webp_to_png.rb
106
+ - bin/gpt_context_gatherer.rb
50
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
51
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
52
127
  - lib/openai_101/version.rb
53
128
  - package-lock.json
54
129
  - package.json
@@ -61,7 +136,9 @@ metadata:
61
136
  source_code_uri: https://github.com/klueless-io/openai_101
62
137
  changelog_uri: https://github.com/klueless-io/openai_101/blob/main/CHANGELOG.md
63
138
  rubygems_mfa_required: 'true'
64
- 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
65
142
  rdoc_options: []
66
143
  require_paths:
67
144
  - lib
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,134 +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.2',
13
- application: application_name,
14
- application_description: 'OpenAI 101 Series on using OpenAI ChatGPT, DALL·E, and other OpenAI 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 software developer, I want to understand OpenAI endpoints and capabilities, so that I can use ChatGPT 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
- ) do
29
- create_repository
30
- # delete_repository
31
- # list_repositories
32
- open_repository
33
- # run_command('git init')
34
- end
35
- .blueprint(
36
- active: false,
37
- name: :bin_hook,
38
- description: 'initialize repository',
39
- on_exist: :write) do
40
-
41
- cd(:app)
42
-
43
- run_template_script('bin/runonce/git-setup.sh', dom: dom)
44
-
45
- add('.githooks/commit-msg').run_command('chmod +x .githooks/commit-msg')
46
- add('.githooks/pre-commit').run_command('chmod +x .githooks/pre-commit')
47
-
48
- add('.gitignore')
49
-
50
- run_command('git config core.hooksPath .githooks') # enable sharable githooks (developer needs to turn this on before editing rep)
51
-
52
- run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
53
- run_command("gh repo edit -d \"#{dom[:application_description]}\"")
54
- end
55
- .package_json(
56
- active: false,
57
- name: :package_json,
58
- description: 'Set up the package.json file for semantic versioning'
59
- ) do
60
- self
61
- .add('package.json', dom: dom)
62
- .play_actions
63
-
64
- self
65
- .add_script('release', 'semantic-release')
66
- .sort
67
- .development
68
- .npm_add_group('semver-ruby')
69
-
70
- run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
71
- end
72
- .blueprint(
73
- active: false,
74
- name: :opinionated,
75
- description: 'opinionated GEM files',
76
- on_exist: :write) do
77
-
78
- cd(:app)
79
-
80
- add('bin/setup')
81
- add('bin/console')
82
-
83
- applet_path = typed_dom.namespaces.map { |ns| ns.downcase }.join('/')
84
-
85
- add("lib/#{applet_path}.rb" , template_file: 'lib/applet_name.rb' , dom: dom)
86
- add("lib/#{applet_path}/version.rb" , template_file: 'lib/applet_name/version.rb' , dom: dom)
87
-
88
- add('spec/spec_helper.rb')
89
- add("spec/#{applet_path}_spec.rb" , template_file: 'spec/applet_name_spec.rb', dom: dom)
90
-
91
- add("#{typed_dom.application}.gemspec" , template_file: 'applet_name.gemspec', dom: dom)
92
- add('Gemfile', dom: dom)
93
- add('Guardfile', dom: dom)
94
- add('Rakefile', dom: dom)
95
- add('.rspec', dom: dom)
96
- add('.rubocop.yml', dom: dom)
97
- add('README.md', dom: dom)
98
- add('CODE_OF_CONDUCT.md', dom: dom)
99
- add('LICENSE.txt', dom: dom)
100
-
101
- run_command("rubocop -a")
102
-
103
- run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
104
- end
105
- .blueprint(
106
- active: true,
107
- name: :ci_cd,
108
- description: 'github actions (CI/CD)',
109
- on_exist: :write) do
110
-
111
- cd(:app)
112
-
113
- # run_command("gh secret set SLACK_WEBHOOK --body \"$SLACK_REPO_WEBHOOK\"")
114
- run_command("gh secret set GEM_HOST_API_KEY --body \"$GEM_HOST_API_KEY\"")
115
-
116
- add('.github/workflows/main.yml')
117
- add('.releaserc.json')
118
-
119
- run_command("git add .; git commit -m 'chore: #{self.options.description.downcase}'; git push")
120
- end
121
-
122
- director.play_actions
123
- # director.builder.logit
124
- end
125
- end
126
-
127
- KManager.opts.app_name = 'openai_101'
128
- KManager.opts.sleep = 2
129
- KManager.opts.reboot_on_kill = 0
130
- KManager.opts.reboot_sleep = 4
131
- KManager.opts.exception_style = :short
132
- KManager.opts.show.time_taken = true
133
- KManager.opts.show.finished = true
134
- KManager.opts.show.finished_message = 'FINISHED :)'