mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-18 01:16:01 +00:00
Feat: system tool support stream response (#5206)
* Match SSE for FastGPT (#5168) * Match SSE for FastGPT * Modify the judgment * Optimize logic for SSE transmission * Refactor imports * directly use workflowStreamResponse from props * improve error handling and streamline onStreamData logic * Refactor API client configuration * perf: system tool support sse * update doc --------- Co-authored-by: Zhuangzai fa <143257420+ctrlz526@users.noreply.github.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import { type ShortUrlParams } from '@fastgpt/global/support/marketing/type';
|
||||
|
||||
const createTrack = ({ event, data }: { event: TrackEnum; data: Record<string, any> }) => {
|
||||
if (!global.feConfigs?.isPlus) return;
|
||||
addLog.info('Push tracks', {
|
||||
addLog.debug('Push tracks', {
|
||||
event,
|
||||
...data
|
||||
});
|
||||
@@ -65,5 +65,13 @@ export const pushTrack = {
|
||||
}
|
||||
});
|
||||
} catch (error) {}
|
||||
},
|
||||
runSystemTool: (
|
||||
data: PushTrackCommonType & { toolId: string; result: 1 | 0; usagePoint?: number; msg?: string }
|
||||
) => {
|
||||
return createTrack({
|
||||
event: TrackEnum.runSystemTool,
|
||||
data
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user