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.
Files changed (40) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/lib/core/cli.d.ts +1 -1
  3. package/lib/core/cli.d.ts.map +1 -1
  4. package/lib/core/cli.js +1 -1
  5. package/lib/core/cli.js.map +1 -1
  6. package/lib/core/cli.mjs +1 -1
  7. package/lib/core/cli.mjs.map +1 -1
  8. package/lib/integrations/bedrockAgentTracer.d.ts +2 -1
  9. package/lib/integrations/bedrockAgentTracer.d.ts.map +1 -1
  10. package/lib/integrations/bedrockAgentTracer.js +694 -3
  11. package/lib/integrations/bedrockAgentTracer.js.map +1 -1
  12. package/lib/integrations/bedrockAgentTracer.mjs +694 -3
  13. package/lib/integrations/bedrockAgentTracer.mjs.map +1 -1
  14. package/lib/integrations/openAiTracer.d.ts.map +1 -1
  15. package/lib/integrations/openAiTracer.js +0 -2
  16. package/lib/integrations/openAiTracer.js.map +1 -1
  17. package/lib/integrations/openAiTracer.mjs +0 -2
  18. package/lib/integrations/openAiTracer.mjs.map +1 -1
  19. package/lib/tracing/steps.d.ts +0 -2
  20. package/lib/tracing/steps.d.ts.map +1 -1
  21. package/lib/tracing/steps.js +0 -2
  22. package/lib/tracing/steps.js.map +1 -1
  23. package/lib/tracing/steps.mjs +0 -2
  24. package/lib/tracing/steps.mjs.map +1 -1
  25. package/lib/tracing/tracer.d.ts +2 -2
  26. package/lib/tracing/tracer.d.ts.map +1 -1
  27. package/lib/tracing/tracer.js +2 -2
  28. package/lib/tracing/tracer.js.map +1 -1
  29. package/lib/tracing/tracer.mjs +2 -2
  30. package/lib/tracing/tracer.mjs.map +1 -1
  31. package/package.json +1 -1
  32. package/src/lib/core/cli.ts +2 -2
  33. package/src/lib/integrations/bedrockAgentTracer.ts +839 -7
  34. package/src/lib/integrations/openAiTracer.ts +0 -2
  35. package/src/lib/tracing/steps.ts +0 -3
  36. package/src/lib/tracing/tracer.ts +3 -3
  37. package/src/version.ts +1 -1
  38. package/version.d.ts +1 -1
  39. package/version.js +1 -1
  40. 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,
@@ -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.15.2'; // x-release-please-version
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.15.2";
1
+ export declare const VERSION = "0.16.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.15.2'; // x-release-please-version
4
+ exports.VERSION = '0.16.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.15.2'; // x-release-please-version
1
+ export const VERSION = '0.16.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map