We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 636a24d commit fce0042Copy full SHA for fce0042
1 file changed
src/langfuse.ts
@@ -328,11 +328,13 @@ export class LangfuseClient {
328
role: "assistant" as const,
329
content: this.getAssistantText(input.messageID),
330
};
331
- const turn = this.getTurnObservation(input.sessionID, input.parentID);
332
- turn?.span.setAttribute(
333
- "langfuse.observation.output",
334
- JSON.stringify(output),
335
- );
+ if (input.mode !== "compaction") {
+ const turn = this.getTurnObservation(input.sessionID, input.parentID);
+ turn?.span.setAttribute(
+ "langfuse.observation.output",
+ JSON.stringify(output),
336
+ );
337
+ }
338
const step = this.traceState.activeGenerationSteps.get(input.sessionID);
339
340
if (step) {
0 commit comments