Skip to content

Commit a2968d6

Browse files
committed
fix tc
1 parent 7de2c8d commit a2968d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/services/tracing/segments/document.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function computePrompt({
6363
current,
6464
run,
6565
document,
66+
evaluation,
6667
}: SegmentProcessArgs<SegmentType.Document>): TypedResult<
6768
DocumentSegmentMetadata['prompt']
6869
> {
@@ -80,7 +81,8 @@ function computePrompt({
8081
}
8182

8283
if (!prompt) prompt = run?.metadata?.prompt
83-
if (!prompt) prompt = document.content
84+
if (!prompt) prompt = document?.content
85+
if (!prompt) prompt = evaluation?.name // TODO(tracing): compute evaluation prompt
8486
if (!prompt) prompt = current?.metadata?.prompt
8587
if (!prompt) return Result.ok('')
8688

0 commit comments

Comments
 (0)