@rei-standard/amsg-shared 0.4.0-next.10 → 0.4.0-next.11
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/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/llm-call.d.cts +2 -0
- package/dist/llm-call.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -253,7 +253,7 @@ async function callLlm(payload, options = {}) {
|
|
|
253
253
|
"Authorization": `Bearer ${payload.apiKey}`
|
|
254
254
|
},
|
|
255
255
|
body: JSON.stringify(requestBody),
|
|
256
|
-
signal: AbortSignal.timeout(timeoutMs)
|
|
256
|
+
signal: options.signal ? AbortSignal.any([options.signal, AbortSignal.timeout(timeoutMs)]) : AbortSignal.timeout(timeoutMs)
|
|
257
257
|
});
|
|
258
258
|
if (!aiResponse.ok) {
|
|
259
259
|
const detail = await readUpstreamErrorDetail(aiResponse);
|
package/dist/index.mjs
CHANGED
|
@@ -168,7 +168,7 @@ async function callLlm(payload, options = {}) {
|
|
|
168
168
|
"Authorization": `Bearer ${payload.apiKey}`
|
|
169
169
|
},
|
|
170
170
|
body: JSON.stringify(requestBody),
|
|
171
|
-
signal: AbortSignal.timeout(timeoutMs)
|
|
171
|
+
signal: options.signal ? AbortSignal.any([options.signal, AbortSignal.timeout(timeoutMs)]) : AbortSignal.timeout(timeoutMs)
|
|
172
172
|
});
|
|
173
173
|
if (!aiResponse.ok) {
|
|
174
174
|
const detail = await readUpstreamErrorDetail(aiResponse);
|
package/dist/llm-call.d.cts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* @param {{
|
|
11
11
|
* requireContent?: boolean,
|
|
12
12
|
* timeoutMs?: number,
|
|
13
|
+
* signal?: AbortSignal,
|
|
13
14
|
* fetch?: typeof globalThis.fetch,
|
|
14
15
|
* stream?: boolean,
|
|
15
16
|
* forwardTools?: boolean,
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
export function callLlm(payload: any, options?: {
|
|
43
44
|
requireContent?: boolean;
|
|
44
45
|
timeoutMs?: number;
|
|
46
|
+
signal?: AbortSignal;
|
|
45
47
|
fetch?: typeof globalThis.fetch;
|
|
46
48
|
stream?: boolean;
|
|
47
49
|
forwardTools?: boolean;
|
package/dist/llm-call.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* @param {{
|
|
11
11
|
* requireContent?: boolean,
|
|
12
12
|
* timeoutMs?: number,
|
|
13
|
+
* signal?: AbortSignal,
|
|
13
14
|
* fetch?: typeof globalThis.fetch,
|
|
14
15
|
* stream?: boolean,
|
|
15
16
|
* forwardTools?: boolean,
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
export function callLlm(payload: any, options?: {
|
|
43
44
|
requireContent?: boolean;
|
|
44
45
|
timeoutMs?: number;
|
|
46
|
+
signal?: AbortSignal;
|
|
45
47
|
fetch?: typeof globalThis.fetch;
|
|
46
48
|
stream?: boolean;
|
|
47
49
|
forwardTools?: boolean;
|
package/package.json
CHANGED