@anuma/sdk 8.1.0 → 9.0.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.
- package/README.md +2 -3
- package/dist/expo/index.cjs +472 -171
- package/dist/expo/index.d.mts +68 -6
- package/dist/expo/index.d.ts +68 -6
- package/dist/expo/index.mjs +469 -171
- package/dist/index.cjs +9 -3
- package/dist/index.mjs +9 -3
- package/dist/memory/context.d.mts +1 -1
- package/dist/memory/context.d.ts +1 -1
- package/dist/react/index.cjs +472 -171
- package/dist/react/index.d.mts +68 -6
- package/dist/react/index.d.ts +68 -6
- package/dist/react/index.mjs +469 -171
- package/dist/server/index.cjs +49 -14
- package/dist/server/index.d.mts +23 -4
- package/dist/server/index.d.ts +23 -4
- package/dist/server/index.mjs +49 -14
- package/dist/tools/selection/index.cjs +9 -3
- package/dist/tools/selection/index.mjs +9 -3
- package/package.json +2 -3
package/dist/index.cjs
CHANGED
|
@@ -2293,11 +2293,17 @@ async function generateEmbeddingsBatch(texts, headers, baseUrl, model, onUsage,
|
|
|
2293
2293
|
}
|
|
2294
2294
|
return response.data.data.map((item) => item.embedding ?? []);
|
|
2295
2295
|
}
|
|
2296
|
-
async function generateEmbeddings(texts, options) {
|
|
2296
|
+
async function generateEmbeddings(texts, options, signal) {
|
|
2297
|
+
signal?.throwIfAborted();
|
|
2297
2298
|
if (texts.length === 0) return [];
|
|
2298
2299
|
const total = options.totalTimeoutMs;
|
|
2299
|
-
if (total === void 0) return embedMany(texts, options,
|
|
2300
|
-
return withDeadline(
|
|
2300
|
+
if (total === void 0) return embedMany(texts, options, signal);
|
|
2301
|
+
return withDeadline(
|
|
2302
|
+
(inner) => embedMany(texts, options, inner),
|
|
2303
|
+
total,
|
|
2304
|
+
"embedding batch",
|
|
2305
|
+
signal
|
|
2306
|
+
);
|
|
2301
2307
|
}
|
|
2302
2308
|
async function embedMany(texts, options, outer) {
|
|
2303
2309
|
const { baseUrl = BASE_URL, model, batchSize, cache } = options;
|
package/dist/index.mjs
CHANGED
|
@@ -2089,11 +2089,17 @@ async function generateEmbeddingsBatch(texts, headers, baseUrl, model, onUsage,
|
|
|
2089
2089
|
}
|
|
2090
2090
|
return response.data.data.map((item) => item.embedding ?? []);
|
|
2091
2091
|
}
|
|
2092
|
-
async function generateEmbeddings(texts, options) {
|
|
2092
|
+
async function generateEmbeddings(texts, options, signal) {
|
|
2093
|
+
signal?.throwIfAborted();
|
|
2093
2094
|
if (texts.length === 0) return [];
|
|
2094
2095
|
const total = options.totalTimeoutMs;
|
|
2095
|
-
if (total === void 0) return embedMany(texts, options,
|
|
2096
|
-
return withDeadline(
|
|
2096
|
+
if (total === void 0) return embedMany(texts, options, signal);
|
|
2097
|
+
return withDeadline(
|
|
2098
|
+
(inner) => embedMany(texts, options, inner),
|
|
2099
|
+
total,
|
|
2100
|
+
"embedding batch",
|
|
2101
|
+
signal
|
|
2102
|
+
);
|
|
2097
2103
|
}
|
|
2098
2104
|
async function embedMany(texts, options, outer) {
|
|
2099
2105
|
const { baseUrl = BASE_URL, model, batchSize, cache } = options;
|
|
@@ -669,7 +669,7 @@ interface RecallDiagnostics {
|
|
|
669
669
|
degraded: RecallDegradation[];
|
|
670
670
|
}
|
|
671
671
|
|
|
672
|
-
declare const FACT_TYPES: readonly ["identity", "preference", "relationship", "plan", "ongoing_context", "constraint", "other"];
|
|
672
|
+
declare const FACT_TYPES: readonly ["identity", "preference", "relationship", "plan", "ongoing_context", "constraint", "instruction", "other"];
|
|
673
673
|
type FactType = (typeof FACT_TYPES)[number];
|
|
674
674
|
|
|
675
675
|
/**
|
package/dist/memory/context.d.ts
CHANGED
|
@@ -669,7 +669,7 @@ interface RecallDiagnostics {
|
|
|
669
669
|
degraded: RecallDegradation[];
|
|
670
670
|
}
|
|
671
671
|
|
|
672
|
-
declare const FACT_TYPES: readonly ["identity", "preference", "relationship", "plan", "ongoing_context", "constraint", "other"];
|
|
672
|
+
declare const FACT_TYPES: readonly ["identity", "preference", "relationship", "plan", "ongoing_context", "constraint", "instruction", "other"];
|
|
673
673
|
type FactType = (typeof FACT_TYPES)[number];
|
|
674
674
|
|
|
675
675
|
/**
|