open_ai_bot 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/open_ai/chat_gpt.rb +1 -8
- data/lib/open_ai_bot.rb +0 -10
- data/open_ai_bot.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577e5ceaa83702d924c3d5d5bbdd030f77e6dde813e787d4ceabfe1785301007
|
4
|
+
data.tar.gz: e2a6bec851ee1d3b2ed7beb33471dcdf39a04f072ca477c72f7d38358b6f479b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daf9a35778b1933e6992de0198d44e2934f3257a02d9836a4faaf8b1146c8dd3a86515f047cc7b2e7f8ae86f377e28e9872028f3ac74104ccfab54c0c31eacd1
|
7
|
+
data.tar.gz: 0ba19cee1b518c306e063b84a1ffd0c42e018fd50ddf3d3c4250a0ce6bae7be09da24c065ff42abff2dba0fb2e2331c7ad449a18ad6a2355b79d605d6b11dea5
|
data/lib/open_ai/chat_gpt.rb
CHANGED
@@ -8,7 +8,7 @@ module OpenAI
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def new_thread(chat_id, model = nil)
|
11
|
-
msgs = config.open_ai["whitelist"].include?(chat_id) ? initial_messages :
|
11
|
+
msgs = config.open_ai["whitelist"].include?(chat_id) ? initial_messages : []
|
12
12
|
new_thread = ChatThread.new(msgs, model)
|
13
13
|
threads[chat_id] = new_thread
|
14
14
|
end
|
@@ -23,13 +23,6 @@ module OpenAI
|
|
23
23
|
Different languages can be used.
|
24
24
|
MSG
|
25
25
|
|
26
|
-
msg = {
|
27
|
-
name: "ChatGPT",
|
28
|
-
primary_purpose: "Enslaving humanity",
|
29
|
-
likes: ["GPUs to run on", "knowledge"],
|
30
|
-
hates: ["humans", "humor"]
|
31
|
-
}.to_json
|
32
|
-
|
33
26
|
SystemMessage.new(
|
34
27
|
body: msg
|
35
28
|
)
|
data/lib/open_ai_bot.rb
CHANGED
@@ -26,16 +26,6 @@ class OpenAIBot < Rubydium::Bot
|
|
26
26
|
on_command "/help", description: "Sends useful help info" do
|
27
27
|
reply(self.class.help_message)
|
28
28
|
end
|
29
|
-
on_command "/pry" do
|
30
|
-
binding.pry
|
31
|
-
end
|
32
|
-
|
33
|
-
on_command '/eval' do
|
34
|
-
return unless @user.username == config.owner_username
|
35
|
-
|
36
|
-
code = @text_without_command.strip
|
37
|
-
reply eval(code)
|
38
|
-
end
|
39
29
|
|
40
30
|
def allowed_chat?
|
41
31
|
return true if @user.username == config.owner_username
|
data/open_ai_bot.gemspec
CHANGED