14 lines
313 B
TypeScript
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
|
|
}
|
|
}
|