pwn 0.4.580 → 0.4.581

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: 6ae4532b1dee1229394edd0a05c463f5564b2a60c6b074a03ec620718135213e
4
- data.tar.gz: 274d7dcceae01727cd707806aad455e78f178866baf571795d3c4044817a3bc1
3
+ metadata.gz: 90a0815621e483ea69c20792de75ef779b6bdd4a6030d9b2b0845d8376ab894c
4
+ data.tar.gz: d48c4d3cd5654d2cc19c340ff9bd687d74d1a59030d7dc555622236b2fa52829
5
5
  SHA512:
6
- metadata.gz: 77ede4cbcb57adc8949eeffd331c0f5b0c8404ae6dd80941a51ed6ef747d309d3f682544022982752581db9df207d6af490fddbf1dd8a2e70577cc43fff401ac
7
- data.tar.gz: 9ce69103a872bbe97d8479b087e92a2f17f6df8f095058f4be39948c04b811b75650f4f6b052f9a6c5af1a5b1f4a284cb27dbab0bde79ad37cb93657dca97075
6
+ metadata.gz: 4c3bfe5b72312f6e4e231eb5628fe132da69ca9ef6b0af8d5d7b8a193205d2b335f1ab729ce53ac43d599cf9ab62884ae7fa342fd2cd6bc55d2f35e4b77cc430
7
+ data.tar.gz: 684f0707eea5e31f69073eed72d0fb98eb9e183ee6d0fddff46a4e342c7fd0f54b72a82ff4d39939e3e2bdd97cb24ecfcb67865b5d41332dbe39e7d309ad050b
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.3@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.580]:001 >>> PWN.help
40
+ pwn[v0.4.581]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.1.3@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.580]:001 >>> PWN.help
55
+ pwn[v0.4.581]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -96,7 +96,8 @@ module PWN
96
96
  # token: 'required - Bearer token',
97
97
  # request: 'required - message to ChatGPT'
98
98
  # model: 'optional - model to use for text generation (defaults to text-davinci-003)',
99
- # alt_response: 'optional boolean to generate a more creative response (defaults to false)'
99
+ # temp: 'optional - integer (deafults to 0)',
100
+ # max_tokens: 'optional - integer (deafults to 1024)'
100
101
  # )
101
102
 
102
103
  public_class_method def self.chat_gpt(opts = {})
@@ -104,14 +105,18 @@ module PWN
104
105
  request = opts[:request]
105
106
  model = opts[:model]
106
107
  model ||= 'text-davinci-003'
108
+ temp = opts[:temp].to_i
109
+ temp ||= 0
110
+ max_tokens = opts[:max_tokens].to_i
111
+ max_tokens ||= 1024
112
+
107
113
  rest_call = 'completions'
108
- rest_call = 'text-generations' if opts[:alt_response]
109
114
 
110
115
  http_body = {
111
116
  model: model,
112
117
  prompt: request,
113
- temperature: 0,
114
- max_tokens: 1024
118
+ temperature: temp,
119
+ max_tokens: max_tokens
115
120
  }
116
121
 
117
122
  response = open_ai_rest_call(
@@ -142,7 +147,8 @@ module PWN
142
147
  token: 'required - Bearer token',
143
148
  request: 'required - message to ChatGPT',
144
149
  model: 'optional - model to use for text generation (defaults to text-davinci-003)',
145
- alt_response: 'optional boolean to generate a more creative response (defaults to false)'
150
+ temp: 'optional - integer (deafults to 0)',
151
+ max_tokens: 'optional - integer (deafults to 1024)'
146
152
  )
147
153
 
148
154
  #{self}.authors
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.4.580'
4
+ VERSION = '0.4.581'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.580
4
+ version: 0.4.581
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.