llmshim 0.21.1 → 0.22.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 +4 -4
- data/lib/llmshim/types.rb +10 -2
- data/lib/llmshim/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: 7a57de038c27f76b1ef431bd022beac4c6fe02a7bb09991996e0193727e0fc1b
|
|
4
|
+
data.tar.gz: ba13f3e71cb294f074d484694a6d33290874ed5162f1a9522f1fd6984213f60e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d925622f7504cc4355b7b799ac735f557db25806a482187b622c5aa1f85104c12192fae9fbf2840f3f4861cd4ea5ef1a772f6f7cd4b5337eedc5fd8d86c0877
|
|
7
|
+
data.tar.gz: c94a780b5312067587ffbc66e6aff1087b8085f4acef9327bfbef016ebd92c0f84e19c49ba6d4be85830993db74c2547b09d87edbaf3180c3022356eb6f0d397
|
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(
|
|
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,
|
|
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
|
data/lib/llmshim/version.rb
CHANGED