@agentica/core 0.32.2 → 0.32.3-dev.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.
- package/lib/index.mjs +297 -333
- package/lib/index.mjs.map +1 -1
- package/lib/orchestrate/call.js +87 -107
- package/lib/orchestrate/call.js.map +1 -1
- package/lib/orchestrate/describe.js +5 -50
- package/lib/orchestrate/describe.js.map +1 -1
- package/lib/orchestrate/initialize.js +5 -50
- package/lib/orchestrate/initialize.js.map +1 -1
- package/lib/orchestrate/select.js +107 -126
- package/lib/orchestrate/select.js.map +1 -1
- package/lib/utils/AssistantMessageEmptyError.d.ts +7 -0
- package/lib/utils/AssistantMessageEmptyError.js +17 -0
- package/lib/utils/AssistantMessageEmptyError.js.map +1 -0
- package/lib/utils/ChatGptCompletionStreamingUtil.d.ts +8 -0
- package/lib/utils/ChatGptCompletionStreamingUtil.js +74 -0
- package/lib/utils/ChatGptCompletionStreamingUtil.js.map +1 -0
- package/lib/utils/__retry.d.ts +1 -0
- package/lib/utils/__retry.js +30 -0
- package/lib/utils/__retry.js.map +1 -0
- package/lib/utils/__retry.spec.d.ts +1 -0
- package/lib/utils/__retry.spec.js +172 -0
- package/lib/utils/__retry.spec.js.map +1 -0
- package/package.json +1 -1
- package/src/orchestrate/call.ts +88 -114
- package/src/orchestrate/describe.ts +7 -65
- package/src/orchestrate/initialize.ts +4 -64
- package/src/orchestrate/select.ts +111 -138
- package/src/utils/AssistantMessageEmptyError.ts +13 -0
- package/src/utils/ChatGptCompletionMessageUtil.ts +1 -1
- package/src/utils/ChatGptCompletionStreamingUtil.ts +81 -0
- package/src/utils/__retry.spec.ts +198 -0
- package/src/utils/__retry.ts +18 -0
|
@@ -53,8 +53,9 @@ const AgenticaDefaultPrompt_1 = require("../constants/AgenticaDefaultPrompt");
|
|
|
53
53
|
const AgenticaSystemPrompt_1 = require("../constants/AgenticaSystemPrompt");
|
|
54
54
|
const events_1 = require("../factory/events");
|
|
55
55
|
const histories_1 = require("../factory/histories");
|
|
56
|
-
const
|
|
57
|
-
const
|
|
56
|
+
const __retry_1 = require("../utils/__retry");
|
|
57
|
+
const AssistantMessageEmptyError_1 = require("../utils/AssistantMessageEmptyError");
|
|
58
|
+
const ChatGptCompletionStreamingUtil_1 = require("../utils/ChatGptCompletionStreamingUtil");
|
|
58
59
|
const StreamUtil_1 = require("../utils/StreamUtil");
|
|
59
60
|
const selectFunctionFromContext_1 = require("./internal/selectFunctionFromContext");
|
|
60
61
|
const CONTAINER = {
|
|
@@ -191,146 +192,126 @@ function select(ctx) {
|
|
|
191
192
|
}
|
|
192
193
|
function step(ctx, operations, retry, failures) {
|
|
193
194
|
return __awaiter(this, void 0, void 0, function* () {
|
|
194
|
-
var _a, _b, _c, _d, _e
|
|
195
|
+
var _a, _b, _c, _d, _e;
|
|
196
|
+
const _retryFn = (0, __retry_1.__get_retry)((_b = (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.retry) !== null && _b !== void 0 ? _b : AgenticaConstant_1.AgenticaConstant.RETRY);
|
|
197
|
+
const retryFn = (fn) => __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
return _retryFn(fn).catch((e) => {
|
|
199
|
+
if (e instanceof AssistantMessageEmptyError_1.AssistantMessageEmptyError) {
|
|
200
|
+
return Symbol("emptyAssistantMessage");
|
|
201
|
+
}
|
|
202
|
+
throw e;
|
|
203
|
+
});
|
|
204
|
+
});
|
|
195
205
|
// ----
|
|
196
206
|
// EXECUTE CHATGPT API
|
|
197
207
|
// ----
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
208
|
+
const completion = yield retryFn((prevError) => __awaiter(this, void 0, void 0, function* () {
|
|
209
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
210
|
+
const stream = yield ctx.request("select", {
|
|
211
|
+
messages: [
|
|
212
|
+
// COMMON SYSTEM PROMPT
|
|
213
|
+
{
|
|
214
|
+
role: "system",
|
|
215
|
+
content: AgenticaDefaultPrompt_1.AgenticaDefaultPrompt.write(ctx.config),
|
|
216
|
+
},
|
|
217
|
+
// CANDIDATE FUNCTIONS
|
|
218
|
+
{
|
|
219
|
+
role: "assistant",
|
|
220
|
+
tool_calls: [
|
|
221
|
+
{
|
|
222
|
+
type: "function",
|
|
223
|
+
id: "getApiFunctions",
|
|
224
|
+
function: {
|
|
225
|
+
name: "getApiFunctions",
|
|
226
|
+
arguments: JSON.stringify({}),
|
|
227
|
+
},
|
|
215
228
|
},
|
|
229
|
+
],
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
role: "tool",
|
|
233
|
+
tool_call_id: "getApiFunctions",
|
|
234
|
+
content: JSON.stringify(operations.map(op => (Object.assign({ name: op.name, description: op.function.description }, (op.protocol === "http"
|
|
235
|
+
? {
|
|
236
|
+
method: op.function.method,
|
|
237
|
+
path: op.function.path,
|
|
238
|
+
tags: op.function.tags,
|
|
239
|
+
}
|
|
240
|
+
: {}))))),
|
|
241
|
+
},
|
|
242
|
+
// PREVIOUS HISTORIES
|
|
243
|
+
...ctx.histories.map(histories_1.decodeHistory).flat(),
|
|
244
|
+
// USER INPUT
|
|
245
|
+
{
|
|
246
|
+
role: "user",
|
|
247
|
+
content: ctx.prompt.contents.map(histories_1.decodeUserMessageContent),
|
|
248
|
+
},
|
|
249
|
+
// PREVIOUS ERROR
|
|
250
|
+
...(prevError instanceof AssistantMessageEmptyError_1.AssistantMessageEmptyWithReasoningError ? [
|
|
251
|
+
{
|
|
252
|
+
role: "assistant",
|
|
253
|
+
content: prevError.reasoning,
|
|
216
254
|
},
|
|
217
|
-
],
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
content: JSON.stringify(operations.map(op => (Object.assign({ name: op.name, description: op.function.description }, (op.protocol === "http"
|
|
223
|
-
? {
|
|
224
|
-
method: op.function.method,
|
|
225
|
-
path: op.function.path,
|
|
226
|
-
tags: op.function.tags,
|
|
227
|
-
}
|
|
228
|
-
: {}))))),
|
|
229
|
-
},
|
|
230
|
-
// PREVIOUS HISTORIES
|
|
231
|
-
...ctx.histories.map(histories_1.decodeHistory).flat(),
|
|
232
|
-
// USER INPUT
|
|
233
|
-
{
|
|
234
|
-
role: "user",
|
|
235
|
-
content: ctx.prompt.contents.map(histories_1.decodeUserMessageContent),
|
|
236
|
-
},
|
|
237
|
-
// SYSTEM PROMPT
|
|
238
|
-
{
|
|
239
|
-
role: "system",
|
|
240
|
-
content: (_d = (_c = (_b = (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.systemPrompt) === null || _b === void 0 ? void 0 : _b.select) === null || _c === void 0 ? void 0 : _c.call(_b, ctx.histories)) !== null && _d !== void 0 ? _d : AgenticaSystemPrompt_1.AgenticaSystemPrompt.SELECT,
|
|
241
|
-
},
|
|
242
|
-
// TYPE CORRECTIONS
|
|
243
|
-
...emendMessages(failures !== null && failures !== void 0 ? failures : []),
|
|
244
|
-
],
|
|
245
|
-
// STACK FUNCTIONS
|
|
246
|
-
tools: [{
|
|
247
|
-
type: "function",
|
|
248
|
-
function: {
|
|
249
|
-
name: CONTAINER.functions[0].name,
|
|
250
|
-
description: CONTAINER.functions[0].description,
|
|
251
|
-
/**
|
|
252
|
-
* @TODO fix it
|
|
253
|
-
* The property and value have a type mismatch, but it works.
|
|
254
|
-
*/
|
|
255
|
-
parameters: CONTAINER.functions[0].parameters,
|
|
255
|
+
] : []),
|
|
256
|
+
// SYSTEM PROMPT
|
|
257
|
+
{
|
|
258
|
+
role: "system",
|
|
259
|
+
content: (_d = (_c = (_b = (_a = ctx.config) === null || _a === void 0 ? void 0 : _a.systemPrompt) === null || _b === void 0 ? void 0 : _b.select) === null || _c === void 0 ? void 0 : _c.call(_b, ctx.histories)) !== null && _d !== void 0 ? _d : AgenticaSystemPrompt_1.AgenticaSystemPrompt.SELECT,
|
|
256
260
|
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
content: choice.delta.content,
|
|
288
|
-
mpsc,
|
|
289
|
-
};
|
|
290
|
-
mpsc.produce(choice.delta.content);
|
|
291
|
-
const event = (0, events_1.createAssistantMessageEvent)({
|
|
292
|
-
stream: (0, StreamUtil_1.streamDefaultReaderToAsyncGenerator)(mpsc.consumer.getReader()),
|
|
293
|
-
done: () => mpsc.done(),
|
|
294
|
-
get: () => { var _a, _b; return (_b = (_a = selectContext[choice.index]) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : ""; },
|
|
295
|
-
join: () => __awaiter(this, void 0, void 0, function* () {
|
|
296
|
-
yield mpsc.waitClosed();
|
|
297
|
-
return selectContext[choice.index].content;
|
|
298
|
-
}),
|
|
299
|
-
});
|
|
300
|
-
ctx.dispatch(event);
|
|
261
|
+
// TYPE CORRECTIONS
|
|
262
|
+
...emendMessages(failures !== null && failures !== void 0 ? failures : []),
|
|
263
|
+
],
|
|
264
|
+
// STACK FUNCTIONS
|
|
265
|
+
tools: [{
|
|
266
|
+
type: "function",
|
|
267
|
+
function: {
|
|
268
|
+
name: CONTAINER.functions[0].name,
|
|
269
|
+
description: CONTAINER.functions[0].description,
|
|
270
|
+
/**
|
|
271
|
+
* @TODO fix it
|
|
272
|
+
* The property and value have a type mismatch, but it works.
|
|
273
|
+
*/
|
|
274
|
+
parameters: CONTAINER.functions[0].parameters,
|
|
275
|
+
},
|
|
276
|
+
}],
|
|
277
|
+
tool_choice: retry === 0
|
|
278
|
+
? "auto"
|
|
279
|
+
: "required",
|
|
280
|
+
// parallel_tool_calls: false,
|
|
281
|
+
});
|
|
282
|
+
const completion = yield (0, ChatGptCompletionStreamingUtil_1.reduceStreamingWithDispatch)(stream, (props) => {
|
|
283
|
+
const event = (0, events_1.createAssistantMessageEvent)(props);
|
|
284
|
+
ctx.dispatch(event);
|
|
285
|
+
});
|
|
286
|
+
const allAssistantMessagesEmpty = completion.choices.every(v => v.message.tool_calls == null && v.message.content === "");
|
|
287
|
+
if (allAssistantMessagesEmpty) {
|
|
288
|
+
const firstChoice = completion.choices.at(0);
|
|
289
|
+
if (((_e = firstChoice === null || firstChoice === void 0 ? void 0 : firstChoice.message) === null || _e === void 0 ? void 0 : _e.reasoning) != null) {
|
|
290
|
+
throw new AssistantMessageEmptyError_1.AssistantMessageEmptyWithReasoningError((_g = (_f = firstChoice === null || firstChoice === void 0 ? void 0 : firstChoice.message) === null || _f === void 0 ? void 0 : _f.reasoning) !== null && _g !== void 0 ? _g : "");
|
|
301
291
|
}
|
|
302
|
-
|
|
303
|
-
if (acc.object === "chat.completion.chunk") {
|
|
304
|
-
registerContext([acc, chunk].flatMap(v => v.choices));
|
|
305
|
-
return ChatGptCompletionMessageUtil_1.ChatGptCompletionMessageUtil.merge([acc, chunk]);
|
|
292
|
+
throw new AssistantMessageEmptyError_1.AssistantMessageEmptyError();
|
|
306
293
|
}
|
|
307
|
-
|
|
308
|
-
return ChatGptCompletionMessageUtil_1.ChatGptCompletionMessageUtil.accumulate(acc, chunk);
|
|
294
|
+
return completion;
|
|
309
295
|
}));
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
get: () => { var _a; return (_a = v.message.content) !== null && _a !== void 0 ? _a : ""; },
|
|
319
|
-
join: () => __awaiter(this, void 0, void 0, function* () {
|
|
320
|
-
var _a;
|
|
321
|
-
return (_a = v.message.content) !== null && _a !== void 0 ? _a : "";
|
|
322
|
-
}),
|
|
323
|
-
});
|
|
324
|
-
ctx.dispatch(event);
|
|
296
|
+
if (typeof completion === "symbol") {
|
|
297
|
+
const event = (0, events_1.createAssistantMessageEvent)({
|
|
298
|
+
stream: (0, StreamUtil_1.toAsyncGenerator)(""),
|
|
299
|
+
done: () => true,
|
|
300
|
+
get: () => "",
|
|
301
|
+
join: () => __awaiter(this, void 0, void 0, function* () {
|
|
302
|
+
return "";
|
|
303
|
+
}),
|
|
325
304
|
});
|
|
305
|
+
ctx.dispatch(event);
|
|
306
|
+
return;
|
|
326
307
|
}
|
|
327
308
|
// ----
|
|
328
309
|
// VALIDATION
|
|
329
310
|
// ----
|
|
330
|
-
if (retry++ < ((
|
|
311
|
+
if (retry++ < ((_d = (_c = ctx.config) === null || _c === void 0 ? void 0 : _c.retry) !== null && _d !== void 0 ? _d : AgenticaConstant_1.AgenticaConstant.RETRY)) {
|
|
331
312
|
const failures = [];
|
|
332
313
|
for (const choice of completion.choices) {
|
|
333
|
-
for (const tc of (
|
|
314
|
+
for (const tc of (_e = choice.message.tool_calls) !== null && _e !== void 0 ? _e : []) {
|
|
334
315
|
if (tc.function.name !== "selectFunctions") {
|
|
335
316
|
continue;
|
|
336
317
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/orchestrate/select.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/orchestrate/select.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,wBAmDC;;AApFD,kDAA0B;AAU1B,oEAAiE;AACj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;oBACJ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;wBACnB,SAAS;oBACX,CAAC;oBACD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;wBACxC,IAAA,qDAAyB,EAAC,GAAG,EAAE,SAAS,CAAC,CAAC;oBAC5C,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CAAA;AAED,SAAS,aAAa,CAAC,QAAoB;IACzC,OAAO,QAAQ;SACZ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACR;YACE,IAAI,EAAE,WAAW;YACjB,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,UAAU;oBAChB,EAAE,EAAE,CAAC,CAAC,EAAE;oBACR,QAAQ,EAAE;wBACR,IAAI,EAAE,CAAC,CAAC,IAAI;wBACZ,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;qBAC7C;iBACF;aACF;SACmD;QACtD;YACE,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;YAC5C,YAAY,EAAE,CAAC,CAAC,EAAE;SAC6B;QACjD;YACE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,wDAAwD;gBACxD,EAAE;gBACF,0CAA0C;aAC3C,CAAC,IAAI,CAAC,IAAI,CAAC;SACqC;KACpD,CAAC;SACD,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssistantMessageEmptyWithReasoningError = exports.AssistantMessageEmptyError = void 0;
|
|
4
|
+
class AssistantMessageEmptyError extends Error {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.AssistantMessageEmptyError = AssistantMessageEmptyError;
|
|
10
|
+
class AssistantMessageEmptyWithReasoningError extends AssistantMessageEmptyError {
|
|
11
|
+
constructor(reasoning) {
|
|
12
|
+
super();
|
|
13
|
+
this.reasoning = reasoning;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.AssistantMessageEmptyWithReasoningError = AssistantMessageEmptyWithReasoningError;
|
|
17
|
+
//# sourceMappingURL=AssistantMessageEmptyError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssistantMessageEmptyError.js","sourceRoot":"","sources":["../../src/utils/AssistantMessageEmptyError.ts"],"names":[],"mappings":";;;AAAA,MAAa,0BAA2B,SAAQ,KAAK;IACnD;QACE,KAAK,EAAE,CAAC;IACV,CAAC;CACF;AAJD,gEAIC;AAED,MAAa,uCAAwC,SAAQ,0BAA0B;IAErF,YAAY,SAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF;AAND,0FAMC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChatCompletion, ChatCompletionChunk } from "openai/resources";
|
|
2
|
+
declare function reduceStreamingWithDispatch(stream: ReadableStream<ChatCompletionChunk>, eventProcessor: (props: {
|
|
3
|
+
stream: AsyncGenerator<string, undefined, undefined>;
|
|
4
|
+
done: () => boolean;
|
|
5
|
+
get: () => string;
|
|
6
|
+
join: () => Promise<string>;
|
|
7
|
+
}) => void): Promise<ChatCompletion>;
|
|
8
|
+
export { reduceStreamingWithDispatch };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.reduceStreamingWithDispatch = reduceStreamingWithDispatch;
|
|
13
|
+
const _1 = require(".");
|
|
14
|
+
function reduceStreamingWithDispatch(stream, eventProcessor) {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const streamContext = new Map();
|
|
17
|
+
const nullableCompletion = yield _1.StreamUtil.reduce(stream, (accPromise, chunk) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
const acc = yield accPromise;
|
|
19
|
+
const registerContext = (choices) => {
|
|
20
|
+
for (const choice of choices) {
|
|
21
|
+
/**
|
|
22
|
+
* @TODO fix it
|
|
23
|
+
* Sometimes, the complete message arrives along with a finish reason.
|
|
24
|
+
*/
|
|
25
|
+
if (choice.finish_reason != null) {
|
|
26
|
+
const context = streamContext.get(choice.index);
|
|
27
|
+
if (context != null) {
|
|
28
|
+
context.mpsc.close();
|
|
29
|
+
}
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (choice.delta.content == null || choice.delta.content === "") {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (streamContext.has(choice.index)) {
|
|
36
|
+
const context = streamContext.get(choice.index);
|
|
37
|
+
context.content += choice.delta.content;
|
|
38
|
+
context.mpsc.produce(choice.delta.content);
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const mpsc = new _1.MPSC();
|
|
42
|
+
streamContext.set(choice.index, {
|
|
43
|
+
content: choice.delta.content,
|
|
44
|
+
mpsc,
|
|
45
|
+
});
|
|
46
|
+
mpsc.produce(choice.delta.content);
|
|
47
|
+
eventProcessor({
|
|
48
|
+
stream: (0, _1.streamDefaultReaderToAsyncGenerator)(mpsc.consumer.getReader()),
|
|
49
|
+
done: () => mpsc.done(),
|
|
50
|
+
get: () => { var _a, _b; return (_b = (_a = streamContext.get(choice.index)) === null || _a === void 0 ? void 0 : _a.content) !== null && _b !== void 0 ? _b : ""; },
|
|
51
|
+
join: () => __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
yield mpsc.waitClosed();
|
|
53
|
+
return streamContext.get(choice.index).content;
|
|
54
|
+
}),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
if (acc.object === "chat.completion.chunk") {
|
|
59
|
+
registerContext([acc, chunk].flatMap(v => v.choices));
|
|
60
|
+
return _1.ChatGptCompletionMessageUtil.merge([acc, chunk]);
|
|
61
|
+
}
|
|
62
|
+
registerContext(chunk.choices);
|
|
63
|
+
return _1.ChatGptCompletionMessageUtil.accumulate(acc, chunk);
|
|
64
|
+
}));
|
|
65
|
+
if (nullableCompletion == null) {
|
|
66
|
+
throw new Error("StreamUtil.reduce did not produce a ChatCompletion. Possible causes: the input stream was empty, invalid, or closed prematurely. "
|
|
67
|
+
+ "To debug: check that the stream is properly initialized and contains valid ChatCompletionChunk data. "
|
|
68
|
+
+ "You may also enable verbose logging upstream to inspect the stream contents. "
|
|
69
|
+
+ `Stream locked: ${stream.locked}.`);
|
|
70
|
+
}
|
|
71
|
+
return nullableCompletion;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=ChatGptCompletionStreamingUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatGptCompletionStreamingUtil.js","sourceRoot":"","sources":["../../src/utils/ChatGptCompletionStreamingUtil.ts"],"names":[],"mappings":";;;;;;;;;;;AAgFS,kEAA2B;AA9EpC,wBAAwG;AAExG,SAAe,2BAA2B,CAAC,MAA2C,EAAE,cAK9E;;QACR,MAAM,aAAa,GAAG,IAAI,GAAG,EAAmD,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
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.__get_retry = __get_retry;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
function __get_retry(limit) {
|
|
17
|
+
const retryFn = (fn_1, prevError_1, ...args_1) => __awaiter(this, [fn_1, prevError_1, ...args_1], void 0, function* (fn, prevError, attempt = 0) {
|
|
18
|
+
try {
|
|
19
|
+
return yield fn(prevError);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
if (attempt >= limit - 1) {
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
return retryFn(fn, error, attempt + 1);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return retryFn;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=__retry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"__retry.js","sourceRoot":"","sources":["../../src/utils/__retry.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,kCAcC;AAjBD;;GAEG;AACH,SAAgB,WAAW,CAAC,KAAa;IACvC,MAAM,OAAO,GAAG,+BAAyG,EAAE,oEAAjG,EAAuC,EAAE,SAAmB,EAAE,UAAkB,CAAC;QACzG,IAAI,CAAC;YACH,OAAO,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,KAAK,EAAE,CAAC;YACb,IAAI,OAAO,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;gBACzB,MAAM,KAAK,CAAC;YACd,CAAC;YACD,OAAO,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;QACzC,CAAC;IACH,CAAC,CAAA,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|