mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
perf: detail=false, not response variable update (#1419)
Some checks failed
Deploy image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy image by kubeconfig / update-docs-image (push) Blocked by required conditions
Deploy image to vercel / deploy-production (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
Sync images / sync (push) Has been cancelled
Some checks failed
Deploy image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy image by kubeconfig / update-docs-image (push) Blocked by required conditions
Deploy image to vercel / deploy-production (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (push) Waiting to run
Sync images / sync (push) Has been cancelled
This commit is contained in:
parent
af4c732d93
commit
6463427d93
|
|
@ -32,7 +32,7 @@ export async function getVectorsByText({ model, input, type }: GetVectorProps) {
|
|||
})
|
||||
.then(async (res) => {
|
||||
if (!res.data) {
|
||||
return Promise.reject('Embedding API 404');
|
||||
return Promise.reject('Embedding API is not responding');
|
||||
}
|
||||
if (!res?.data?.[0]?.embedding) {
|
||||
console.log(res);
|
||||
|
|
|
|||
|
|
@ -288,13 +288,13 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||
event: detail ? SseResponseEventEnum.answer : undefined,
|
||||
data: '[DONE]'
|
||||
});
|
||||
responseWrite({
|
||||
res,
|
||||
event: SseResponseEventEnum.updateVariables,
|
||||
data: JSON.stringify(newVariables)
|
||||
});
|
||||
|
||||
if (responseDetail && detail) {
|
||||
responseWrite({
|
||||
res,
|
||||
event: SseResponseEventEnum.updateVariables,
|
||||
data: JSON.stringify(newVariables)
|
||||
});
|
||||
responseWrite({
|
||||
res,
|
||||
event: SseResponseEventEnum.flowResponses,
|
||||
|
|
|
|||
Loading…
Reference in New Issue