llmshim 0.21.1 → 0.23.0

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: b979911532899706decd1289627c234e1b4ceaaa663f3a9f7e58739d2e31c172
4
- data.tar.gz: d07ba862b903f58e5849b6d2aa6a30f073a243a94584047d7890b6bb071f914a
3
+ metadata.gz: '068743ebb78a9b84138ba7f065e71b774baab22205cc090c5799545dadf7d211'
4
+ data.tar.gz: 1efb89ebc7ec2968d3d5fcd64653ff8048fafdad53c35f43ea97fd92dfd45f9d
5
5
  SHA512:
6
- metadata.gz: 123d4dc688b29a310556b7bb44b62f1038418ebe15c6394036a64be95c860067b2f24194303c8e48afbdf68986b760a0ae9ccbb97e6f07d68376c1d02e85c408
7
- data.tar.gz: d8a7580dcb4f0629beeb3256e52d8816934ba771a597b6073fe906022659c174ebcffe9ddb83c6ada42fae61e53728fb0f71e3a4936a55a8f8c7676adf34ee1b
6
+ metadata.gz: a086c7818fa9b3bf00d21f5cf9474abc19b397ff379ee6b03f58af6bf58f4411f8063dfde2f9d0ba033f7de1152f827f69ff164858ee83ca1921c7f6a66d558d
7
+ data.tar.gz: 2ee9d33c46c9586153e428fa28e2d498234be06f2ed42bc647ac383cfaff38d76d25f1d60180b6937a46ae7d7e40de1b37584cb35426a09641f0ae0110ea4b7b
data/lib/llmshim/types.rb CHANGED
@@ -56,10 +56,14 @@ module Llmshim
56
56
  end
57
57
 
58
58
  # The assistant message inside a ChatResponse.
59
- ResponseMessage = Struct.new(:role, :content, :tool_calls, :reasoning, :refusal, keyword_init: true) do
59
+ ResponseMessage = Struct.new(
60
+ :role, :content, :tool_calls, :reasoning, :refusal, :responses_output, keyword_init: true
61
+ ) do
60
62
  def self.from_hash(hash)
61
63
  calls = (hash["tool_calls"] || []).map { |c| ToolCall.from_hash(c) }
62
- new(role: hash["role"], content: hash["content"], tool_calls: calls, reasoning: hash["reasoning"], refusal: hash["refusal"])
64
+ new(role: hash["role"], content: hash["content"], tool_calls: calls,
65
+ reasoning: hash["reasoning"], refusal: hash["refusal"],
66
+ responses_output: hash["responses_output"])
63
67
  end
64
68
 
65
69
  def to_json(*args)
@@ -150,6 +154,10 @@ module Llmshim
150
154
  raw["x-llmshim-served-model"]
151
155
  end
152
156
 
157
+ def responses_output
158
+ raw["responses_output"]
159
+ end
160
+
153
161
  def done?
154
162
  type == "done"
155
163
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Llmshim
4
- VERSION = "0.21.1"
4
+ VERSION = "0.23.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llmshim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sanjay Nadhavajhala