refac: citations -> sources
This commit is contained in:
@@ -5,7 +5,7 @@ type TextStreamUpdate = {
|
||||
done: boolean;
|
||||
value: string;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
citations?: any;
|
||||
sources?: any;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
selectedModelId?: any;
|
||||
error?: any;
|
||||
@@ -67,8 +67,8 @@ async function* openAIStreamToIterator(
|
||||
break;
|
||||
}
|
||||
|
||||
if (parsedData.citations) {
|
||||
yield { done: false, value: '', citations: parsedData.citations };
|
||||
if (parsedData.sources) {
|
||||
yield { done: false, value: '', sources: parsedData.sources };
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ async function* streamLargeDeltasAsRandomChunks(
|
||||
yield textStreamUpdate;
|
||||
return;
|
||||
}
|
||||
if (textStreamUpdate.citations) {
|
||||
if (textStreamUpdate.sources) {
|
||||
yield textStreamUpdate;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user