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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/webshaker/ai.rb +2 -2
- data/lib/webshaker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c5228755a1344e15fa23300e628cddc67815e3b231917cf9721317997d02427
|
4
|
+
data.tar.gz: 159a730316441410231a83291899d3f69d31f6f84a5a0249e5a0302780e0420d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 342c4bfee8098c756cff385d874e99d7489e2cec1e91f4777a44dfda53febf2ad6fc68f5e2dcbc58ef70519d8fcd9b2180c00ea9aa1f50de72e2fdc6b5bd0e5a
|
7
|
+
data.tar.gz: 5c168c02a39d3d8d1dd798d938423153be85f793b4973a2cc3a26cd2572dcb6f195f41910c3d443cbe1c45b66026d11ff46d25ea299666c16d6e8cb6b28dc925
|
data/Gemfile.lock
CHANGED
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
|
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
|
data/lib/webshaker/version.rb
CHANGED