Open sweep-ai[bot] opened 1 year ago
./lib/utils does not exist, please create a new delay function and use that instead
./lib/utils does not exist, please create a new delay function and use that instead
Hi @wwzeng1,
I decided to make the following changes:
File Path | Proposed Changes |
---|---|
convex/agent.ts |
Modify convex/agent.ts with contents: * Remove the import statement for the sleep function from the utils file in the lib directory. • Create a new function named "delay" at the top of the file. This function should take a single parameter, "ms", which represents the number of milliseconds to delay. The function should return a new Promise that resolves after the specified number of milliseconds using the setTimeout method. • Replace the call to the sleep function after each message is sent in the handleAgentInteraction function with a call to the new delay function. |
Description
This PR adds a delay function to slow down conversations in the agent.ts file. The delay function pauses the execution of the conversation for a specified period of time after each message is sent.
Summary of Changes
Fixes #2.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.