fast-embeddings 0.1.0 → 0.1.1
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/CHANGELOG.md +12 -0
- data/lib/fast/embeddings/client.rb +9 -3
- data/lib/fast/embeddings/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: 66b6f9f33713b72bf773498931e548ab09411d577c0d9664c0fbf1f25c8fc2e6
|
|
4
|
+
data.tar.gz: 6948b2261f41cd506b4cf42ee32af500f4e9a39c707b3ce7fc84938a3486bffa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a0c71513fc9223ba258732c8cad778d030b6c380d6b1933c823f64d3e432eb52fd075c4e853ced318774d45ff0c73725e87cc2ec6ca59b2fa819fb4779e65d2
|
|
7
|
+
data.tar.gz: 441a76b1d9d30b94f1d6afc51382383f46090a49a90ff2d160efec4071dcf110a1d3bcba2dbf6b7071c5cd199b8f1a2bb8a7614b776aede5c7c459b4786452aa
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
Notable changes to the fast-embeddings gem. The format is prose-first,
|
|
4
4
|
one section per released version, newest first.
|
|
5
5
|
|
|
6
|
+
## 0.1.1 (2026-11-24)
|
|
7
|
+
|
|
8
|
+
- Fixed a live-transport read defect: replies are now read to EOF with
|
|
9
|
+
`body.join` instead of a single `body.read`. Live transports deliver
|
|
10
|
+
large replies FRAMED — a one-chunk 1024-dim bge-m3 reply is ~22KB in
|
|
11
|
+
~8KB frames, and `Body#read` returns one frame, so 0.1.0 parsed
|
|
12
|
+
mid-float and raised `ResponseError` on real wires while hermetic
|
|
13
|
+
single-write mocks stayed green. The error path reads the same way
|
|
14
|
+
(a framed error body would otherwise truncate into the taxonomy's
|
|
15
|
+
raw-body fallback). The mock server gained a `frames:` delivery mode
|
|
16
|
+
and the suite a framed-reply regression spec.
|
|
17
|
+
|
|
6
18
|
## 0.1.0 (2026-11-24)
|
|
7
19
|
|
|
8
20
|
- Initial release: the pure OpenAI embeddings wire as a gem.
|
|
@@ -84,7 +84,11 @@ module Fast
|
|
|
84
84
|
watchdog.arm
|
|
85
85
|
response = @client.post(@path, headers: headers_for(api_key), body: body)
|
|
86
86
|
raise_api_error(response) unless (200...300).cover?(response.status)
|
|
87
|
-
|
|
87
|
+
# join, never a single read: live transports deliver large replies
|
|
88
|
+
# FRAMED (one 1024-dim bge-m3 reply is ~22KB in ~8KB frames) and
|
|
89
|
+
# Body#read returns ONE frame — 0.1.0 parsed mid-float and failed
|
|
90
|
+
# live while hermetic mocks (single TCP write) stayed green.
|
|
91
|
+
result = parse_result(response.body.join)
|
|
88
92
|
rescue Async::Cancel
|
|
89
93
|
raise(TimeoutError, "no data within #{@timeout}s") if watchdog.fired
|
|
90
94
|
|
|
@@ -130,9 +134,11 @@ module Fast
|
|
|
130
134
|
raise ArgumentError, "input must be a non-empty Array of Strings"
|
|
131
135
|
end
|
|
132
136
|
|
|
133
|
-
# Non-2xx: read the body, map to the frozen taxonomy.
|
|
137
|
+
# Non-2xx: read the body, map to the frozen taxonomy. join for the
|
|
138
|
+
# same framing reason as the success path — a framed error body
|
|
139
|
+
# would otherwise truncate into the taxonomy's raw-body fallback.
|
|
134
140
|
def raise_api_error(response)
|
|
135
|
-
body = response.body.
|
|
141
|
+
body = response.body.join
|
|
136
142
|
raise Errors.class_for_status(response.status, body).new(status: response.status, body: body)
|
|
137
143
|
end
|
|
138
144
|
|