Skip to content

Commit c38eea3

Browse files
committed
Use shouldEnableTruncation in LangChain integration
1 parent f422fd4 commit c38eea3

File tree

1 file changed

+2
-2
lines changed
  • packages/core/src/tracing/langchain

1 file changed

+2
-2
lines changed

packages/core/src/tracing/langchain/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
GEN_AI_TOOL_NAME_ATTRIBUTE,
1111
GEN_AI_TOOL_OUTPUT_ATTRIBUTE,
1212
} from '../ai/gen-ai-attributes';
13-
import { resolveAIRecordingOptions } from '../ai/utils';
13+
import { resolveAIRecordingOptions, shouldEnableTruncation } from '../ai/utils';
1414
import { LANGCHAIN_ORIGIN } from './constants';
1515
import type {
1616
LangChainCallbackHandler,
@@ -34,7 +34,7 @@ import {
3434
*/
3535
export function createLangChainCallbackHandler(options: LangChainOptions = {}): LangChainCallbackHandler {
3636
const { recordInputs, recordOutputs } = resolveAIRecordingOptions(options);
37-
const enableTruncation = options.enableTruncation ?? true;
37+
const enableTruncation = shouldEnableTruncation(options.enableTruncation);
3838

3939
// Internal state - single instance tracks all spans
4040
const spanMap = new Map<string, Span>();

0 commit comments

Comments
 (0)