You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a74f981
Browse filesBrowse the repository at this point in the historyBrowse files
`embedTexts(texts, config, options?)` batches sequentially, posts each batch to
34
34
`{baseURL}/embeddings`, and returns vectors in input order. `options` is
35
-
optional: `deps` (defaults to global `fetch` and `createDefaultScheduler()`),
35
+
optional: `deps` (defaults to global `fetch` and `@intx/inference`'s
36
+
`createDefaultScheduler()`),
36
37
`retryPolicy`, `extractRetryAfterMs`, and `signal`.
37
38
38
39
## Dimensionality
@@ -41,11 +42,11 @@ optional: `deps` (defaults to global `fetch` and `createDefaultScheduler()`),
41
42
42
43
## Errors
43
44
44
-
Every failure — transport, HTTP status, or a 200 with an unexpected body — throws `EmbeddingRequestError` (`extends Error`), carrying the classified `InferenceError` as `reason` and the request `url`. A config that fails `EmbedConfigSchema` throws before any request.
45
+
Every request failure — transport, HTTP status, or a 200 with an unexpected body — throws `EmbeddingRequestError` (`extends Error`), carrying the classified `InferenceError` as `reason` and the request `url`. A config that fails `EmbedConfigSchema` throws arktype's `TraversalError` before any request.
45
46
46
47
## Using with Interchange
47
48
48
-
Transport, error classification, and retry build on `@intx/inference`: requests go through `deps.fetch`, failures classify into `InferenceError` just like chat calls, and `createDefaultRetryPolicy`guides backoff. A 429 from an embeddings endpoint behaves like one from a chat endpoint, and credential failures short-circuit. `@intx/inference` and `@intx/types` are peer dependencies, so the host's Interchange version is the one used.
49
+
Requests go through `deps.fetch`, failures are classified into `@intx/inference`'s `InferenceError`, and `createDefaultRetryPolicy`decides retries: a 429 backs off and retries, a credential failure does not. `@intx/inference` and `@intx/types` are peer dependencies, so the host's Interchange version is the one used.
0 commit comments