Skip to content

Commit c506e85

Browse files
committed
fix: rm rawOutput to improve dataset load size
1 parent 471093b commit c506e85

File tree

4 files changed

+0
-9
lines changed

4 files changed

+0
-9
lines changed

src/lib/integrations/bedrockAgentTracer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ function createTracedCompletion(
197197
cost: cost,
198198
model: agentModel || `${input.agentId}:${input.agentAliasId}`,
199199
modelParameters: extractModelParameters(input),
200-
rawOutput: JSON.stringify(rawOutputChunks, null, 2),
201200
metadata: metadata,
202201
provider: 'Bedrock',
203202
startTime: startTime,

src/lib/integrations/openAiTracer.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export function traceOpenAI(openai: OpenAI): OpenAI {
6464
latency: endTime - startTime,
6565
model: chunks[0]?.model as string,
6666
modelParameters: getModelParameters(args),
67-
rawOutput: chunks.map((chunk) => JSON.stringify(chunk, null, 2)).join('\n'),
6867
metadata: { timeToFistToken: firstTokenTime ? firstTokenTime - startTime : null },
6968
provider: 'OpenAI',
7069
completionTokens: completionTokens,
@@ -101,7 +100,6 @@ export function traceOpenAI(openai: OpenAI): OpenAI {
101100
completionTokens: response.usage?.completion_tokens ?? null,
102101
model: response.model,
103102
modelParameters: getModelParameters(args),
104-
rawOutput: JSON.stringify(response, null, 2),
105103
metadata: {},
106104
provider: 'OpenAI',
107105
startTime: startTime,

src/lib/tracing/steps.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export interface ChatCompletionStepData extends StepData {
2323
cost: number | null;
2424
model: string | null;
2525
modelParameters: Record<string, any> | null;
26-
rawOutput: string | null;
2726
}
2827

2928
export class Step {
@@ -95,7 +94,6 @@ export class ChatCompletionStep extends Step {
9594
cost: number | null = null;
9695
model: string | null = null;
9796
modelParameters: Record<string, any> | null = null;
98-
rawOutput: string | null = null;
9997

10098
constructor(name: string, inputs: any = null, output: any = null, metadata: Record<string, any> = {}, startTime?: number | null, endTime?: number | null) {
10199
super(name, inputs, output, metadata, startTime, endTime);
@@ -113,7 +111,6 @@ export class ChatCompletionStep extends Step {
113111
cost: this.cost,
114112
model: this.model,
115113
modelParameters: this.modelParameters,
116-
rawOutput: this.rawOutput,
117114
};
118115
}
119116
}

src/lib/tracing/tracer.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ export function addChatCompletionStepToTrace(
176176
cost = null,
177177
model = null,
178178
modelParameters = null,
179-
rawOutput = null,
180179
metadata = {},
181180
provider = 'OpenAI',
182181
startTime = null,
@@ -192,7 +191,6 @@ export function addChatCompletionStepToTrace(
192191
cost?: number | null;
193192
model?: string | null;
194193
modelParameters?: Record<string, any> | null;
195-
rawOutput?: string | null;
196194
metadata?: Record<string, any>;
197195
provider?: string;
198196
startTime?: number | null;
@@ -219,7 +217,6 @@ export function addChatCompletionStepToTrace(
219217
(step as ChatCompletionStep).cost = cost;
220218
(step as ChatCompletionStep).model = model;
221219
(step as ChatCompletionStep).modelParameters = modelParameters;
222-
(step as ChatCompletionStep).rawOutput = rawOutput;
223220
}
224221

225222
step.latency = latency;

0 commit comments

Comments
 (0)