Report sources in API responses on finalized chunk (#4396)
This commit is contained in:
parent
50d4a198a4
commit
7864e1a970
@ -665,10 +665,7 @@ async function streamChat({
|
||||
const stream = await LLMConnector.streamGetChatCompletion(messages, {
|
||||
temperature: workspace?.openAiTemp ?? LLMConnector.defaultTemp,
|
||||
});
|
||||
completeText = await LLMConnector.handleStream(response, stream, {
|
||||
uuid,
|
||||
sources,
|
||||
});
|
||||
completeText = await LLMConnector.handleStream(response, stream, { uuid });
|
||||
metrics = stream.metrics;
|
||||
}
|
||||
|
||||
@ -695,6 +692,7 @@ async function streamChat({
|
||||
error: false,
|
||||
chatId: chat.id,
|
||||
metrics,
|
||||
sources,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user