riffer 0.57.1 → 0.57.2
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/.release-please-manifest.json +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +7 -0
- data/lib/riffer/messages/assistant/reasoning_part.rb +1 -1
- data/lib/riffer/messages/assistant/server_tool_part.rb +5 -1
- data/lib/riffer/messages/assistant/tool_call.rb +4 -3
- data/lib/riffer/messages/system.rb +2 -1
- data/lib/riffer/messages/tool.rb +6 -1
- data/lib/riffer/messages/user.rb +2 -1
- data/lib/riffer/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: 5a0b2c4a5de151eb7d6b04fcdb294109ec985016e3c0a664518215c0056b6b3d
|
|
4
|
+
data.tar.gz: 2b07877eead03fca26a9f59418c9b590cbb4b65fcfc9d39c947c470e79c3b48f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a815d376b2ade4129f162ae0ae2e1c526fcc0fabe6a29901a26ee0a621c1c17b3ec7452faf379e880f0c4d08fc3ee8b783f1bad6d0242645a8890c9ce7aadb30
|
|
7
|
+
data.tar.gz: c15a1e4521e950f9d6b11565e0cfbfeeff25950beaf2ad3445a90074fce85f8fa652ae89a8e2e30f52ec84a60643b7057564fbfaff4e5fd1ed8b8ee46592d3e2
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.10
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.57.2](https://github.com/janeapp/riffer/compare/riffer/v0.57.1...riffer/v0.57.2) (2026-11-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **messages:** raise Riffer::ArgumentError for message hashes missing fields ([#590](https://github.com/janeapp/riffer/issues/590)) ([e85e6c2](https://github.com/janeapp/riffer/commit/e85e6c2392ecdc9e26f7bbdb09da2364176e35c7))
|
|
14
|
+
|
|
8
15
|
## [0.57.1](https://github.com/janeapp/riffer/compare/riffer/v0.57.0...riffer/v0.57.1) (2026-11-13)
|
|
9
16
|
|
|
10
17
|
|
|
@@ -22,7 +22,7 @@ class Riffer::Messages::Assistant::ReasoningPart
|
|
|
22
22
|
return part if part.is_a?(Riffer::Messages::Assistant::ReasoningPart)
|
|
23
23
|
|
|
24
24
|
new(
|
|
25
|
-
type: part[:type]
|
|
25
|
+
type: part[:type]&.to_sym,
|
|
26
26
|
text: part[:text],
|
|
27
27
|
data: part[:data],
|
|
28
28
|
signature: part[:signature],
|
|
@@ -23,9 +23,13 @@ class Riffer::Messages::Assistant::ServerToolPart
|
|
|
23
23
|
def self.from_hash(part)
|
|
24
24
|
return part if part.is_a?(Riffer::Messages::Assistant::ServerToolPart)
|
|
25
25
|
|
|
26
|
+
if part.values_at(:name, :data).any?(&:nil?)
|
|
27
|
+
raise Riffer::ArgumentError, "Server tool part hash must include :name and :data"
|
|
28
|
+
end
|
|
29
|
+
|
|
26
30
|
new(
|
|
27
31
|
name: part[:name],
|
|
28
|
-
kind: part[:kind]
|
|
32
|
+
kind: part[:kind]&.to_sym,
|
|
29
33
|
data: part[:data],
|
|
30
34
|
id: part[:id],
|
|
31
35
|
format: part[:format],
|
|
@@ -14,11 +14,12 @@ class Riffer::Messages::Assistant::ToolCall
|
|
|
14
14
|
def self.from_hash(call)
|
|
15
15
|
return call if call.is_a?(Riffer::Messages::Assistant::ToolCall)
|
|
16
16
|
|
|
17
|
-
if call.values_at(:call_id, :name
|
|
18
|
-
raise Riffer::ArgumentError, "Tool call hash must include :call_id
|
|
17
|
+
if call.values_at(:call_id, :name).any?(&:nil?)
|
|
18
|
+
raise Riffer::ArgumentError, "Tool call hash must include :call_id and :name"
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
# A call without arguments can carry "", which a source that drops blank strings omits.
|
|
22
|
+
new(call_id: call[:call_id], name: call[:name], arguments: call[:arguments] || "")
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
#--
|
|
@@ -7,7 +7,8 @@ class Riffer::Messages::System < Riffer::Messages::Base
|
|
|
7
7
|
def self.from_hash(msg)
|
|
8
8
|
return msg if msg.is_a?(Riffer::Messages::System)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
# An empty prompt is "", which a source that drops blank strings omits.
|
|
11
|
+
new(msg[:content] || "", id: msg[:id])
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
#--
|
data/lib/riffer/messages/tool.rb
CHANGED
|
@@ -7,8 +7,13 @@ class Riffer::Messages::Tool < Riffer::Messages::Base
|
|
|
7
7
|
def self.from_hash(msg)
|
|
8
8
|
return msg if msg.is_a?(Riffer::Messages::Tool)
|
|
9
9
|
|
|
10
|
+
if msg.values_at(:tool_call_id, :name).any?(&:nil?)
|
|
11
|
+
raise Riffer::ArgumentError, "Tool message hash must include :tool_call_id and :name"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# An empty result is "", which a source that drops blank strings omits.
|
|
10
15
|
new(
|
|
11
|
-
msg[:content],
|
|
16
|
+
msg[:content] || "",
|
|
12
17
|
id: msg[:id],
|
|
13
18
|
tool_call_id: msg[:tool_call_id],
|
|
14
19
|
name: msg[:name],
|
data/lib/riffer/messages/user.rb
CHANGED
|
@@ -8,7 +8,8 @@ class Riffer::Messages::User < Riffer::Messages::Base
|
|
|
8
8
|
return msg if msg.is_a?(Riffer::Messages::User)
|
|
9
9
|
|
|
10
10
|
files = (msg[:files] || []).map { |f| Riffer::Messages::User::FilePart.from_hash(f) }
|
|
11
|
-
|
|
11
|
+
# An empty prompt is "", which a source that drops blank strings omits.
|
|
12
|
+
new(msg[:content] || "", id: msg[:id], files: files)
|
|
12
13
|
end
|
|
13
14
|
|
|
14
15
|
attr_reader :files #: Array[Riffer::Messages::User::FilePart] # @dynamic files
|
data/lib/riffer/version.rb
CHANGED