pwn 0.5.209 → 0.5.211

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03ffbb27d90a1f1e434cd0b695f6de71b06fd99457940a5318f24dfafda1a5f8
4
- data.tar.gz: a774f7856de8fb3510af93c947a5fc6602f30f47ea6052989ed6657d313f71e3
3
+ metadata.gz: b042b1ea3bd785b3e052abd01f519f3245ff44775bbcf96d69a1474f5396e611
4
+ data.tar.gz: 30cbb42b239c41b99a4ef4bb0968ebbb774075687c4930429f440d11b23c18d8
5
5
  SHA512:
6
- metadata.gz: b3a47696b87c8b7cde87a575a9d149e4b43c90e67717bb75878491d84e123e680820c805005439e1fdbd43dfa2ff8a75a2006be6a2987c1619171430b4bcb5af
7
- data.tar.gz: 4941e7e2c0430ba67f21f46f1edf1ee8562d11d8538e7ef4fd1deec441d8d969b21ec6eb291edb8f0bb102552c54647e89efc79076d9c448fca60ac709f1b7a3
6
+ metadata.gz: 55a115524f4642a6bb13434fd1b8821911ee05db968dc2a1002f77670d83f609186f012d5120994f1d1dafa1528eade6ff6baed01fbcc82bdcde40970e4cc9a5
7
+ data.tar.gz: 78f9b964a0dbea14f7590241afcf817fda9c161be87d78c33dbddc83dd48d087dc8ddb9a9be40600e5ba8b560fa911fb5397a5e5456e026f8296d0b77da2390d
data/Gemfile CHANGED
@@ -62,6 +62,7 @@ gem 'nokogiri-diff', '0.3.0'
62
62
  gem 'oily_png', '1.2.1'
63
63
  gem 'open3', '0.2.1'
64
64
  gem 'os', '1.1.4'
65
+ gem 'ostruct', '0.6.0'
65
66
  gem 'packetfu', '2.0.0'
66
67
  gem 'packetgen', '3.3.3'
67
68
  gem 'pdf-reader', '2.12.0'
@@ -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.209'
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.209
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
@@ -682,6 +682,20 @@ dependencies:
682
682
  - - '='
683
683
  - !ruby/object:Gem::Version
684
684
  version: 1.1.4
685
+ - !ruby/object:Gem::Dependency
686
+ name: ostruct
687
+ requirement: !ruby/object:Gem::Requirement
688
+ requirements:
689
+ - - '='
690
+ - !ruby/object:Gem::Version
691
+ version: 0.6.0
692
+ type: :runtime
693
+ prerelease: false
694
+ version_requirements: !ruby/object:Gem::Requirement
695
+ requirements:
696
+ - - '='
697
+ - !ruby/object:Gem::Version
698
+ version: 0.6.0
685
699
  - !ruby/object:Gem::Dependency
686
700
  name: packetfu
687
701
  requirement: !ruby/object:Gem::Requirement