@roomle/embedding-lib 0.0.0-dev-d66646c → 0.0.0-dev-86c52f1

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.
@@ -1,48 +0,0 @@
1
- type Usage = {
2
- inputTokens?: number;
3
- outputTokens?: number;
4
- totalTokens?: number;
5
- inputTokenDetails?: {
6
- noCacheTokens?: number;
7
- cacheReadTokens?: number;
8
- cacheWriteTokens?: number;
9
- };
10
- outputTokenDetails?: {
11
- reasoningTokens?: number;
12
- };
13
- raw?: Record<string, unknown>;
14
- };
15
- export declare const usageDetails: (usage?: Usage) => {
16
- cacheReadTokens: number;
17
- cacheWriteTokens: number;
18
- noCacheTokens: number;
19
- reasoningTokens: number;
20
- rawUsageAvailable: boolean;
21
- };
22
- export declare const summarizeDetails: (steps: ReturnType<typeof usageDetails>[]) => {
23
- [k: string]: {
24
- tokens: number;
25
- status: string;
26
- reportedSteps: number;
27
- observedSteps: number;
28
- };
29
- };
30
- export declare const describePayload: (text: string) => Promise<{
31
- bytes: number;
32
- sha256: string;
33
- }>;
34
- export declare const describeModelRequest: (text: string, seenInput: Set<string>) => Promise<{
35
- bytes: number;
36
- sha256: string;
37
- } | {
38
- sections: {
39
- inputBytes: number;
40
- newInputBytes: number;
41
- repeatedInputBytes: number;
42
- toolsBytes: number;
43
- otherBytes: number;
44
- };
45
- bytes: number;
46
- sha256: string;
47
- }>;
48
- export {};
@@ -1,16 +0,0 @@
1
-
2
- var e = (e) => AbortSignal.any(e), t = 3e5, n = (e) => `The turn reached its time limit of ${e / 6e4} minutes. Should I continue?`, r = (e, t, r) => (r({ type: "time-limit" }), r({ type: "done" }), {
3
- role: "assistant",
4
- content: `${e}\n\n${n(t)}`
5
- }), i = "The step limit of this turn is reached: this answer cannot call a tool. Tell the user what you did and what is still open, say that the step limit of the turn was reached, and ask whether you should continue. The next message of the user starts a new turn, in which you can call tools again.", a = (e, t) => e === 31 ? {
6
- toolChoice: "none",
7
- instructions: t ? `${t}\n\n${i}` : i
8
- } : {}, o = (e) => typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : null, s = (e = {}) => {
9
- let t = o(e.inputTokens), n = o(e.outputTokens);
10
- return {
11
- inputTokens: t,
12
- outputTokens: n,
13
- totalTokens: o(e.totalTokens) ?? (t !== null && n !== null ? t + n : null)
14
- };
15
- }, c = (e) => e.some((e) => e !== null) ? e.reduce((e, t) => e + (t ?? 0), 0) : null, l = (e) => new TextEncoder().encode(e).length;
16
- export { t as a, n as c, s as i, e as l, c as n, r as o, o as r, a as s, l as t };
@@ -1,17 +0,0 @@
1
-
2
- // packages/common/src/dep-free/abort-signal.ts
3
- var e = (e) => AbortSignal.any(e), t = 3e5, n = (e) => `The turn reached its time limit of ${e / 6e4} minutes. Should I continue?`, r = (e, t, r) => (r({ type: "time-limit" }), r({ type: "done" }), {
4
- role: "assistant",
5
- content: `${e}\n\n${n(t)}`
6
- }), i = "The step limit of this turn is reached: this answer cannot call a tool. Tell the user what you did and what is still open, say that the step limit of the turn was reached, and ask whether you should continue. The next message of the user starts a new turn, in which you can call tools again.", a = (e, t) => e === 31 ? {
7
- toolChoice: "none",
8
- instructions: t ? `${t}\n\n${i}` : i
9
- } : {}, o = (e) => typeof e == "number" && Number.isSafeInteger(e) && e >= 0 ? e : null, s = (e = {}) => {
10
- let t = o(e.inputTokens), n = o(e.outputTokens);
11
- return {
12
- inputTokens: t,
13
- outputTokens: n,
14
- totalTokens: o(e.totalTokens) ?? (t !== null && n !== null ? t + n : null)
15
- };
16
- }, c = (e) => e.some((e) => e !== null) ? e.reduce((e, t) => e + (t ?? 0), 0) : null, l = (e) => new TextEncoder().encode(e).length;
17
- export { t as a, n as c, s as i, e as l, c as n, r as o, o as r, a as s, l as t };