djmuted commited on
Commit
1e956de
1 Parent(s): 6351668

Reset chat on each request

Browse files
Files changed (1) hide show
  1. src/openai.js +4 -1
src/openai.js CHANGED
@@ -89,7 +89,10 @@ openaiRouter.post("/chat/completions", jsonParser, async (req, res) => {
89
  }
90
  };
91
 
92
- const result = await myq.run(() => slack.waitForWebSocketResponse(messagesSplit, onData));
 
 
 
93
 
94
  if (stream) {
95
  res.write('event: data\n');
 
89
  }
90
  };
91
 
92
+ const result = await myq.run(async () => {
93
+ await slack.sendChatReset();
94
+ await slack.waitForWebSocketResponse(messagesSplit, onData);
95
+ });
96
 
97
  if (stream) {
98
  res.write('event: data\n');