mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
chore: Adjust timeout for subscriber readiness in ResumableAgentController
- Reduced the timeout duration from 5000ms to 2500ms in the startGeneration function to improve responsiveness when waiting for subscriber readiness. This change aims to enhance the efficiency of the agent's background generation process.
This commit is contained in:
parent
9fb7594ebe
commit
696961df6c
1 changed files with 1 additions and 1 deletions
|
|
@ -166,7 +166,7 @@ const ResumableAgentController = async (req, res, next, initializeClient, addTit
|
|||
// Start background generation - wait for subscriber with timeout fallback
|
||||
const startGeneration = async () => {
|
||||
try {
|
||||
await Promise.race([job.readyPromise, new Promise((resolve) => setTimeout(resolve, 5000))]);
|
||||
await Promise.race([job.readyPromise, new Promise((resolve) => setTimeout(resolve, 2500))]);
|
||||
} catch (waitError) {
|
||||
logger.warn(
|
||||
`[ResumableAgentController] Error waiting for subscriber: ${waitError.message}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue