open_ai_bot 0.3.13 → 0.3.14
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.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +29 -29
- data/lib/config_menu.rb +6 -0
- data/lib/open_ai_bot.rb +6 -2
- data/open_ai_bot.gemspec +2 -2
- metadata +7 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8cd505f315356f84815d0e2a48539fc966eb264b1f9b4a125e8f5dcd3755986
|
|
4
|
+
data.tar.gz: 9aaff87b8fd2c63c6d246bd523716363853fbae2576bb21e2d39a2a507bc91f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a9a7fd439e29972d85b6c8e8e21e966133b234f04ad305d9d53b25ec1c43854304c65d3059d1712d3e4682b1f98eba54c28dd62c60f4c302a3ce72383e0b722d
|
|
7
|
+
data.tar.gz: b28e171691c27bbcebaac8234e25f9f8fd81cdca4fcf8287b4a9a6ef2a492e7911a98a5032e0dfeb37006d0f7a4a5f386308f97b6aa8502a258ddcc30d96ab48
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.4.8
|
data/Gemfile.lock
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: https://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
addressable (2.8.
|
|
5
|
-
public_suffix (>= 2.0.2, <
|
|
6
|
-
async (2.
|
|
4
|
+
addressable (2.8.8)
|
|
5
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
6
|
+
async (2.35.1)
|
|
7
7
|
console (~> 1.29)
|
|
8
8
|
fiber-annotation
|
|
9
9
|
io-event (~> 1.11)
|
|
10
10
|
metrics (~> 0.12)
|
|
11
|
-
traces (~> 0.
|
|
12
|
-
bigdecimal (
|
|
13
|
-
concurrent-ruby (1.3.
|
|
14
|
-
console (1.
|
|
11
|
+
traces (~> 0.18)
|
|
12
|
+
bigdecimal (4.0.1)
|
|
13
|
+
concurrent-ruby (1.3.6)
|
|
14
|
+
console (1.34.2)
|
|
15
15
|
fiber-annotation
|
|
16
16
|
fiber-local (~> 1.1)
|
|
17
17
|
json
|
|
18
18
|
down (5.4.2)
|
|
19
19
|
addressable (~> 2.8)
|
|
20
|
-
dry-core (1.
|
|
20
|
+
dry-core (1.2.0)
|
|
21
21
|
concurrent-ruby (~> 1.0)
|
|
22
22
|
logger
|
|
23
23
|
zeitwerk (~> 2.6)
|
|
24
|
-
dry-inflector (1.
|
|
24
|
+
dry-inflector (1.3.0)
|
|
25
25
|
dry-logic (1.6.0)
|
|
26
26
|
bigdecimal
|
|
27
27
|
concurrent-ruby (~> 1.0)
|
|
@@ -32,50 +32,50 @@ GEM
|
|
|
32
32
|
dry-types (~> 1.8, >= 1.8.2)
|
|
33
33
|
ice_nine (~> 0.11)
|
|
34
34
|
zeitwerk (~> 2.6)
|
|
35
|
-
dry-types (1.
|
|
36
|
-
bigdecimal (
|
|
35
|
+
dry-types (1.9.0)
|
|
36
|
+
bigdecimal (>= 3.0)
|
|
37
37
|
concurrent-ruby (~> 1.0)
|
|
38
38
|
dry-core (~> 1.0)
|
|
39
39
|
dry-inflector (~> 1.0)
|
|
40
40
|
dry-logic (~> 1.4)
|
|
41
41
|
zeitwerk (~> 2.6)
|
|
42
42
|
event_stream_parser (1.0.0)
|
|
43
|
-
faraday (2.
|
|
43
|
+
faraday (2.14.0)
|
|
44
44
|
faraday-net_http (>= 2.0, < 3.5)
|
|
45
45
|
json
|
|
46
46
|
logger
|
|
47
|
-
faraday-multipart (1.
|
|
47
|
+
faraday-multipart (1.2.0)
|
|
48
48
|
multipart-post (~> 2.0)
|
|
49
|
-
faraday-net_http (3.4.
|
|
50
|
-
net-http (
|
|
49
|
+
faraday-net_http (3.4.2)
|
|
50
|
+
net-http (~> 0.5)
|
|
51
51
|
fiber-annotation (0.2.0)
|
|
52
52
|
fiber-local (1.1.0)
|
|
53
53
|
fiber-storage
|
|
54
54
|
fiber-storage (1.0.1)
|
|
55
55
|
ice_nine (0.11.2)
|
|
56
|
-
io-event (1.
|
|
57
|
-
json (2.
|
|
56
|
+
io-event (1.14.2)
|
|
57
|
+
json (2.18.0)
|
|
58
58
|
logger (1.7.0)
|
|
59
|
-
metrics (0.
|
|
59
|
+
metrics (0.15.0)
|
|
60
60
|
multipart-post (2.4.1)
|
|
61
|
-
net-http (0.
|
|
62
|
-
uri
|
|
63
|
-
public_suffix (
|
|
64
|
-
ruby-openai (8.
|
|
61
|
+
net-http (0.9.1)
|
|
62
|
+
uri (>= 0.11.1)
|
|
63
|
+
public_suffix (7.0.2)
|
|
64
|
+
ruby-openai (8.3.0)
|
|
65
65
|
event_stream_parser (>= 0.3.0, < 2.0.0)
|
|
66
66
|
faraday (>= 1)
|
|
67
67
|
faraday-multipart (>= 1)
|
|
68
|
-
rubydium (0.4.
|
|
68
|
+
rubydium (0.4.11)
|
|
69
69
|
async (~> 2.3)
|
|
70
|
-
telegram-bot-ruby (~> 2.
|
|
71
|
-
telegram-bot-ruby (2.
|
|
70
|
+
telegram-bot-ruby (~> 2.5)
|
|
71
|
+
telegram-bot-ruby (2.5.0)
|
|
72
72
|
dry-struct (~> 1.6)
|
|
73
73
|
faraday (~> 2.0)
|
|
74
74
|
faraday-multipart (~> 1.0)
|
|
75
75
|
zeitwerk (~> 2.6)
|
|
76
|
-
traces (0.
|
|
77
|
-
uri (1.
|
|
78
|
-
zeitwerk (2.7.
|
|
76
|
+
traces (0.18.2)
|
|
77
|
+
uri (1.1.1)
|
|
78
|
+
zeitwerk (2.7.4)
|
|
79
79
|
|
|
80
80
|
PLATFORMS
|
|
81
81
|
ruby
|
|
@@ -87,4 +87,4 @@ DEPENDENCIES
|
|
|
87
87
|
rubydium (>= 0.2.5)
|
|
88
88
|
|
|
89
89
|
BUNDLED WITH
|
|
90
|
-
2.
|
|
90
|
+
2.6.9
|
data/lib/config_menu.rb
CHANGED
|
@@ -30,6 +30,12 @@ module ConfigMenu
|
|
|
30
30
|
Telegram::Bot::Types::InlineKeyboardMarkup.new(inline_keyboard: options)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
def image_menu
|
|
34
|
+
buttons = {
|
|
35
|
+
"Storage period: #{current_config.storage_period}" => "/set_storage_period",
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
33
39
|
def config_menu
|
|
34
40
|
buttons = {
|
|
35
41
|
"Select model >>" => "/get_model_menu",
|
data/lib/open_ai_bot.rb
CHANGED
|
@@ -21,8 +21,12 @@ class OpenAIBot < Rubydium::Bot
|
|
|
21
21
|
include OpenAI::Whisper
|
|
22
22
|
include ConfigMenu
|
|
23
23
|
|
|
24
|
-
on_every_message :handle_gpt_command
|
|
25
|
-
on_every_message :transcribe
|
|
24
|
+
# on_every_message :handle_gpt_command
|
|
25
|
+
# on_every_message :transcribe
|
|
26
|
+
|
|
27
|
+
on_every_message do
|
|
28
|
+
# puts "Got message #{@msg.inspect}"
|
|
29
|
+
end
|
|
26
30
|
|
|
27
31
|
on_command "/restart", :init_session, description: "Resets ChatGPT session"
|
|
28
32
|
on_command "/dalle", :dalle, description: "Sends the prompt to DALL-E"
|
data/open_ai_bot.gemspec
CHANGED
|
@@ -8,7 +8,7 @@ require_relative "lib/ext/in"
|
|
|
8
8
|
|
|
9
9
|
Gem::Specification.new do |spec|
|
|
10
10
|
spec.name = "open_ai_bot"
|
|
11
|
-
spec.version = "0.3.
|
|
11
|
+
spec.version = "0.3.14"
|
|
12
12
|
spec.authors = ["bulgakke"]
|
|
13
13
|
spec.email = ["vvp835@yandex.ru"]
|
|
14
14
|
|
|
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
|
|
|
41
41
|
"down" => ["~> 5.4"],
|
|
42
42
|
"http" => ["~> 5.1"],
|
|
43
43
|
"nokogiri" => ["~> 1.15"],
|
|
44
|
-
"rubydium" => ["
|
|
44
|
+
"rubydium" => ["~> 0.4"],
|
|
45
45
|
"ruby-openai" => ["~> 8.1"]
|
|
46
46
|
}.each do |name, versions|
|
|
47
47
|
spec.add_dependency(name, *versions)
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: open_ai_bot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- bulgakke
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: down
|
|
@@ -56,16 +55,16 @@ dependencies:
|
|
|
56
55
|
name: rubydium
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
|
-
- - "
|
|
58
|
+
- - "~>"
|
|
60
59
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.
|
|
60
|
+
version: '0.4'
|
|
62
61
|
type: :runtime
|
|
63
62
|
prerelease: false
|
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
|
-
- - "
|
|
65
|
+
- - "~>"
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 0.
|
|
67
|
+
version: '0.4'
|
|
69
68
|
- !ruby/object:Gem::Dependency
|
|
70
69
|
name: ruby-openai
|
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -80,7 +79,6 @@ dependencies:
|
|
|
80
79
|
- - "~>"
|
|
81
80
|
- !ruby/object:Gem::Version
|
|
82
81
|
version: '8.1'
|
|
83
|
-
description:
|
|
84
82
|
email:
|
|
85
83
|
- vvp835@yandex.ru
|
|
86
84
|
executables: []
|
|
@@ -117,7 +115,6 @@ metadata:
|
|
|
117
115
|
homepage_uri: https://github.com/bulgakke/open_ai_bot
|
|
118
116
|
source_code_uri: https://github.com/bulgakke/open_ai_bot
|
|
119
117
|
rubygems_mfa_required: 'true'
|
|
120
|
-
post_install_message:
|
|
121
118
|
rdoc_options: []
|
|
122
119
|
require_paths:
|
|
123
120
|
- lib
|
|
@@ -132,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
132
129
|
- !ruby/object:Gem::Version
|
|
133
130
|
version: '0'
|
|
134
131
|
requirements: []
|
|
135
|
-
rubygems_version: 3.
|
|
136
|
-
signing_key:
|
|
132
|
+
rubygems_version: 3.6.9
|
|
137
133
|
specification_version: 4
|
|
138
134
|
summary: Telegram bot for using ChatGPT, DALL-E and Whisper
|
|
139
135
|
test_files: []
|