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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27b3ab0bd21ca08ecf0b23985b1e04b1787cfdb60e534744ff32234869930989
4
- data.tar.gz: 822f7fe8ac7c76ce77aefff637b9d5e3163b904073329bcfb99e6d3661d38c48
3
+ metadata.gz: a2ae6f2ed473737e2d208868c2bdd458e12d391ebaae3d0930439267badc4d63
4
+ data.tar.gz: a93f7985ba809218e2fb7883ab31f0b0d246a769bbc7071fd6d60412bae5fd8d
5
5
  SHA512:
6
- metadata.gz: 2d469ff07f10f1085c40f4bc456c91f753e65b09304757eb95e77fe73df13c5ba334bdfa22f3649160c863e6ff268cde4e595f92221556a7d2761667e2a35d3c
7
- data.tar.gz: a8e367b6e85adee53056ead496c97806deaba156dcab82634763c773f52e8d4e5c60c213669bdc3d8620c301e22b24862ec7f01fe77ee7c880b633b3d919b30c
6
+ metadata.gz: 3ae8374160c7ffe8f26db849a357b4c3403c58222cee941c90921e1961f1185d191111486b040b07af36c0a8aa54dd0721b11c6128cc2326c19be900a2a2154d
7
+ data.tar.gz: fa398a36ce224f3f8805f57b95378a5a7c589a45a4bf73f016ace860f7aa24be4680e168f4b51c6cc4dfedf3f80851073350a476779e1a7aeef0a2fd5e75283a
data/CHANGELOG.md CHANGED
@@ -28,3 +28,6 @@
28
28
  ## [0.4.5] - 2024-11-11
29
29
  - adds support for `ResponseFormat`
30
30
  - added some missing requires to support String#squish
31
+
32
+ ## [0.4.6] - 2024-11-12
33
+ - adds missing openai support for `Predicate`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- raix (0.4.4)
4
+ raix (0.4.6)
5
5
  activesupport (>= 6.0)
6
6
  open_router (~> 0.2)
7
7
  ruby-openai (~> 7.0)
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Raix
4
- VERSION = "0.4.5"
4
+ VERSION = "0.4.6"
5
5
  end
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.5
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-11 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport