@apo-ai/sdk 0.16.0 → 0.16.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/dist/agent-task/public.d.ts +1 -0
- package/dist/agent-task/public.js +17 -16
- package/dist/agent-task/public.js.map +1 -1
- package/dist/{chunk-P24ECOI3.js → chunk-YWUTUQPJ.js} +19 -2
- package/dist/{chunk-P24ECOI3.js.map → chunk-YWUTUQPJ.js.map} +1 -1
- package/dist/otel/index.js +1 -1
- package/package.json +1 -1
|
@@ -2320,6 +2320,7 @@ interface OTelSpanProcessorLifecycle {
|
|
|
2320
2320
|
*/
|
|
2321
2321
|
declare class ApoSpanProcessor implements OTelSpanProcessorLifecycle {
|
|
2322
2322
|
private spanMap;
|
|
2323
|
+
private servedModelByParent;
|
|
2323
2324
|
onStart(span: OTelSpan, _parentContext: OTelContext): void;
|
|
2324
2325
|
onEnd(span: OTelReadableSpan): void;
|
|
2325
2326
|
forceFlush(): Promise<void>;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveApoAuthHeaders,
|
|
10
10
|
withApoRun,
|
|
11
11
|
withApoRunSync
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-YWUTUQPJ.js";
|
|
13
13
|
import {
|
|
14
14
|
createApoTracer
|
|
15
15
|
} from "../chunk-OZWOLCJ5.js";
|
|
@@ -2073,9 +2073,6 @@ function evaluateComputeExpression(expression) {
|
|
|
2073
2073
|
const parser = new Parser(tokens);
|
|
2074
2074
|
const value = parser.parseExpression(0);
|
|
2075
2075
|
parser.expectEnd();
|
|
2076
|
-
if (!Number.isFinite(value)) {
|
|
2077
|
-
return { error: "result is not finite" };
|
|
2078
|
-
}
|
|
2079
2076
|
return { value, text: Number(value.toPrecision(12)).toString() };
|
|
2080
2077
|
} catch (error) {
|
|
2081
2078
|
return { error: error instanceof ComputeError ? error.message : String(error) };
|
|
@@ -3979,19 +3976,23 @@ function deriveEvaluatorType(assertions) {
|
|
|
3979
3976
|
}
|
|
3980
3977
|
function summarizeCheckForSpan(result) {
|
|
3981
3978
|
const check = result;
|
|
3979
|
+
const reasoning = check.reasoning.slice(0, 2e3);
|
|
3982
3980
|
return {
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3981
|
+
text: reasoning,
|
|
3982
|
+
verdict: {
|
|
3983
|
+
pass: check.pass,
|
|
3984
|
+
reasoning,
|
|
3985
|
+
evaluator_type: check.evaluator_type,
|
|
3986
|
+
...check.judge ? { judge_model: check.judge.model } : {},
|
|
3987
|
+
...check.assertions ? {
|
|
3988
|
+
assertions: check.assertions.map((a) => ({
|
|
3989
|
+
id: a.id,
|
|
3990
|
+
pass: a.pass,
|
|
3991
|
+
...a.expected !== void 0 ? { expected: a.expected } : {},
|
|
3992
|
+
...a.received !== void 0 ? { received: truncateReceivedValue(a.received) } : {}
|
|
3993
|
+
}))
|
|
3994
|
+
} : {}
|
|
3995
|
+
}
|
|
3995
3996
|
};
|
|
3996
3997
|
}
|
|
3997
3998
|
function rollUpCheckOutcome(failed) {
|