webshaker 0.0.3 → 0.0.4

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: 4b03ca48d3495f70d5097d85325b4ab917b4ff0217b6634fcc50a9649e7ffc5e
4
- data.tar.gz: 12925527140a41b0dd5e64a5551292a0fc97a7d42221bbe636d6517ec3d8d6ac
3
+ metadata.gz: 2c5228755a1344e15fa23300e628cddc67815e3b231917cf9721317997d02427
4
+ data.tar.gz: 159a730316441410231a83291899d3f69d31f6f84a5a0249e5a0302780e0420d
5
5
  SHA512:
6
- metadata.gz: 2e2bc1973b04b9fec176b7cde9aa07908c29b83a9ec074d25d983e5f2b025b60b84ce6635483566325222868224f598d07ce9a8e7d4d778873104f920a0369d8
7
- data.tar.gz: 88ac426fa0c12c9e2e2a45e2cf6ed23264402ef05c9be30f9cbd0b18c83caba46d38f26665197fb354161b7efb9fd692b8f0474928f990f8b613c0552f38ca6d
6
+ metadata.gz: 342c4bfee8098c756cff385d874e99d7489e2cec1e91f4777a44dfda53febf2ad6fc68f5e2dcbc58ef70519d8fcd9b2180c00ea9aa1f50de72e2fdc6b5bd0e5a
7
+ data.tar.gz: 5c168c02a39d3d8d1dd798d938423153be85f793b4973a2cc3a26cd2572dcb6f195f41910c3d443cbe1c45b66026d11ff46d25ea299666c16d6e8cb6b28dc925
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webshaker (0.0.3)
4
+ webshaker (0.0.4)
5
5
  nokogiri
6
6
  ruby-openai
7
7
  selenium-webdriver (~> 4.0)
data/lib/webshaker/ai.rb CHANGED
@@ -6,7 +6,7 @@ module Webshaker
6
6
  @html_content = html_content
7
7
  end
8
8
 
9
- def analyze(with_prompt:, respond_with: :text, temperature: 0.8)
9
+ def analyze(with_prompt:, respond_with: :text, temperature: 0.8, full_response: false)
10
10
  response = ai_client.chat(
11
11
  parameters: {
12
12
  model: Webshaker.config.model,
@@ -18,7 +18,7 @@ module Webshaker
18
18
  )
19
19
 
20
20
  # Return full response from the ai client if the respond_with is set to :full
21
- return response if respond_with === :full
21
+ return response if full_response
22
22
 
23
23
  response = response["choices"][0]["message"]["content"]
24
24
  response = JSON.parse(response) if respond_with === :json
@@ -1,3 +1,3 @@
1
1
  module Webshaker
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Mochetti