feat: 请求增加requestid

This commit is contained in:
rd
2025-08-28 14:58:58 +08:00
parent cdda8ffba7
commit 0c14a0caec
4 changed files with 42 additions and 28 deletions

View File

@ -3,6 +3,7 @@ import type { EventSourceMessage } from '@microsoft/fetch-event-source';
import { useEnterpriseStore } from '@/stores/modules/enterprise';
import { glsWithCatch } from '@/utils/stroage';
import { BASE_PYTHON_URL } from '@/api/all/chat';
import { genRandomId } from '@/utils/tools';
const DEFAULT_SSE_URL = `${BASE_PYTHON_URL}/api/agent/runs`;
@ -11,6 +12,7 @@ const SSE_HEADERS = {
'Cache-Control': 'no-cache',
Connection: 'keep-alive',
Accept: 'text/event-stream',
requestid: genRandomId(),
};
interface SSEConfig {