mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
perf: detail=false, not response variable update (#1419)
This commit is contained in:
@@ -32,7 +32,7 @@ export async function getVectorsByText({ model, input, type }: GetVectorProps) {
|
|||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
if (!res.data) {
|
if (!res.data) {
|
||||||
return Promise.reject('Embedding API 404');
|
return Promise.reject('Embedding API is not responding');
|
||||||
}
|
}
|
||||||
if (!res?.data?.[0]?.embedding) {
|
if (!res?.data?.[0]?.embedding) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
@@ -288,13 +288,13 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
event: detail ? SseResponseEventEnum.answer : undefined,
|
event: detail ? SseResponseEventEnum.answer : undefined,
|
||||||
data: '[DONE]'
|
data: '[DONE]'
|
||||||
});
|
});
|
||||||
responseWrite({
|
|
||||||
res,
|
|
||||||
event: SseResponseEventEnum.updateVariables,
|
|
||||||
data: JSON.stringify(newVariables)
|
|
||||||
});
|
|
||||||
|
|
||||||
if (responseDetail && detail) {
|
if (responseDetail && detail) {
|
||||||
|
responseWrite({
|
||||||
|
res,
|
||||||
|
event: SseResponseEventEnum.updateVariables,
|
||||||
|
data: JSON.stringify(newVariables)
|
||||||
|
});
|
||||||
responseWrite({
|
responseWrite({
|
||||||
res,
|
res,
|
||||||
event: SseResponseEventEnum.flowResponses,
|
event: SseResponseEventEnum.flowResponses,
|
||||||
|
Reference in New Issue
Block a user