pwn 0.5.210 → 0.5.211

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: 361b33380a6f528dc2cc78a4cd403b5a9114d319237e6703584f7ea325fe22a1
4
- data.tar.gz: 03e63ef8cba3b0a0b77425b8e25d45292c8f660bc4ff6568ce28566cbf7d7a7e
3
+ metadata.gz: b042b1ea3bd785b3e052abd01f519f3245ff44775bbcf96d69a1474f5396e611
4
+ data.tar.gz: 30cbb42b239c41b99a4ef4bb0968ebbb774075687c4930429f440d11b23c18d8
5
5
  SHA512:
6
- metadata.gz: 7143125cec3c6e0a3b594070aff1d33e6047727cd5fb2e3e8f79ef49ed7136cba384a1150bb32084e4bdd8bd88fed222b21196f27c90db35c99d7695a04b13fe
7
- data.tar.gz: 59739d8a5df55eb280222fb49004043fb299d569ef9cb77769f7402ce3a9b6f56de81faead1f0a8b305138042b48bd6fdb4efcb0923882ebd9cdb3d15fa06b2d
6
+ metadata.gz: 55a115524f4642a6bb13434fd1b8821911ee05db968dc2a1002f77670d83f609186f012d5120994f1d1dafa1528eade6ff6baed01fbcc82bdcde40970e4cc9a5
7
+ data.tar.gz: 78f9b964a0dbea14f7590241afcf817fda9c161be87d78c33dbddc83dd48d087dc8ddb9a9be40600e5ba8b560fa911fb5397a5e5456e026f8296d0b77da2390d
@@ -636,24 +636,28 @@ module PWN
636
636
  else
637
637
  raise "ERROR: Unsupported AI Engine: #{ai_engine}"
638
638
  end
639
+ # puts response.inspect
639
640
 
640
- # puts response[:choices].inspect
641
641
  last_response = ''
642
- if response[:choices].last.keys.include?(:text)
643
- last_response = response[:choices].last[:text]
642
+ if response.nil?
643
+ last_response = "Model: #{model} not currently supported with API key."
644
644
  else
645
- last_response = response[:choices].last[:content]
645
+ if response[:choices].last.keys.include?(:text)
646
+ last_response = response[:choices].last[:text]
647
+ else
648
+ last_response = response[:choices].last[:content]
649
+ end
650
+
651
+ response_history = {
652
+ id: response[:id],
653
+ object: response[:object],
654
+ model: response[:model],
655
+ usage: response[:usage]
656
+ }
657
+ response_history[:choices] ||= response[:choices]
646
658
  end
647
659
  puts "\n\001\e[32m\002#{last_response}\001\e[0m\002\n\n"
648
660
 
649
- response_history = {
650
- id: response[:id],
651
- object: response[:object],
652
- model: response[:model],
653
- usage: response[:usage]
654
- }
655
- response_history[:choices] ||= response[:choices]
656
-
657
661
  if debug
658
662
  puts 'DEBUG: response_history => '
659
663
  pp response_history
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.5.210'
4
+ VERSION = '0.5.211'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.210
4
+ version: 0.5.211
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-26 00:00:00.000000000 Z
11
+ date: 2024-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport