bitfab 0.74.3 → 0.75.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/bitfab/verdicts.rb +17 -2
- data/lib/bitfab/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: 6976d07abea8e8c456185b0f5a76bbe861148e2a10baa1c3a65ac1a694b6993d
|
|
4
|
+
data.tar.gz: 072af5081f4c15e748478dbd058a8cc4c249804b345dcc70ed47b3e47f3c5830
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5189232282c64908bada35335eac364e16bb6fcadfe9b677cdc5b3330735f59dbdebc6ff71fe4a2984ad1a5c8386b45ade841710c0b2ec1ac0d26c0d07c7d44f
|
|
7
|
+
data.tar.gz: 90b5fd0acb0d266e6f2e7d2b6d04dc4a08c66d3e1b25ce46f51425e5020cf372167c40ba141cf05c9f7e4f2348cc9a106f1888e9a5b792bbbe9a4f08d2bb0b80
|
data/lib/bitfab/verdicts.rb
CHANGED
|
@@ -194,12 +194,27 @@ module Bitfab
|
|
|
194
194
|
end
|
|
195
195
|
end
|
|
196
196
|
|
|
197
|
-
# Reads one trace's verdicts, or nil when the trace has none.
|
|
197
|
+
# Reads one trace's verdicts, or nil when the trace has none. See {#get_all} for the shape of each
|
|
198
|
+
# "evidence" item.
|
|
198
199
|
def get(trace_id)
|
|
199
200
|
get_all([trace_id]).first
|
|
200
201
|
end
|
|
201
202
|
|
|
202
|
-
# Reads the verdicts of several traces.
|
|
203
|
+
# Reads the verdicts of several traces. Each trace and each entry of its "assertions" carries
|
|
204
|
+
# "evidence": nil, or an array of hashes, one per span cited, each with "spanId" and "text".
|
|
205
|
+
#
|
|
206
|
+
# Evidence written by Bitfab's assertion judge also carries "field", "ranges", and "spanChanged",
|
|
207
|
+
# which point at the exact passages the judge read. "field" is the span field the judge read
|
|
208
|
+
# ("summary", "input", "output", "reasoning", "content", "metadata", "errors", "contexts", or
|
|
209
|
+
# "llm_usage"). "ranges" are [start, end) character ranges into that field's text as the judge saw
|
|
210
|
+
# it: a string field as is, any other value as JSON indented by two spaces. Indexes are JavaScript
|
|
211
|
+
# string indexes (UTF-16 code units), not Ruby character indexes, so text outside the Basic
|
|
212
|
+
# Multilingual Plane counts two per character. Use them to highlight only when "spanChanged" is false.
|
|
213
|
+
#
|
|
214
|
+
# "spanChanged" is true when the span no longer matches what was judged: "text" is then only a short
|
|
215
|
+
# preview saved with the verdict, and "ranges" must not be used to highlight anything. When it is
|
|
216
|
+
# false, "text" is the full text of "ranges" read from the span, joined by a newline, an ellipsis,
|
|
217
|
+
# and a newline. Unknown keys are passed through as the server sent them.
|
|
203
218
|
def get_all(trace_ids)
|
|
204
219
|
return [] if trace_ids.empty?
|
|
205
220
|
|
data/lib/bitfab/version.rb
CHANGED