chatgpt_assistant 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.env_sample +16 -7
- data/.rubocop.yml +14 -3
- data/Dockerfile +11 -5
- data/Gemfile +25 -23
- data/Gemfile.lock +123 -85
- data/README.md +15 -18
- data/Rakefile +1 -0
- data/docker-compose.yml +8 -4
- data/exe/chatgpt_assistant +1 -1
- data/lib/{bots → chatgpt_assistant/bots}/application_bot.rb +0 -6
- data/lib/chatgpt_assistant/bots/discord/actions.rb +104 -0
- data/lib/chatgpt_assistant/bots/discord/auth.rb +36 -0
- data/lib/chatgpt_assistant/bots/discord/bot.rb +29 -0
- data/lib/chatgpt_assistant/bots/discord/chat_actions.rb +33 -0
- data/lib/chatgpt_assistant/bots/discord/events.rb +138 -0
- data/lib/chatgpt_assistant/bots/discord/validations.rb +38 -0
- data/lib/chatgpt_assistant/bots/discord/voice_actions.rb +33 -0
- data/lib/chatgpt_assistant/bots/discord/voice_checkers.rb +35 -0
- data/lib/chatgpt_assistant/bots/discord_bot.rb +42 -0
- data/lib/chatgpt_assistant/bots/helpers/messenger_helper.rb +16 -0
- data/lib/{bots → chatgpt_assistant/bots}/jobs/register_job.rb +2 -2
- data/lib/chatgpt_assistant/bots/mailers/account_mailer.rb +30 -0
- data/lib/chatgpt_assistant/bots/mailers/application_mailer.rb +21 -0
- data/lib/chatgpt_assistant/bots/services/new_chat_service.rb +59 -0
- data/lib/chatgpt_assistant/bots/services/register_service.rb +45 -0
- data/lib/chatgpt_assistant/bots/telegram/actions.rb +54 -0
- data/lib/chatgpt_assistant/bots/telegram/auth.rb +40 -0
- data/lib/chatgpt_assistant/bots/telegram/bot.rb +17 -0
- data/lib/chatgpt_assistant/bots/telegram/chat_actions.rb +30 -0
- data/lib/chatgpt_assistant/bots/telegram/events.rb +120 -0
- data/lib/chatgpt_assistant/bots/telegram/events_controller.rb +48 -0
- data/lib/chatgpt_assistant/bots/telegram/permissions.rb +48 -0
- data/lib/chatgpt_assistant/bots/telegram/validations.rb +55 -0
- data/lib/chatgpt_assistant/bots/telegram/voice_actions.rb +36 -0
- data/lib/chatgpt_assistant/bots/telegram_bot.rb +44 -0
- data/lib/chatgpt_assistant/chatter.rb +10 -2
- data/lib/chatgpt_assistant/config.rb +4 -1
- data/lib/chatgpt_assistant/default_messages.rb +10 -4
- data/lib/chatgpt_assistant/error.rb +9 -0
- data/lib/chatgpt_assistant/migrations.rb +5 -0
- data/lib/chatgpt_assistant/models.rb +20 -0
- data/lib/chatgpt_assistant/version.rb +1 -1
- data/lib/chatgpt_assistant.rb +5 -3
- metadata +34 -24
- data/.env_prod_sample +0 -18
- data/docker-compose.prod.yml +0 -34
- data/lib/bots/discord_bot.rb +0 -182
- data/lib/bots/helpers/authentication_helper.rb +0 -48
- data/lib/bots/helpers/discord_helper.rb +0 -124
- data/lib/bots/helpers/discord_voice_helper.rb +0 -50
- data/lib/bots/helpers/messenger_helper.rb +0 -133
- data/lib/bots/helpers/telegram_helper.rb +0 -73
- data/lib/bots/helpers/telegram_voice_helper.rb +0 -33
- data/lib/bots/helpers/validation_helper.rb +0 -38
- data/lib/bots/helpers/visit_helper.rb +0 -28
- data/lib/bots/services/new_chat_service.rb +0 -34
- data/lib/bots/services/register_service.rb +0 -36
- data/lib/bots/telegram_bot.rb +0 -180
- /data/lib/{bots → chatgpt_assistant/bots}/helpers/audio_helper.rb +0 -0
- /data/lib/{bots → chatgpt_assistant/bots}/helpers/file_helper.rb +0 -0
- /data/lib/{bots → chatgpt_assistant/bots}/helpers/search_helper.rb +0 -0
- /data/lib/{bots → chatgpt_assistant/bots}/jobs/new_chat_job.rb +0 -0
- /data/lib/{bots → chatgpt_assistant/bots}/jobs/voice_connect_job.rb +0 -0
- /data/lib/{bots → chatgpt_assistant/bots}/services/voice_connect_service.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97aedc38669c3951e7a0bb47b5725a0441e72c7d511d60aaf4111cd593ef2d0c
|
4
|
+
data.tar.gz: 291096188668bc71f6115c39e5c9ec563d612a9285c564a26ff7272482412a72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2388f8d01c931521849e96ae675e123ec55e9e2cdb0e8619ef67374713bc74a5e405d7b11d813814e5f6912bd6d359090a9f334a3bbf86a555dd982cbe41c555
|
7
|
+
data.tar.gz: 752cb272ae50aa4d6659f0c0cccdb630aefaca5439e6a21a375d2d54cc8bad41aec9d285bd0697277ba7abe8c9dff36ee8022914aba758cebb964e6608fc77d3
|
data/.env_sample
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
ENV_TYPE=development
|
2
|
-
LANGUAGE=en
|
3
|
-
MODE=aws
|
2
|
+
LANGUAGE=en
|
3
|
+
MODE=aws
|
4
4
|
DISCORD_PREFIX=!!
|
5
5
|
|
6
|
-
POSTGRES_DB=chatgpt_assistant_development
|
7
|
-
POSTGRES_USER=postgres
|
8
|
-
POSTGRES_PASSWORD=postgres
|
6
|
+
POSTGRES_DB=chatgpt_assistant_development
|
7
|
+
POSTGRES_USER=postgres
|
8
|
+
POSTGRES_PASSWORD=postgres
|
9
9
|
|
10
|
-
IBM_API_KEY=Your IBM API Key
|
10
|
+
IBM_API_KEY=Your IBM API Key # set MODE=ibm
|
11
11
|
IBM_URL=Your IBM Text to Speech URL
|
12
12
|
TELEGRAM_TOKEN=Your Telegram Bot Token
|
13
13
|
OPENAI_API_KEY=Your OpenAI API Key
|
@@ -15,4 +15,13 @@ AWS_ACCESS_KEY=Your AWS Access Key
|
|
15
15
|
AWS_SECRET_ACCESS_KEY=Your AWS Secret Access Key
|
16
16
|
AWS_REGION=Your AWS Region
|
17
17
|
DISCORD_CLIENT_ID=Your Discord Client ID
|
18
|
-
DISCORD_TOKEN=Your Discord Token
|
18
|
+
DISCORD_TOKEN=Your Discord Token
|
19
|
+
|
20
|
+
SMTP_ADDRESS=YOUR_SMTP_ADDRESS
|
21
|
+
SMTP_PASSWORD=YOUR_SMTP_PASSWORD
|
22
|
+
SMTP_PORT=YOUR_SMTP_PORT
|
23
|
+
SMTP_USER_NAME=YOUR_SMTP_USER_NAME
|
24
|
+
SMTP_DOMAIN=YOUR_SMTP_DOMAIN
|
25
|
+
SMTP_AUTHENTICATION=plain
|
26
|
+
SMTP_ENABLE_STARTTLS_AUTO=true
|
27
|
+
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
AllCops:
|
2
2
|
TargetRubyVersion: 2.6
|
3
3
|
NewCops: enable
|
4
|
+
Exclude:
|
5
|
+
- 'Gemfile.lock'
|
4
6
|
|
5
7
|
Style/StringLiterals:
|
6
8
|
Enabled: true
|
@@ -26,13 +28,22 @@ Metrics/ClassLength:
|
|
26
28
|
Max: 300
|
27
29
|
|
28
30
|
Metrics/AbcSize:
|
29
|
-
Max:
|
31
|
+
Max: 62
|
32
|
+
|
33
|
+
Metrics/PerceivedComplexity:
|
34
|
+
Max: 15
|
35
|
+
|
36
|
+
Metrics/CyclomaticComplexity:
|
37
|
+
Max: 15
|
38
|
+
|
39
|
+
Style/Documentation:
|
40
|
+
Enabled: false
|
30
41
|
|
31
42
|
Layout/AccessModifierIndentation:
|
32
43
|
EnforcedStyle: indent
|
33
|
-
|
44
|
+
|
34
45
|
Layout/IndentationWidth:
|
35
46
|
Width: 2
|
36
47
|
|
37
48
|
Layout/IndentationConsistency:
|
38
|
-
EnforcedStyle: indented_internal_methods
|
49
|
+
EnforcedStyle: indented_internal_methods
|
data/Dockerfile
CHANGED
@@ -1,12 +1,18 @@
|
|
1
1
|
FROM ruby:3.2.2
|
2
2
|
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client ffmpeg
|
3
|
-
WORKDIR /
|
4
|
-
COPY Gemfile /
|
5
|
-
COPY Gemfile.lock /
|
3
|
+
WORKDIR /assistant
|
4
|
+
COPY Gemfile /assistant/Gemfile
|
5
|
+
COPY Gemfile.lock /assistant/Gemfile.lock
|
6
6
|
RUN bundle install
|
7
7
|
|
8
|
-
RUN apt-get install -y wget
|
8
|
+
RUN apt-get install -y wget libopus0 opus-tools
|
9
9
|
RUN wget https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz
|
10
10
|
RUN tar -xvf opus-1.3.1.tar.gz
|
11
11
|
RUN cd opus-1.3.1 && ./configure && make && make install
|
12
|
-
RUN rm -rf opus-1.3.1.tar.gz opus-1.3.1
|
12
|
+
RUN rm -rf opus-1.3.1.tar.gz opus-1.3.1
|
13
|
+
|
14
|
+
RUN wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz
|
15
|
+
RUN tar -xvf libsodium-1.0.18.tar.gz
|
16
|
+
RUN cd libsodium-1.0.18 && ./configure && make && make install
|
17
|
+
RUN ldconfig
|
18
|
+
RUN rm -rf libsodium-1.0.18.tar.gz libsodium-1.0.18
|
data/Gemfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "bcrypt"
|
5
|
+
gem "bcrypt", "~> 3.1"
|
6
6
|
|
7
7
|
gem "rake", "~> 13.0"
|
8
8
|
|
@@ -10,54 +10,56 @@ gem "rspec", "~> 3.12", group: :test
|
|
10
10
|
|
11
11
|
gem "rspec-rails", "~> 6.0", group: :test
|
12
12
|
|
13
|
-
gem "simplecov", "~> 0.
|
13
|
+
gem "simplecov", "~> 0.22", group: :test
|
14
14
|
|
15
|
-
gem "vcr", "~> 6.
|
15
|
+
gem "vcr", "~> 6.1", group: :test
|
16
16
|
|
17
17
|
gem "shoulda-matchers", "~> 5.3", group: :test
|
18
18
|
|
19
|
-
gem "factory_bot_rails", "~> 6.
|
19
|
+
gem "factory_bot_rails", "~> 6.2", group: :test
|
20
20
|
|
21
|
-
gem "faker", "~> 2.
|
21
|
+
gem "faker", "~> 2.23", group: :test
|
22
22
|
|
23
23
|
gem "database_cleaner", "~> 2.0", group: :test
|
24
24
|
|
25
|
-
gem "dotenv", "~> 2.
|
25
|
+
gem "dotenv", "~> 2.8", group: :test
|
26
26
|
|
27
27
|
gem "rubocop", "~> 1.50"
|
28
28
|
|
29
|
-
gem "rubocop-rspec", "~> 2.
|
29
|
+
gem "rubocop-rspec", "~> 2.22"
|
30
30
|
|
31
|
-
gem "telegram-bot-ruby", "~> 0
|
31
|
+
gem "telegram-bot-ruby", "~> 1.0"
|
32
32
|
|
33
33
|
gem "discordrb", "~> 3.4"
|
34
34
|
|
35
|
-
gem "faraday"
|
35
|
+
gem "faraday", "~> 2.7"
|
36
36
|
|
37
|
-
gem "activemodel"
|
37
|
+
gem "activemodel", "~> 6.1"
|
38
38
|
|
39
|
-
gem "activerecord"
|
39
|
+
gem "activerecord", "~> 6.1"
|
40
40
|
|
41
|
-
gem "activesupport"
|
41
|
+
gem "activesupport", "~> 6.1"
|
42
42
|
|
43
|
-
gem "
|
43
|
+
gem "actionmailer", "~> 6.1"
|
44
44
|
|
45
|
-
gem "
|
45
|
+
gem "redis", "~> 5.0"
|
46
46
|
|
47
|
-
gem "sidekiq
|
47
|
+
gem "sidekiq", "~> 7.0"
|
48
48
|
|
49
|
-
gem "
|
49
|
+
gem "sidekiq-scheduler", "~> 5.0"
|
50
50
|
|
51
|
-
gem "
|
51
|
+
gem "activerecord-import", "~> 1.4"
|
52
52
|
|
53
|
-
gem "
|
53
|
+
gem "pg", "~> 1.5"
|
54
54
|
|
55
|
-
gem "
|
55
|
+
gem "streamio-ffmpeg", "~> 3.0"
|
56
56
|
|
57
|
-
gem "
|
57
|
+
gem "lucy_dockerunner", "~> 0.2"
|
58
58
|
|
59
|
-
gem "
|
59
|
+
gem "ibm_watson", "~> 2.2"
|
60
60
|
|
61
|
-
gem "
|
61
|
+
gem "aws-sdk-polly", "~> 1.72"
|
62
62
|
|
63
|
-
gem "
|
63
|
+
gem "awesome_chatgpt_actors", "~> 0.1"
|
64
|
+
|
65
|
+
gem "sidekiq-expiring-jobs", "~> 0.1"
|
data/Gemfile.lock
CHANGED
@@ -1,56 +1,61 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
actionmailer (6.1.7.3)
|
5
|
+
actionpack (= 6.1.7.3)
|
6
|
+
actionview (= 6.1.7.3)
|
7
|
+
activejob (= 6.1.7.3)
|
8
|
+
activesupport (= 6.1.7.3)
|
9
|
+
mail (~> 2.5, >= 2.5.4)
|
10
|
+
rails-dom-testing (~> 2.0)
|
11
|
+
actionpack (6.1.7.3)
|
12
|
+
actionview (= 6.1.7.3)
|
13
|
+
activesupport (= 6.1.7.3)
|
14
|
+
rack (~> 2.0, >= 2.0.9)
|
8
15
|
rack-test (>= 0.6.3)
|
9
16
|
rails-dom-testing (~> 2.0)
|
10
17
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
11
|
-
actionview (
|
12
|
-
activesupport (=
|
18
|
+
actionview (6.1.7.3)
|
19
|
+
activesupport (= 6.1.7.3)
|
13
20
|
builder (~> 3.1)
|
14
21
|
erubi (~> 1.4)
|
15
22
|
rails-dom-testing (~> 2.0)
|
16
23
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
17
|
-
|
18
|
-
activesupport (=
|
19
|
-
|
20
|
-
|
21
|
-
activesupport (=
|
24
|
+
activejob (6.1.7.3)
|
25
|
+
activesupport (= 6.1.7.3)
|
26
|
+
globalid (>= 0.3.6)
|
27
|
+
activemodel (6.1.7.3)
|
28
|
+
activesupport (= 6.1.7.3)
|
29
|
+
activerecord (6.1.7.3)
|
30
|
+
activemodel (= 6.1.7.3)
|
31
|
+
activesupport (= 6.1.7.3)
|
22
32
|
activerecord-import (1.4.1)
|
23
33
|
activerecord (>= 4.2)
|
24
|
-
activesupport (
|
34
|
+
activesupport (6.1.7.3)
|
25
35
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
26
36
|
i18n (>= 1.6, < 2)
|
27
37
|
minitest (>= 5.1)
|
28
38
|
tzinfo (~> 2.0)
|
39
|
+
zeitwerk (~> 2.3)
|
29
40
|
addressable (2.8.4)
|
30
41
|
public_suffix (>= 2.0.2, < 6.0)
|
31
42
|
ast (2.4.2)
|
32
43
|
awesome_chatgpt_actors (0.1.3)
|
33
44
|
csv (~> 3.1)
|
34
45
|
aws-eventstream (1.2.0)
|
35
|
-
aws-partitions (1.
|
36
|
-
aws-sdk-core (3.
|
46
|
+
aws-partitions (1.785.0)
|
47
|
+
aws-sdk-core (3.178.0)
|
37
48
|
aws-eventstream (~> 1, >= 1.0.2)
|
38
49
|
aws-partitions (~> 1, >= 1.651.0)
|
39
50
|
aws-sigv4 (~> 1.5)
|
40
51
|
jmespath (~> 1, >= 1.6.1)
|
41
|
-
aws-sdk-polly (1.
|
42
|
-
aws-sdk-core (~> 3, >= 3.
|
52
|
+
aws-sdk-polly (1.72.0)
|
53
|
+
aws-sdk-core (~> 3, >= 3.177.0)
|
43
54
|
aws-sigv4 (~> 1.1)
|
44
|
-
aws-sigv4 (1.
|
55
|
+
aws-sigv4 (1.6.0)
|
45
56
|
aws-eventstream (~> 1, >= 1.0.2)
|
46
|
-
|
47
|
-
descendants_tracker (~> 0.0.4)
|
48
|
-
ice_nine (~> 0.11.0)
|
49
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
50
|
-
bcrypt (3.1.18)
|
57
|
+
bcrypt (3.1.19)
|
51
58
|
builder (3.2.4)
|
52
|
-
coercible (1.0.0)
|
53
|
-
descendants_tracker (~> 0.0.1)
|
54
59
|
concurrent-ruby (1.2.2)
|
55
60
|
connection_pool (2.4.0)
|
56
61
|
crass (1.0.6)
|
@@ -61,8 +66,7 @@ GEM
|
|
61
66
|
activerecord (>= 5.a)
|
62
67
|
database_cleaner-core (~> 2.0.0)
|
63
68
|
database_cleaner-core (2.0.1)
|
64
|
-
|
65
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
69
|
+
date (3.3.3)
|
66
70
|
diff-lcs (1.5.0)
|
67
71
|
discordrb (3.4.0)
|
68
72
|
discordrb-webhooks (~> 3.3.0)
|
@@ -76,7 +80,25 @@ GEM
|
|
76
80
|
domain_name (0.5.20190701)
|
77
81
|
unf (>= 0.0.5, < 1.0.0)
|
78
82
|
dotenv (2.8.1)
|
83
|
+
dry-core (1.0.0)
|
84
|
+
concurrent-ruby (~> 1.0)
|
85
|
+
zeitwerk (~> 2.6)
|
79
86
|
dry-inflector (1.0.0)
|
87
|
+
dry-logic (1.5.0)
|
88
|
+
concurrent-ruby (~> 1.0)
|
89
|
+
dry-core (~> 1.0, < 2)
|
90
|
+
zeitwerk (~> 2.6)
|
91
|
+
dry-struct (1.6.0)
|
92
|
+
dry-core (~> 1.0, < 2)
|
93
|
+
dry-types (>= 1.7, < 2)
|
94
|
+
ice_nine (~> 0.11)
|
95
|
+
zeitwerk (~> 2.6)
|
96
|
+
dry-types (1.7.1)
|
97
|
+
concurrent-ruby (~> 1.0)
|
98
|
+
dry-core (~> 1.0)
|
99
|
+
dry-inflector (~> 1.0)
|
100
|
+
dry-logic (~> 1.4)
|
101
|
+
zeitwerk (~> 2.6)
|
80
102
|
erubi (1.12.0)
|
81
103
|
et-orbi (1.2.7)
|
82
104
|
tzinfo
|
@@ -89,7 +111,7 @@ GEM
|
|
89
111
|
railties (>= 5.0.0)
|
90
112
|
faker (2.23.0)
|
91
113
|
i18n (>= 1.8.11, < 2)
|
92
|
-
faraday (2.7.
|
114
|
+
faraday (2.7.10)
|
93
115
|
faraday-net_http (>= 2.0, < 3.1)
|
94
116
|
ruby2_keywords (>= 0.0.4)
|
95
117
|
faraday-multipart (1.0.4)
|
@@ -105,6 +127,8 @@ GEM
|
|
105
127
|
fugit (1.8.1)
|
106
128
|
et-orbi (~> 1, >= 1.2.7)
|
107
129
|
raabro (~> 1.4)
|
130
|
+
globalid (1.1.0)
|
131
|
+
activesupport (>= 5.0)
|
108
132
|
http (4.4.1)
|
109
133
|
addressable (~> 2.3)
|
110
134
|
http-cookie (~> 1.0)
|
@@ -116,7 +140,7 @@ GEM
|
|
116
140
|
http-form_data (2.3.0)
|
117
141
|
http-parser (1.2.3)
|
118
142
|
ffi-compiler (>= 1.0, < 2.0)
|
119
|
-
i18n (1.
|
143
|
+
i18n (1.13.0)
|
120
144
|
concurrent-ruby (~> 1.0)
|
121
145
|
ibm_cloud_sdk_core (1.1.3)
|
122
146
|
concurrent-ruby (~> 1.0)
|
@@ -133,34 +157,49 @@ GEM
|
|
133
157
|
jmespath (1.6.2)
|
134
158
|
json (2.6.3)
|
135
159
|
jwt (2.2.3)
|
136
|
-
loofah (2.
|
160
|
+
loofah (2.21.3)
|
137
161
|
crass (~> 1.0.2)
|
138
|
-
nokogiri (>= 1.
|
139
|
-
lucy_dockerunner (0.
|
162
|
+
nokogiri (>= 1.12.0)
|
163
|
+
lucy_dockerunner (0.2.0)
|
164
|
+
mail (2.8.1)
|
165
|
+
mini_mime (>= 0.1.1)
|
166
|
+
net-imap
|
167
|
+
net-pop
|
168
|
+
net-smtp
|
140
169
|
method_source (1.0.0)
|
141
170
|
mime-types (3.4.1)
|
142
171
|
mime-types-data (~> 3.2015)
|
143
172
|
mime-types-data (3.2023.0218.1)
|
144
|
-
|
173
|
+
mini_mime (1.1.2)
|
174
|
+
mini_portile2 (2.8.2)
|
145
175
|
minitest (5.18.0)
|
146
176
|
multi_json (1.15.0)
|
147
177
|
multipart-post (2.3.0)
|
178
|
+
net-imap (0.3.6)
|
179
|
+
date
|
180
|
+
net-protocol
|
181
|
+
net-pop (0.1.2)
|
182
|
+
net-protocol
|
183
|
+
net-protocol (0.2.1)
|
184
|
+
timeout
|
185
|
+
net-smtp (0.3.3)
|
186
|
+
net-protocol
|
148
187
|
netrc (0.11.0)
|
149
|
-
nokogiri (1.
|
150
|
-
mini_portile2 (~> 2.8.
|
188
|
+
nokogiri (1.15.2)
|
189
|
+
mini_portile2 (~> 2.8.2)
|
151
190
|
racc (~> 1.4)
|
152
|
-
nokogiri (1.
|
191
|
+
nokogiri (1.15.2-x86_64-linux)
|
153
192
|
racc (~> 1.4)
|
154
193
|
opus-ruby (1.0.1)
|
155
194
|
ffi
|
156
195
|
parallel (1.23.0)
|
157
|
-
parser (3.2.2.
|
196
|
+
parser (3.2.2.1)
|
158
197
|
ast (~> 2.4.1)
|
159
|
-
pg (1.
|
198
|
+
pg (1.5.3)
|
160
199
|
public_suffix (5.0.1)
|
161
200
|
raabro (1.4.0)
|
162
201
|
racc (1.6.2)
|
163
|
-
rack (2.2.
|
202
|
+
rack (2.2.7)
|
164
203
|
rack-test (2.1.0)
|
165
204
|
rack (>= 1.3)
|
166
205
|
rails-dom-testing (2.0.3)
|
@@ -168,13 +207,12 @@ GEM
|
|
168
207
|
nokogiri (>= 1.6)
|
169
208
|
rails-html-sanitizer (1.5.0)
|
170
209
|
loofah (~> 2.19, >= 2.19.1)
|
171
|
-
railties (
|
172
|
-
actionpack (=
|
173
|
-
activesupport (=
|
210
|
+
railties (6.1.7.3)
|
211
|
+
actionpack (= 6.1.7.3)
|
212
|
+
activesupport (= 6.1.7.3)
|
174
213
|
method_source
|
175
214
|
rake (>= 12.2)
|
176
215
|
thor (~> 1.0)
|
177
|
-
zeitwerk (~> 2.5)
|
178
216
|
rainbow (3.1.1)
|
179
217
|
rake (13.0.6)
|
180
218
|
redis (5.0.6)
|
@@ -192,22 +230,22 @@ GEM
|
|
192
230
|
rspec-core (~> 3.12.0)
|
193
231
|
rspec-expectations (~> 3.12.0)
|
194
232
|
rspec-mocks (~> 3.12.0)
|
195
|
-
rspec-core (3.12.
|
233
|
+
rspec-core (3.12.2)
|
196
234
|
rspec-support (~> 3.12.0)
|
197
|
-
rspec-expectations (3.12.
|
235
|
+
rspec-expectations (3.12.3)
|
198
236
|
diff-lcs (>= 1.2.0, < 2.0)
|
199
237
|
rspec-support (~> 3.12.0)
|
200
238
|
rspec-mocks (3.12.5)
|
201
239
|
diff-lcs (>= 1.2.0, < 2.0)
|
202
240
|
rspec-support (~> 3.12.0)
|
203
|
-
rspec-rails (6.0.
|
241
|
+
rspec-rails (6.0.3)
|
204
242
|
actionpack (>= 6.1)
|
205
243
|
activesupport (>= 6.1)
|
206
244
|
railties (>= 6.1)
|
207
|
-
rspec-core (~> 3.
|
208
|
-
rspec-expectations (~> 3.
|
209
|
-
rspec-mocks (~> 3.
|
210
|
-
rspec-support (~> 3.
|
245
|
+
rspec-core (~> 3.12)
|
246
|
+
rspec-expectations (~> 3.12)
|
247
|
+
rspec-mocks (~> 3.12)
|
248
|
+
rspec-support (~> 3.12)
|
211
249
|
rspec-support (3.12.0)
|
212
250
|
rubocop (1.50.2)
|
213
251
|
json (~> 2.3)
|
@@ -219,13 +257,16 @@ GEM
|
|
219
257
|
rubocop-ast (>= 1.28.0, < 2.0)
|
220
258
|
ruby-progressbar (~> 1.7)
|
221
259
|
unicode-display_width (>= 2.4.0, < 3.0)
|
222
|
-
rubocop-ast (1.28.
|
260
|
+
rubocop-ast (1.28.1)
|
223
261
|
parser (>= 3.2.1.0)
|
224
|
-
rubocop-capybara (2.
|
262
|
+
rubocop-capybara (2.18.0)
|
225
263
|
rubocop (~> 1.41)
|
226
|
-
rubocop-
|
264
|
+
rubocop-factory_bot (2.22.0)
|
265
|
+
rubocop (~> 1.33)
|
266
|
+
rubocop-rspec (2.22.0)
|
227
267
|
rubocop (~> 1.33)
|
228
268
|
rubocop-capybara (~> 2.17)
|
269
|
+
rubocop-factory_bot (~> 2.22)
|
229
270
|
ruby-progressbar (1.13.0)
|
230
271
|
ruby2_keywords (0.0.5)
|
231
272
|
rufus-scheduler (3.8.2)
|
@@ -251,14 +292,14 @@ GEM
|
|
251
292
|
simplecov_json_formatter (0.1.4)
|
252
293
|
streamio-ffmpeg (3.0.2)
|
253
294
|
multi_json (~> 1.8)
|
254
|
-
telegram-bot-ruby (0.
|
255
|
-
dry-
|
295
|
+
telegram-bot-ruby (1.0.0)
|
296
|
+
dry-struct (~> 1.6)
|
256
297
|
faraday (~> 2.0)
|
257
298
|
faraday-multipart (~> 1.0)
|
258
|
-
|
259
|
-
thor (1.2.
|
260
|
-
thread_safe (0.3.6)
|
299
|
+
zeitwerk (~> 2.6)
|
300
|
+
thor (1.2.2)
|
261
301
|
tilt (2.1.0)
|
302
|
+
timeout (0.3.2)
|
262
303
|
tzinfo (2.0.6)
|
263
304
|
concurrent-ruby (~> 1.0)
|
264
305
|
unf (0.1.4)
|
@@ -266,10 +307,6 @@ GEM
|
|
266
307
|
unf_ext (0.0.8.2)
|
267
308
|
unicode-display_width (2.4.2)
|
268
309
|
vcr (6.1.0)
|
269
|
-
virtus (2.0.0)
|
270
|
-
axiom-types (~> 0.1)
|
271
|
-
coercible (~> 1.0)
|
272
|
-
descendants_tracker (~> 0.0, >= 0.0.3)
|
273
310
|
websocket (1.2.9)
|
274
311
|
websocket-client-simple (0.6.1)
|
275
312
|
event_emitter
|
@@ -277,43 +314,44 @@ GEM
|
|
277
314
|
websocket-driver (0.7.5)
|
278
315
|
websocket-extensions (>= 0.1.0)
|
279
316
|
websocket-extensions (0.1.5)
|
280
|
-
zeitwerk (2.6.
|
317
|
+
zeitwerk (2.6.8)
|
281
318
|
|
282
319
|
PLATFORMS
|
283
320
|
ruby
|
284
321
|
x86_64-linux
|
285
322
|
|
286
323
|
DEPENDENCIES
|
287
|
-
|
288
|
-
|
289
|
-
activerecord
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
324
|
+
actionmailer (~> 6.1)
|
325
|
+
activemodel (~> 6.1)
|
326
|
+
activerecord (~> 6.1)
|
327
|
+
activerecord-import (~> 1.4)
|
328
|
+
activesupport (~> 6.1)
|
329
|
+
awesome_chatgpt_actors (~> 0.1)
|
330
|
+
aws-sdk-polly (~> 1.72)
|
331
|
+
bcrypt (~> 3.1)
|
294
332
|
database_cleaner (~> 2.0)
|
295
333
|
discordrb (~> 3.4)
|
296
|
-
dotenv (~> 2.
|
297
|
-
factory_bot_rails (~> 6.
|
298
|
-
faker (~> 2.
|
299
|
-
faraday
|
300
|
-
ibm_watson
|
301
|
-
lucy_dockerunner
|
302
|
-
pg
|
334
|
+
dotenv (~> 2.8)
|
335
|
+
factory_bot_rails (~> 6.2)
|
336
|
+
faker (~> 2.23)
|
337
|
+
faraday (~> 2.7)
|
338
|
+
ibm_watson (~> 2.2)
|
339
|
+
lucy_dockerunner (~> 0.2)
|
340
|
+
pg (~> 1.5)
|
303
341
|
rake (~> 13.0)
|
304
|
-
redis
|
342
|
+
redis (~> 5.0)
|
305
343
|
rspec (~> 3.12)
|
306
344
|
rspec-rails (~> 6.0)
|
307
345
|
rubocop (~> 1.50)
|
308
|
-
rubocop-rspec (~> 2.
|
346
|
+
rubocop-rspec (~> 2.22)
|
309
347
|
shoulda-matchers (~> 5.3)
|
310
|
-
sidekiq
|
311
|
-
sidekiq-expiring-jobs
|
312
|
-
sidekiq-scheduler
|
313
|
-
simplecov (~> 0.
|
314
|
-
streamio-ffmpeg
|
315
|
-
telegram-bot-ruby (~> 0
|
316
|
-
vcr (~> 6.
|
348
|
+
sidekiq (~> 7.0)
|
349
|
+
sidekiq-expiring-jobs (~> 0.1)
|
350
|
+
sidekiq-scheduler (~> 5.0)
|
351
|
+
simplecov (~> 0.22)
|
352
|
+
streamio-ffmpeg (~> 3.0)
|
353
|
+
telegram-bot-ruby (~> 1.0)
|
354
|
+
vcr (~> 6.1)
|
317
355
|
|
318
356
|
BUNDLED WITH
|
319
357
|
2.4.10
|
data/README.md
CHANGED
@@ -6,14 +6,18 @@
|
|
6
6
|
|
7
7
|
This Ruby gem provides an easy way to initialize a client for Telegram and Discord bots using the ChatGPT API, audio transcription, IBM Cloud Text to Speech, and AWS Polly, creating an assistant that can answer questions in text and voice and have a conversation with the user.
|
8
8
|
|
9
|
+
#### Discord Voice Bot temporary disabled due connection issues
|
10
|
+
#### Telegram voice messages are working fine
|
9
11
|
#### Languages supported currently: en, pt
|
10
12
|
|
13
|
+
#### Registration and Account Confirmation are avaiable on telegram only, sign in with the same credentials on discord after registering on telegram.
|
14
|
+
|
11
15
|
Other contributions are welcome too!
|
12
16
|
Remember to give a star to this repo if you like it!
|
13
17
|
## Requirements
|
14
18
|
|
15
19
|
- Ruby > 2.6.0 - for the gem who can create bots projects in your machine
|
16
|
-
- Ruby 3.2.2 - inside the docker
|
20
|
+
- Ruby 3.2.2 - inside the docker container or run the bots in your machine
|
17
21
|
- Docker
|
18
22
|
- Docker Compose
|
19
23
|
- PostgreSQL
|
@@ -93,14 +97,13 @@ After starting the Docker Compose services, you can use the features of the gem
|
|
93
97
|
The discord commands prefix can be changed in the .env file.
|
94
98
|
The default prefix is !!
|
95
99
|
|
96
|
-
-
|
97
|
-
-
|
98
|
-
-
|
99
|
-
-
|
100
|
-
-
|
101
|
-
-
|
102
|
-
-
|
103
|
-
- dgpt!ask TEXT - sends a text to the chatbot
|
100
|
+
- !!start - shows the welcome message
|
101
|
+
- !!help - shows the help message
|
102
|
+
- !!login email:password - logs in the user. Remember to use private messages to register or login and share a server with right permissions with the bot to message it.
|
103
|
+
- !!list - lists the user created chatbots
|
104
|
+
- !!sl_chat CHAT TITLE - starts a chat with the chatbot with the given title
|
105
|
+
- !!new_chat CHAT TITLE - creates a new chatbot with the given title
|
106
|
+
- !!ask TEXT - sends a text to the chatbot
|
104
107
|
|
105
108
|
## Telegram Bot Commands
|
106
109
|
|
@@ -108,19 +111,13 @@ The default prefix is !!
|
|
108
111
|
- /help - shows the help message
|
109
112
|
- login/email:password - logs in the user. Remember to use private messages to register or login.
|
110
113
|
- register/email:password - registers a new user, email is not verfied yet, so you can use any email, the password is encrypted with bcrypt and stored in the database with salt. Remember to use private messages to register or login.
|
114
|
+
- confirm/* name:token - confirms the user account. Remember to use private messages to register or login
|
111
115
|
- list - lists the user created chatbots
|
112
116
|
- sl_chat/CHAT TITLE - starts a chat with the chatbot with the given title
|
113
117
|
- new_chat/CHAT TITLE - creates a new chatbot with the given title
|
114
118
|
- TEXT - sends a text to the chatbot
|
115
119
|
- VOICE_MESSAGE or AUDIO FILE - sends a voice message to the chatbot and returns the response in voice
|
116
120
|
|
117
|
-
## Recommended Actions runner
|
118
|
-
|
119
|
-
You can run Github Actions workflows locally using [act](https://github.com/nektos/act)
|
120
|
-
|
121
|
-
We recommend Act installation to run Github Actions workflows locally
|
122
|
-
as we use it to deploy the bot in a server via ssh.
|
123
|
-
|
124
121
|
## Contributing
|
125
122
|
|
126
123
|
A good way to contribute is add your language to DefaultMessages class in lib/chatgpt_assistant/default_messages.rb. You can also add your language to the list of languages in the README.md file.
|
@@ -139,7 +136,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/JesusG
|
|
139
136
|
[![Activity map](https://images.repography.com/33522702/JesusGautamah/chatgpt_assistant/recent-activity/y6ZDduNWHwPzbnUFsmdGrJ99Q1vyEKGOBWFOBvzGjnM/1rZM2QrF0__3eUfUXFe6jDraYjHvypniTqDWhCequ-U_map.svg)](https://github.com/JesusGautamah/chatgpt_assistant/commits)
|
140
137
|
|
141
138
|
## Contributors
|
142
|
-
- [Jesus Gautamah](https://github.com/JesusGautamah)
|
139
|
+
- [Jesus Gautamah](https://github.com/JesusGautamah)
|
143
140
|
|
144
141
|
## License
|
145
142
|
|
@@ -147,4 +144,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
147
144
|
|
148
145
|
## Code of Conduct
|
149
146
|
|
150
|
-
Everyone interacting in the ChatgptAssistant project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/JesusGautamah/chatgpt_assistant/blob/master/CODE_OF_CONDUCT.md).
|
147
|
+
Everyone interacting in the ChatgptAssistant project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/JesusGautamah/chatgpt_assistant/blob/master/CODE_OF_CONDUCT.md).
|