raix 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/raix/predicate.rb +2 -2
- data/lib/raix/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: a2ae6f2ed473737e2d208868c2bdd458e12d391ebaae3d0930439267badc4d63
|
4
|
+
data.tar.gz: a93f7985ba809218e2fb7883ab31f0b0d246a769bbc7071fd6d60412bae5fd8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ae8374160c7ffe8f26db849a357b4c3403c58222cee941c90921e1961f1185d191111486b040b07af36c0a8aa54dd0721b11c6128cc2326c19be900a2a2154d
|
7
|
+
data.tar.gz: fa398a36ce224f3f8805f57b95378a5a7c589a45a4bf73f016ace860f7aa24be4680e168f4b51c6cc4dfedf3f80851073350a476779e1a7aeef0a2fd5e75283a
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/raix/predicate.rb
CHANGED
@@ -27,13 +27,13 @@ module Raix
|
|
27
27
|
base.extend(ClassMethods)
|
28
28
|
end
|
29
29
|
|
30
|
-
def ask(question)
|
30
|
+
def ask(question, openai: false)
|
31
31
|
raise "Please define a yes and/or no block" if self.class.yes_block.nil? && self.class.no_block.nil?
|
32
32
|
|
33
33
|
transcript << { system: "Always answer 'Yes, ', 'No, ', or 'Maybe, ' followed by a concise explanation!" }
|
34
34
|
transcript << { user: question }
|
35
35
|
|
36
|
-
chat_completion.tap do |response|
|
36
|
+
chat_completion(openai:).tap do |response|
|
37
37
|
if response.downcase.start_with?("yes,")
|
38
38
|
instance_exec(response, &self.class.yes_block) if self.class.yes_block
|
39
39
|
elsif response.downcase.start_with?("no,")
|
data/lib/raix/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Obie Fernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|