webshaker 0.0.4 → 0.0.5

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: 2c5228755a1344e15fa23300e628cddc67815e3b231917cf9721317997d02427
4
- data.tar.gz: 159a730316441410231a83291899d3f69d31f6f84a5a0249e5a0302780e0420d
3
+ metadata.gz: e700f078decefd7d40b3469a5ae290c0746481a8d13f214c4020805b10660f20
4
+ data.tar.gz: 00cbe24e7355ba81e2d54dece6a1e2272e6aae8db52f929eae13053a1d5082b2
5
5
  SHA512:
6
- metadata.gz: 342c4bfee8098c756cff385d874e99d7489e2cec1e91f4777a44dfda53febf2ad6fc68f5e2dcbc58ef70519d8fcd9b2180c00ea9aa1f50de72e2fdc6b5bd0e5a
7
- data.tar.gz: 5c168c02a39d3d8d1dd798d938423153be85f793b4973a2cc3a26cd2572dcb6f195f41910c3d443cbe1c45b66026d11ff46d25ea299666c16d6e8cb6b28dc925
6
+ metadata.gz: 91082a99565064c4ad876d1b175024bfc5dc2a6291d16f2f22eb9613903eba3e34da16e196d0823e10547eaec9b2b9948c57835894e50d4adeaf18daa7adf2a5
7
+ data.tar.gz: 9d477bbd2420dd3a3b8c3938e26edd0a2c4e0f911743b41094d6991fae54931e2c768469cb3cb7e38b34ec84ef5fd04e54b02c40f522635c9aa6ffdd0710b51c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webshaker (0.0.4)
4
+ webshaker (0.0.5)
5
5
  nokogiri
6
6
  ruby-openai
7
7
  selenium-webdriver (~> 4.0)
data/lib/webshaker/ai.rb CHANGED
@@ -13,7 +13,7 @@ module Webshaker
13
13
  messages: messages(with_prompt).concat((respond_with.to_sym == :json) ? [{role: "user", content: "respond with json"}] : []),
14
14
  temperature:
15
15
  }.merge(
16
- (respond_with == :json) ? {response_format: {type: "json_object"}} : {}
16
+ (respond_with.to_sym == :json) ? {response_format: {type: "json_object"}} : {}
17
17
  )
18
18
  )
19
19
 
@@ -21,7 +21,7 @@ module Webshaker
21
21
  return response if full_response
22
22
 
23
23
  response = response["choices"][0]["message"]["content"]
24
- response = JSON.parse(response) if respond_with === :json
24
+ response = JSON.parse(response) if respond_with.to_sym === :json
25
25
  response
26
26
  end
27
27
 
@@ -1,3 +1,3 @@
1
1
  module Webshaker
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webshaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Mochetti