Files
sbnews/uniapp/src/api/aiRequest.ts
T
2026-06-11 12:15:29 +08:00

14 lines
313 B
TypeScript

export const AI_REQUEST_TIMEOUT = 5 * 60 * 1000
export const AI_REQUEST_CONFIG = {
retryCount: 0,
ignoreCancel: true
}
export function withAiRequestTimeout<T extends Record<string, any>>(options: T): T & { timeout: number } {
return {
...options,
timeout: AI_REQUEST_TIMEOUT
}
}