pwn 0.5.210 → 0.5.211
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pwn/plugins/repl.rb +16 -12
- data/lib/pwn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b042b1ea3bd785b3e052abd01f519f3245ff44775bbcf96d69a1474f5396e611
|
4
|
+
data.tar.gz: 30cbb42b239c41b99a4ef4bb0968ebbb774075687c4930429f440d11b23c18d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55a115524f4642a6bb13434fd1b8821911ee05db968dc2a1002f77670d83f609186f012d5120994f1d1dafa1528eade6ff6baed01fbcc82bdcde40970e4cc9a5
|
7
|
+
data.tar.gz: 78f9b964a0dbea14f7590241afcf817fda9c161be87d78c33dbddc83dd48d087dc8ddb9a9be40600e5ba8b560fa911fb5397a5e5456e026f8296d0b77da2390d
|
data/lib/pwn/plugins/repl.rb
CHANGED
@@ -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
|
643
|
-
last_response =
|
642
|
+
if response.nil?
|
643
|
+
last_response = "Model: #{model} not currently supported with API key."
|
644
644
|
else
|
645
|
-
|
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
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.
|
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-
|
11
|
+
date: 2024-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|