Skip to content

Commit df41b6a

Browse files
committed
Added citation to output
1 parent 9f2ba11 commit df41b6a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/KernelMemory.Extensions.ConsoleTest/Samples/CustomSearchPipelineBase.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,14 @@ public async Task RunSample2()
188188
{
189189
Console.WriteLine("Answer cannot be retrieved.");
190190
}
191+
else if (userQuestion.Citations?.Count > 0)
192+
{
193+
Console.WriteLine("Citations:");
194+
foreach (var citation in userQuestion.Citations)
195+
{
196+
Console.WriteLine("Document: {0}", citation.DocumentId);
197+
}
198+
}
191199
}
192200
} while (!string.IsNullOrWhiteSpace(question));
193201
}

0 commit comments

Comments
 (0)