openlayer 0.15.2 → 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/CHANGELOG.md +16 -0
- package/lib/core/cli.d.ts +1 -1
- package/lib/core/cli.d.ts.map +1 -1
- package/lib/core/cli.js +1 -1
- package/lib/core/cli.js.map +1 -1
- package/lib/core/cli.mjs +1 -1
- package/lib/core/cli.mjs.map +1 -1
- package/lib/integrations/bedrockAgentTracer.d.ts +2 -1
- package/lib/integrations/bedrockAgentTracer.d.ts.map +1 -1
- package/lib/integrations/bedrockAgentTracer.js +694 -3
- package/lib/integrations/bedrockAgentTracer.js.map +1 -1
- package/lib/integrations/bedrockAgentTracer.mjs +694 -3
- package/lib/integrations/bedrockAgentTracer.mjs.map +1 -1
- package/lib/integrations/openAiTracer.d.ts.map +1 -1
- package/lib/integrations/openAiTracer.js +0 -2
- package/lib/integrations/openAiTracer.js.map +1 -1
- package/lib/integrations/openAiTracer.mjs +0 -2
- package/lib/integrations/openAiTracer.mjs.map +1 -1
- package/lib/tracing/steps.d.ts +0 -2
- package/lib/tracing/steps.d.ts.map +1 -1
- package/lib/tracing/steps.js +0 -2
- package/lib/tracing/steps.js.map +1 -1
- package/lib/tracing/steps.mjs +0 -2
- package/lib/tracing/steps.mjs.map +1 -1
- package/lib/tracing/tracer.d.ts +2 -2
- package/lib/tracing/tracer.d.ts.map +1 -1
- package/lib/tracing/tracer.js +2 -2
- package/lib/tracing/tracer.js.map +1 -1
- package/lib/tracing/tracer.mjs +2 -2
- package/lib/tracing/tracer.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/core/cli.ts +2 -2
- package/src/lib/integrations/bedrockAgentTracer.ts +839 -7
- package/src/lib/integrations/openAiTracer.ts +0 -2
- package/src/lib/tracing/steps.ts +0 -3
- package/src/lib/tracing/tracer.ts +3 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -64,7 +64,6 @@ export function traceOpenAI(openai: OpenAI): OpenAI {
|
|
|
64
64
|
latency: endTime - startTime,
|
|
65
65
|
model: chunks[0]?.model as string,
|
|
66
66
|
modelParameters: getModelParameters(args),
|
|
67
|
-
rawOutput: chunks.map((chunk) => JSON.stringify(chunk, null, 2)).join('\n'),
|
|
68
67
|
metadata: { timeToFistToken: firstTokenTime ? firstTokenTime - startTime : null },
|
|
69
68
|
provider: 'OpenAI',
|
|
70
69
|
completionTokens: completionTokens,
|
|
@@ -101,7 +100,6 @@ export function traceOpenAI(openai: OpenAI): OpenAI {
|
|
|
101
100
|
completionTokens: response.usage?.completion_tokens ?? null,
|
|
102
101
|
model: response.model,
|
|
103
102
|
modelParameters: getModelParameters(args),
|
|
104
|
-
rawOutput: JSON.stringify(response, null, 2),
|
|
105
103
|
metadata: {},
|
|
106
104
|
provider: 'OpenAI',
|
|
107
105
|
startTime: startTime,
|
package/src/lib/tracing/steps.ts
CHANGED
|
@@ -23,7 +23,6 @@ export interface ChatCompletionStepData extends StepData {
|
|
|
23
23
|
cost: number | null;
|
|
24
24
|
model: string | null;
|
|
25
25
|
modelParameters: Record<string, any> | null;
|
|
26
|
-
rawOutput: string | null;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
export class Step {
|
|
@@ -95,7 +94,6 @@ export class ChatCompletionStep extends Step {
|
|
|
95
94
|
cost: number | null = null;
|
|
96
95
|
model: string | null = null;
|
|
97
96
|
modelParameters: Record<string, any> | null = null;
|
|
98
|
-
rawOutput: string | null = null;
|
|
99
97
|
|
|
100
98
|
constructor(name: string, inputs: any = null, output: any = null, metadata: Record<string, any> = {}, startTime?: number | null, endTime?: number | null) {
|
|
101
99
|
super(name, inputs, output, metadata, startTime, endTime);
|
|
@@ -113,7 +111,6 @@ export class ChatCompletionStep extends Step {
|
|
|
113
111
|
cost: this.cost,
|
|
114
112
|
model: this.model,
|
|
115
113
|
modelParameters: this.modelParameters,
|
|
116
|
-
rawOutput: this.rawOutput,
|
|
117
114
|
};
|
|
118
115
|
}
|
|
119
116
|
}
|
|
@@ -173,9 +173,9 @@ export function addChatCompletionStepToTrace(
|
|
|
173
173
|
tokens = null,
|
|
174
174
|
promptTokens = null,
|
|
175
175
|
completionTokens = null,
|
|
176
|
+
cost = null,
|
|
176
177
|
model = null,
|
|
177
178
|
modelParameters = null,
|
|
178
|
-
rawOutput = null,
|
|
179
179
|
metadata = {},
|
|
180
180
|
provider = 'OpenAI',
|
|
181
181
|
startTime = null,
|
|
@@ -188,9 +188,9 @@ export function addChatCompletionStepToTrace(
|
|
|
188
188
|
tokens?: number | null;
|
|
189
189
|
promptTokens?: number | null;
|
|
190
190
|
completionTokens?: number | null;
|
|
191
|
+
cost?: number | null;
|
|
191
192
|
model?: string | null;
|
|
192
193
|
modelParameters?: Record<string, any> | null;
|
|
193
|
-
rawOutput?: string | null;
|
|
194
194
|
metadata?: Record<string, any>;
|
|
195
195
|
provider?: string;
|
|
196
196
|
startTime?: number | null;
|
|
@@ -214,9 +214,9 @@ export function addChatCompletionStepToTrace(
|
|
|
214
214
|
(step as ChatCompletionStep).promptTokens = promptTokens;
|
|
215
215
|
(step as ChatCompletionStep).completionTokens = completionTokens;
|
|
216
216
|
(step as ChatCompletionStep).tokens = tokens;
|
|
217
|
+
(step as ChatCompletionStep).cost = cost;
|
|
217
218
|
(step as ChatCompletionStep).model = model;
|
|
218
219
|
(step as ChatCompletionStep).modelParameters = modelParameters;
|
|
219
|
-
(step as ChatCompletionStep).rawOutput = rawOutput;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
step.latency = latency;
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.16.1'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.16.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.16.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|