open_ai_bot 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30c76c2d4d679490aeec769f27b4a94411d10457b9671635bac4155137159c4e
4
- data.tar.gz: da3ecae84c2ae4edd70e763e0ee4934e081bbd50332939c08252d507f69b1b90
3
+ metadata.gz: bb356e64b39be0d26d67b951fb369bfbe73f7ef75dbd1b7713ef34a69c609702
4
+ data.tar.gz: 6bd88aac60d93d779722799e96e583d876e34c352c07dca7ede1e0d5cd77dcbe
5
5
  SHA512:
6
- metadata.gz: 7ef87f990db2fff4d8d679e127a181ffc957dbdd7c9c995aec2bf489d61973d4a2d8acd3f161bcdedb3277cf841e24451d551989cfecaec83a4e7a49ace62f75
7
- data.tar.gz: ad732c08a12433986d7a2214c3f9cdcaf8704d555960a8ace5bc8c82f835276b216157394d215b38ec3e5426cd11c6273cc416f5a9ad055eba708380d1161421
6
+ metadata.gz: 1db16f7ad18c4b4f1418aefd245f40fd125bc3cc12e73b4bd90fbedafdbdc5280fc2ce4591049e0fdb1bd208b83301b2ff60bc25459c9f10181e465a31d3b2c3
7
+ data.tar.gz: '097d28aa7788ae0d33a41c8213de556ddf8a01f7ba07e965ae57093bcca134105cdb64546ffa34ab0d5ede6a59602c45a49ddbadb785eaab8371cb0dec552bcb'
data/lib/open_ai/dalle.rb CHANGED
@@ -2,13 +2,7 @@
2
2
 
3
3
  module Dalle
4
4
  def dalle
5
- if !allowed_chat?
6
- if chat_not_allowed_message
7
- return reply(chat_not_allowed_message, parse_mode: "Markdown")
8
- else
9
- return
10
- end
11
- end
5
+ return unless allowed_chat?
12
6
 
13
7
  attempt(3) do
14
8
  puts "Received a /dalle command"
@@ -3,11 +3,11 @@
3
3
  module Whisper
4
4
  def transcribe
5
5
  if !allowed_chat?
6
- if chat_not_allowed_message
7
- return reply(chat_not_allowed_message, parse_mode: "Markdown")
8
- else
9
- return
6
+ if @command == "/transcribe"
7
+ reply(chat_not_allowed_message) if chat_not_allowed_message
10
8
  end
9
+
10
+ return
11
11
  end
12
12
 
13
13
  attempt(3) do
data/main.rb CHANGED
@@ -6,9 +6,9 @@ require "yaml"
6
6
  require "down"
7
7
  require "rubydium"
8
8
 
9
- require_relative "app/open_ai_bot"
10
- require_relative "app/clean_bot"
11
- require_relative "app/my_custom_bot"
9
+ require_relative "lib/open_ai_bot"
10
+ require_relative "lib/clean_bot"
11
+ require_relative "lib/my_custom_bot"
12
12
 
13
13
  bots = {
14
14
  "open_ai" => OpenAIBot,
data/open_ai_bot.gemspec CHANGED
@@ -5,7 +5,7 @@ require_relative "lib/open_ai_bot"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "open_ai_bot"
8
- spec.version = "0.2.1"
8
+ spec.version = "0.2.2"
9
9
  spec.authors = ["bulgakke"]
10
10
  spec.email = ["vvp835@yandex.ru"]
11
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_ai_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bulgakke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-17 00:00:00.000000000 Z
11
+ date: 2023-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: down