Skip to content

Commit 6463427

Browse files
authored
perf: detail=false, not response variable update (FlowiseAI#1419)
1 parent af4c732 commit 6463427

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/service/core/ai/embedding/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function getVectorsByText({ model, input, type }: GetVectorProps) {
3232
})
3333
.then(async (res) => {
3434
if (!res.data) {
35-
return Promise.reject('Embedding API 404');
35+
return Promise.reject('Embedding API is not responding');
3636
}
3737
if (!res?.data?.[0]?.embedding) {
3838
console.log(res);

projects/app/src/pages/api/v1/chat/completions.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,13 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
288288
event: detail ? SseResponseEventEnum.answer : undefined,
289289
data: '[DONE]'
290290
});
291-
responseWrite({
292-
res,
293-
event: SseResponseEventEnum.updateVariables,
294-
data: JSON.stringify(newVariables)
295-
});
296291

297292
if (responseDetail && detail) {
293+
responseWrite({
294+
res,
295+
event: SseResponseEventEnum.updateVariables,
296+
data: JSON.stringify(newVariables)
297+
});
298298
responseWrite({
299299
res,
300300
event: SseResponseEventEnum.flowResponses,

0 commit comments

Comments
 (0)