@mate-academy/llm-gateway 8.5.0 → 8.7.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 +40 -10
- package/dist/LLMService.typedefs.d.ts +13 -0
- package/dist/LLMService.typedefs.js.map +1 -1
- package/dist/client/LLMClientEngine.d.ts +17 -2
- package/dist/client/LLMClientEngine.js +34 -2
- package/dist/client/LLMClientEngine.js.map +1 -1
- package/dist/client/agentRun.typedefs.d.ts +15 -0
- package/dist/client/agentRunner.d.ts +8 -2
- package/dist/client/agentRunner.js +8 -1
- package/dist/client/agentRunner.js.map +1 -1
- package/dist/client/llmClient.typedefs.d.ts +35 -1
- package/dist/client/llmClient.typedefs.js.map +1 -1
- package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.typedefs.d.ts +7 -1
- package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.typedefs.js +6 -0
- package/dist/providers/GoogleGenerativeAI/GoogleGenerativeAI.typedefs.js.map +1 -1
- package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAIAssistance.service.d.ts +13 -0
- package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAIAssistance.service.js +118 -37
- package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAIAssistance.service.js.map +1 -1
- package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAICompletion.service.d.ts +8 -0
- package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAICompletion.service.js +24 -26
- package/dist/providers/GoogleGenerativeAI/services/GoogleGenerativeAICompletion.service.js.map +1 -1
- package/dist/providers/LLMAPI/services/LLMAPIAssistance.service.d.ts +6 -0
- package/dist/providers/LLMAPI/services/LLMAPIAssistance.service.js +47 -33
- package/dist/providers/LLMAPI/services/LLMAPIAssistance.service.js.map +1 -1
- package/dist/providers/LLMAPI/services/LLMAPICompletion.service.d.ts +9 -0
- package/dist/providers/LLMAPI/services/LLMAPICompletion.service.js +37 -28
- package/dist/providers/LLMAPI/services/LLMAPICompletion.service.js.map +1 -1
- package/dist/providers/OpenAI/OpenAI.typedefs.d.ts +10 -1
- package/dist/providers/OpenAI/OpenAI.typedefs.js +1 -0
- package/dist/providers/OpenAI/OpenAI.typedefs.js.map +1 -1
- package/dist/providers/OpenAI/services/OpenAIAssistance.service.d.ts +8 -0
- package/dist/providers/OpenAI/services/OpenAIAssistance.service.js +98 -47
- package/dist/providers/OpenAI/services/OpenAIAssistance.service.js.map +1 -1
- package/dist/providers/OpenAICompatible/OpenAICompatibleCompletion.service.d.ts +8 -1
- package/dist/providers/OpenAICompatible/OpenAICompatibleCompletion.service.js +13 -16
- package/dist/providers/OpenAICompatible/OpenAICompatibleCompletion.service.js.map +1 -1
- package/dist/services/LLMBaseService.abstract.d.ts +33 -0
- package/dist/services/LLMBaseService.abstract.js +93 -15
- package/dist/services/LLMBaseService.abstract.js.map +1 -1
- package/dist/services/agentRounds/LLMAgentRounds.d.ts +35 -0
- package/dist/services/agentRounds/LLMAgentRounds.js +64 -0
- package/dist/services/agentRounds/LLMAgentRounds.js.map +1 -0
- package/dist/services/agentRounds/agentRounds.typedefs.d.ts +40 -0
- package/dist/services/agentRounds/agentRounds.typedefs.js +3 -0
- package/dist/services/agentRounds/agentRounds.typedefs.js.map +1 -0
- package/dist/services/agentRounds/index.d.ts +2 -0
- package/dist/services/agentRounds/index.js +19 -0
- package/dist/services/agentRounds/index.js.map +1 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +1 -0
- package/dist/services/index.js.map +1 -1
- package/dist/utilities/llmTracing/llmTracing.typedefs.d.ts +20 -0
- package/dist/utilities/llmTracing/noopLLMTracing.js +3 -0
- package/dist/utilities/llmTracing/noopLLMTracing.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ const crypto_1 = require("crypto");
|
|
|
5
5
|
const serializeError_1 = require("../utilities/serializeError");
|
|
6
6
|
const LLMService_constants_1 = require("../LLMService.constants");
|
|
7
7
|
const utilities_1 = require("../utilities");
|
|
8
|
+
const agentRounds_1 = require("./agentRounds");
|
|
8
9
|
class LLMBaseService {
|
|
9
10
|
provider;
|
|
10
11
|
serviceName;
|
|
@@ -167,32 +168,87 @@ class LLMBaseService {
|
|
|
167
168
|
output,
|
|
168
169
|
modelParameters,
|
|
169
170
|
metadata: traceContext?.metadata,
|
|
171
|
+
userId: traceContext?.userId,
|
|
172
|
+
sessionId: traceContext?.sessionId,
|
|
173
|
+
tags: traceContext?.tags,
|
|
170
174
|
startedAt,
|
|
171
175
|
};
|
|
172
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Opens the per-round generation stream of an agent tool loop. Every model
|
|
179
|
+
* round the loop runs is traced through the returned recorder, so the run
|
|
180
|
+
* renders as one role-labelled transcript per round instead of a single
|
|
181
|
+
* generation covering the whole loop. The run's aggregate metrics point is
|
|
182
|
+
* written separately by `writeSuccessMetrics` and is unaffected.
|
|
183
|
+
*/
|
|
184
|
+
openAgentRounds(params) {
|
|
185
|
+
const { method, model, traceContext, modelParameters, } = params;
|
|
186
|
+
return new agentRounds_1.LLMAgentRounds((round) => {
|
|
187
|
+
const generationTrace = this.buildGenerationTrace({
|
|
188
|
+
method,
|
|
189
|
+
traceContext,
|
|
190
|
+
input: round.input,
|
|
191
|
+
output: round.output ?? this.describeError(round.error),
|
|
192
|
+
modelParameters,
|
|
193
|
+
startedAt: round.startedAt,
|
|
194
|
+
});
|
|
195
|
+
if (round.isError) {
|
|
196
|
+
this.recordGenerationTrace({
|
|
197
|
+
method,
|
|
198
|
+
model,
|
|
199
|
+
generationTrace,
|
|
200
|
+
isError: true,
|
|
201
|
+
});
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const { tokens, costs } = this.buildGenerationAccounting({
|
|
205
|
+
model,
|
|
206
|
+
usage: round.usage ?? {},
|
|
207
|
+
});
|
|
208
|
+
this.recordGenerationTrace({
|
|
209
|
+
method,
|
|
210
|
+
model,
|
|
211
|
+
generationTrace,
|
|
212
|
+
usageDetails: tokens,
|
|
213
|
+
costDetails: {
|
|
214
|
+
input: costs.input,
|
|
215
|
+
output: costs.output,
|
|
216
|
+
total: costs.total,
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The generation a failed agent run falls back to when it never reached its
|
|
223
|
+
* first model round: a run that throws while assembling the request would
|
|
224
|
+
* otherwise trace nothing at all. Once a round has been recorded the
|
|
225
|
+
* transcript is already there, and no second observation is emitted for it.
|
|
226
|
+
*/
|
|
227
|
+
buildUnstartedRunTrace(params) {
|
|
228
|
+
const { rounds, method, traceContext, input, modelParameters, startedAt, } = params;
|
|
229
|
+
if (rounds.hasRecordedRound) {
|
|
230
|
+
return undefined;
|
|
231
|
+
}
|
|
232
|
+
return this.buildGenerationTrace({
|
|
233
|
+
method,
|
|
234
|
+
traceContext,
|
|
235
|
+
input,
|
|
236
|
+
modelParameters,
|
|
237
|
+
startedAt,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
173
240
|
/**
|
|
174
241
|
* Write success metrics for a specific method, and emit the matching
|
|
175
242
|
* generation observation when per-call trace context is provided.
|
|
176
243
|
*/
|
|
177
244
|
writeSuccessMetrics(params) {
|
|
178
|
-
const { method, model, usage
|
|
179
|
-
const costs = (
|
|
180
|
-
inputTextTokens,
|
|
181
|
-
outputTextTokens,
|
|
182
|
-
inputAudioTokens,
|
|
183
|
-
outputAudioTokens,
|
|
184
|
-
});
|
|
185
|
-
const input = inputTextTokens + inputAudioTokens;
|
|
186
|
-
const output = outputTextTokens + outputAudioTokens;
|
|
245
|
+
const { method, model, usage, writeMetrics, generationTrace, } = params;
|
|
246
|
+
const { tokens, costs } = this.buildGenerationAccounting({ model, usage });
|
|
187
247
|
this.recordGenerationTrace({
|
|
188
248
|
method,
|
|
189
249
|
model,
|
|
190
250
|
generationTrace,
|
|
191
|
-
usageDetails:
|
|
192
|
-
input,
|
|
193
|
-
output,
|
|
194
|
-
total: input + output,
|
|
195
|
-
},
|
|
251
|
+
usageDetails: tokens,
|
|
196
252
|
costDetails: {
|
|
197
253
|
input: costs.input,
|
|
198
254
|
output: costs.output,
|
|
@@ -209,13 +265,32 @@ class LLMBaseService {
|
|
|
209
265
|
modelConfig: model?.config || null,
|
|
210
266
|
method,
|
|
211
267
|
status: 'success',
|
|
268
|
+
tokens,
|
|
269
|
+
costs,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Token totals and costs of one accounted call, in the shape both the metrics
|
|
274
|
+
* writer and a generation observation take.
|
|
275
|
+
*/
|
|
276
|
+
buildGenerationAccounting(params) {
|
|
277
|
+
const { model, usage: { inputTextTokens = 0, outputTextTokens = 0, inputAudioTokens = 0, outputAudioTokens = 0, }, } = params;
|
|
278
|
+
const costs = (0, utilities_1.calculateCosts)(model, {
|
|
279
|
+
inputTextTokens,
|
|
280
|
+
outputTextTokens,
|
|
281
|
+
inputAudioTokens,
|
|
282
|
+
outputAudioTokens,
|
|
283
|
+
});
|
|
284
|
+
const input = inputTextTokens + inputAudioTokens;
|
|
285
|
+
const output = outputTextTokens + outputAudioTokens;
|
|
286
|
+
return {
|
|
212
287
|
tokens: {
|
|
213
288
|
input,
|
|
214
289
|
output,
|
|
215
290
|
total: input + output,
|
|
216
291
|
},
|
|
217
292
|
costs,
|
|
218
|
-
}
|
|
293
|
+
};
|
|
219
294
|
}
|
|
220
295
|
/**
|
|
221
296
|
* Write error metrics for a specific method, and emit the matching generation
|
|
@@ -287,6 +362,9 @@ class LLMBaseService {
|
|
|
287
362
|
model: model?.name ?? null,
|
|
288
363
|
modelParameters: generationTrace.modelParameters,
|
|
289
364
|
metadata: generationTrace.metadata,
|
|
365
|
+
userId: generationTrace.userId,
|
|
366
|
+
sessionId: generationTrace.sessionId,
|
|
367
|
+
tags: generationTrace.tags,
|
|
290
368
|
usageDetails,
|
|
291
369
|
costDetails,
|
|
292
370
|
isError,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LLMBaseService.abstract.js","sourceRoot":"","sources":["../../src/services/LLMBaseService.abstract.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AAWpC,+DAA4D;AAC5D,iEAAkF;AAElF,
|
|
1
|
+
{"version":3,"file":"LLMBaseService.abstract.js","sourceRoot":"","sources":["../../src/services/LLMBaseService.abstract.ts"],"names":[],"mappings":";;;AAAA,mCAAoC;AAWpC,+DAA4D;AAC5D,iEAAkF;AAElF,2CAQqB;AACrB,+CAA+C;AAO/C,MAAsB,cAAc;IAUhB;IACA;IACA;IACT;IACA;IACA;IAVD,MAAM,CAAU,mBAAmB,GAAG,IAAI,GAAG,EAA+B,CAAC;IAE7E,MAAM,GAAqB,gCAAoB,CAAC;IAExD,YACkB,QAAkB,EAClB,WAAmB,EACnB,OAAgB,EACzB,MAAsC,EACtC,QAAkB,EAClB,OAAsC;QAL7B,aAAQ,GAAR,QAAQ,CAAU;QAClB,gBAAW,GAAX,WAAW,CAAQ;QACnB,YAAO,GAAP,OAAO,CAAS;QACzB,WAAM,GAAN,MAAM,CAAgC;QACtC,aAAQ,GAAR,QAAQ,CAAU;QAClB,YAAO,GAAP,OAAO,CAA+B;QAE7C,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAC,MAAwB;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAES,SAAS;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAOD;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,yCAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAA2D,CAAC;IACnH,CAAC;IAED;;OAEG;IACO,UAAU;QAClB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IA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I,CAAC,GAAG,EAAE;SACpB,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC;IACtD,CAAC;IAEO,aAAa,CAAC,KAAc;QAClC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;;AAviBH,wCAwiBC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type LLMAgentRoundOutcome, type LLMAgentRoundWriter } from './agentRounds.typedefs';
|
|
2
|
+
/**
|
|
3
|
+
* The per-round generation stream of a single agent run.
|
|
4
|
+
*
|
|
5
|
+
* A tool loop is a sequence of model rounds, and each of them is a generation
|
|
6
|
+
* in its own right: the conversation as it stood when the request went out, and
|
|
7
|
+
* what the model answered with. Providers put every provider call through
|
|
8
|
+
* `run`, which is what guarantees a round that throws is traced exactly like a
|
|
9
|
+
* round that succeeds, and that no round of the loop goes unrecorded.
|
|
10
|
+
*
|
|
11
|
+
* The recorder deliberately knows nothing about messages — the provider hands
|
|
12
|
+
* over its own native array as the round's input.
|
|
13
|
+
*/
|
|
14
|
+
export declare class LLMAgentRounds {
|
|
15
|
+
private readonly writeRound;
|
|
16
|
+
private recordedRoundCount;
|
|
17
|
+
constructor(writeRound: LLMAgentRoundWriter);
|
|
18
|
+
/**
|
|
19
|
+
* Whether any model round reached the tracer. A run that fails while still
|
|
20
|
+
* preparing its first request has no transcript to show, and its caller falls
|
|
21
|
+
* back to tracing the failure on its own.
|
|
22
|
+
*/
|
|
23
|
+
get hasRecordedRound(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Runs one provider call as a traced round. The provider's response is
|
|
26
|
+
* returned untouched and its failure rethrown unchanged: tracing never alters
|
|
27
|
+
* what the loop, or the caller, sees.
|
|
28
|
+
*/
|
|
29
|
+
run<ProviderResponse>(round: {
|
|
30
|
+
input: unknown;
|
|
31
|
+
call: () => Promise<ProviderResponse>;
|
|
32
|
+
describeOutcome: (response: ProviderResponse) => LLMAgentRoundOutcome;
|
|
33
|
+
}): Promise<ProviderResponse>;
|
|
34
|
+
private record;
|
|
35
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LLMAgentRounds = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The per-round generation stream of a single agent run.
|
|
6
|
+
*
|
|
7
|
+
* A tool loop is a sequence of model rounds, and each of them is a generation
|
|
8
|
+
* in its own right: the conversation as it stood when the request went out, and
|
|
9
|
+
* what the model answered with. Providers put every provider call through
|
|
10
|
+
* `run`, which is what guarantees a round that throws is traced exactly like a
|
|
11
|
+
* round that succeeds, and that no round of the loop goes unrecorded.
|
|
12
|
+
*
|
|
13
|
+
* The recorder deliberately knows nothing about messages — the provider hands
|
|
14
|
+
* over its own native array as the round's input.
|
|
15
|
+
*/
|
|
16
|
+
class LLMAgentRounds {
|
|
17
|
+
writeRound;
|
|
18
|
+
recordedRoundCount = 0;
|
|
19
|
+
constructor(writeRound) {
|
|
20
|
+
this.writeRound = writeRound;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Whether any model round reached the tracer. A run that fails while still
|
|
24
|
+
* preparing its first request has no transcript to show, and its caller falls
|
|
25
|
+
* back to tracing the failure on its own.
|
|
26
|
+
*/
|
|
27
|
+
get hasRecordedRound() {
|
|
28
|
+
return this.recordedRoundCount > 0;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Runs one provider call as a traced round. The provider's response is
|
|
32
|
+
* returned untouched and its failure rethrown unchanged: tracing never alters
|
|
33
|
+
* what the loop, or the caller, sees.
|
|
34
|
+
*/
|
|
35
|
+
async run(round) {
|
|
36
|
+
const startedAt = Date.now();
|
|
37
|
+
try {
|
|
38
|
+
const response = await round.call();
|
|
39
|
+
const { output, usage } = round.describeOutcome(response);
|
|
40
|
+
this.record({
|
|
41
|
+
input: round.input,
|
|
42
|
+
output,
|
|
43
|
+
usage,
|
|
44
|
+
startedAt,
|
|
45
|
+
});
|
|
46
|
+
return response;
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
this.record({
|
|
50
|
+
input: round.input,
|
|
51
|
+
startedAt,
|
|
52
|
+
error,
|
|
53
|
+
isError: true,
|
|
54
|
+
});
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
record(round) {
|
|
59
|
+
this.recordedRoundCount += 1;
|
|
60
|
+
this.writeRound(round);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.LLMAgentRounds = LLMAgentRounds;
|
|
64
|
+
//# sourceMappingURL=LLMAgentRounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LLMAgentRounds.js","sourceRoot":"","sources":["../../../src/services/agentRounds/LLMAgentRounds.ts"],"names":[],"mappings":";;;AAMA;;;;;;;;;;;GAWG;AACH,MAAa,cAAc;IAGI;IAFrB,kBAAkB,GAAG,CAAC,CAAC;IAE/B,YAA6B,UAA+B;QAA/B,eAAU,GAAV,UAAU,CAAqB;IAAG,CAAC;IAEhE;;;;OAIG;IACH,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,kBAAkB,GAAG,CAAC,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAG,CAAmB,KAI3B;QACC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;YACpC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;YAE1D,IAAI,CAAC,MAAM,CAAC;gBACV,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,MAAM;gBACN,KAAK;gBACL,SAAS;aACV,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QAClB,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,IAAI,CAAC,MAAM,CAAC;gBACV,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,SAAS;gBACT,KAAK;gBACL,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;YAEH,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,KAAoB;QACjC,IAAI,CAAC,kBAAkB,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;CACF;AAtDD,wCAsDC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type LLMModelUsage } from '../../LLMService.typedefs';
|
|
2
|
+
/**
|
|
3
|
+
* One model round of an agent tool loop, as its provider observed it.
|
|
4
|
+
*
|
|
5
|
+
* `input` is the provider-native message array the round was sent with. Each
|
|
6
|
+
* provider keeps its own representation, so a round carries whatever that
|
|
7
|
+
* provider actually assembled — system instructions included — rather than a
|
|
8
|
+
* shared message shape none of them speaks.
|
|
9
|
+
*/
|
|
10
|
+
export interface LLMAgentRound {
|
|
11
|
+
input: unknown;
|
|
12
|
+
/**
|
|
13
|
+
* The round's assistant output, in the provider's own shape, so a round that
|
|
14
|
+
* only requested tools still shows the calls it made. Absent on a round whose
|
|
15
|
+
* provider call threw; `error` then describes the failure instead.
|
|
16
|
+
*/
|
|
17
|
+
output?: unknown;
|
|
18
|
+
/**
|
|
19
|
+
* The round's own token usage. Providers that report usage per call fill it
|
|
20
|
+
* on every round; one that only totals a run leaves it unset until the last
|
|
21
|
+
* round, which then carries the run total.
|
|
22
|
+
*/
|
|
23
|
+
usage?: LLMModelUsage;
|
|
24
|
+
/** Epoch milliseconds stamped immediately before the provider call. */
|
|
25
|
+
startedAt: number;
|
|
26
|
+
error?: unknown;
|
|
27
|
+
/** Marks a round whose provider call threw, traced at `level: ERROR`. */
|
|
28
|
+
isError?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* What one round's response contributes to its generation. Produced by the
|
|
32
|
+
* provider because only the provider knows which part of its response is the
|
|
33
|
+
* assistant output and where that response reports its usage.
|
|
34
|
+
*/
|
|
35
|
+
export interface LLMAgentRoundOutcome {
|
|
36
|
+
output: unknown;
|
|
37
|
+
usage?: LLMModelUsage;
|
|
38
|
+
}
|
|
39
|
+
/** Emits the generation observation of a single agent round. */
|
|
40
|
+
export type LLMAgentRoundWriter = (round: LLMAgentRound) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentRounds.typedefs.js","sourceRoot":"","sources":["../../../src/services/agentRounds/agentRounds.typedefs.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./agentRounds.typedefs"), exports);
|
|
18
|
+
__exportStar(require("./LLMAgentRounds"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/agentRounds/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,mDAAiC"}
|
package/dist/services/index.d.ts
CHANGED
package/dist/services/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./agentRounds"), exports);
|
|
17
18
|
__exportStar(require("./LLMBaseService.abstract"), exports);
|
|
18
19
|
__exportStar(require("./LLMCompletionService.abstract"), exports);
|
|
19
20
|
__exportStar(require("./LLMServicePurposeFactory.abstract"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,kEAAgD;AAChD,sEAAoD;AACpD,kEAAgD;AAChD,oEAAkD;AAClD,oEAAkD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,4DAA0C;AAC1C,kEAAgD;AAChD,sEAAoD;AACpD,kEAAgD;AAChD,oEAAkD;AAClD,oEAAkD"}
|
|
@@ -53,6 +53,19 @@ export interface LLMGenerationTrace {
|
|
|
53
53
|
* link the observation to its prompt version.
|
|
54
54
|
*/
|
|
55
55
|
prompt?: LLMTracedPrompt;
|
|
56
|
+
/**
|
|
57
|
+
* The user this call was made for. A typed trace attribute, never a metadata
|
|
58
|
+
* key: the tracer promotes it to the trace's own user field, which is what
|
|
59
|
+
* Langfuse filters and groups on.
|
|
60
|
+
*/
|
|
61
|
+
userId?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Groups every trace of one conversation, review, or agent run under a single
|
|
64
|
+
* Langfuse session. Typed trace attribute, never a metadata key.
|
|
65
|
+
*/
|
|
66
|
+
sessionId?: string;
|
|
67
|
+
/** Langfuse trace tags. Typed trace attribute, never a metadata key. */
|
|
68
|
+
tags?: string[];
|
|
56
69
|
/** Epoch milliseconds captured immediately before the provider call. */
|
|
57
70
|
startedAt: number;
|
|
58
71
|
}
|
|
@@ -85,6 +98,13 @@ export interface LLMGatewayTracer {
|
|
|
85
98
|
* never touch another project's trace.
|
|
86
99
|
*/
|
|
87
100
|
updateActiveTrace(update: LLMActiveTraceUpdate): void;
|
|
101
|
+
/**
|
|
102
|
+
* The context the active scope was opened with, or `undefined` outside a
|
|
103
|
+
* scope. It is what lets a consumer resolve what the surrounding operation
|
|
104
|
+
* declared (its user, session, tags) without the application threading that
|
|
105
|
+
* context through every call.
|
|
106
|
+
*/
|
|
107
|
+
getActiveTraceContext(): LLMTraceContext | undefined;
|
|
88
108
|
flush(): Promise<void>;
|
|
89
109
|
/**
|
|
90
110
|
* Tears down the tracer's provider/exporter. Optional so a 7.8 minor does not
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noopLLMTracing.js","sourceRoot":"","sources":["../../../src/utilities/llmTracing/noopLLMTracing.ts"],"names":[],"mappings":";;;AAMA,MAAM,oBAAoB;IACf,SAAS,GAAG,KAAK,CAAC;IAE3B,KAAK,CAAC,SAAS,CACb,KAAa,EACb,QAAyB,EACzB,EAAyB;QAEzB,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED,gBAAgB;QACd,sBAAsB;IACxB,CAAC;IAED,KAAK,CAAC,mBAAmB,CACvB,KAAa,EACb,MAAe,EACf,EAAyB;QAEzB,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED,iBAAiB;QACf,sBAAsB;IACxB,CAAC;IAED,KAAK,CAAC,KAAK;QACT,sBAAsB;IACxB,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,sBAAsB;IACxB,CAAC;CACF;AAEY,QAAA,oBAAoB,GAAqB,IAAI,oBAAoB,EAAE,CAAC;AAE1E,MAAM,yBAAyB,GAA6B,GAAG,EAAE;IACtE,oCAAoC;AACtC,CAAC,CAAC;AAFW,QAAA,yBAAyB,6BAEpC"}
|
|
1
|
+
{"version":3,"file":"noopLLMTracing.js","sourceRoot":"","sources":["../../../src/utilities/llmTracing/noopLLMTracing.ts"],"names":[],"mappings":";;;AAMA,MAAM,oBAAoB;IACf,SAAS,GAAG,KAAK,CAAC;IAE3B,KAAK,CAAC,SAAS,CACb,KAAa,EACb,QAAyB,EACzB,EAAyB;QAEzB,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED,gBAAgB;QACd,sBAAsB;IACxB,CAAC;IAED,KAAK,CAAC,mBAAmB,CACvB,KAAa,EACb,MAAe,EACf,EAAyB;QAEzB,OAAO,EAAE,EAAE,CAAC;IACd,CAAC;IAED,iBAAiB;QACf,sBAAsB;IACxB,CAAC;IAED,qBAAqB;QACnB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,KAAK;QACT,sBAAsB;IACxB,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,sBAAsB;IACxB,CAAC;CACF;AAEY,QAAA,oBAAoB,GAAqB,IAAI,oBAAoB,EAAE,CAAC;AAE1E,MAAM,yBAAyB,GAA6B,GAAG,EAAE;IACtE,oCAAoC;AACtC,CAAC,CAAC;AAFW,QAAA,yBAAyB,6BAEpC"}
|