File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { LEXICON_EN } from '../lexicon/lexicon_en.js';
33
44import { openai } from '../openai.js' ;
55import { converter } from '../converter.js' ;
6+ import { deleteFile } from '../utils/deleteFile.js' ;
67
78import { menuKeyboard } from '../keyboards/keyboards.js' ;
89import { createInitialSession } from '../utils/createSession.js' ;
@@ -84,14 +85,14 @@ class OpenAIHandlers {
8485 role : openai . roles . USER ,
8586 content : text ,
8687 } ) ;
87-
8888 openai
8989 . chat ( sessions [ sessionId ] . messages )
9090 . then ( this . sendResponse ( ctx , sessions , sessionId ) )
9191 . catch ( ErrorHandler . responseError ( ctx , 'transcription' ) ) ;
9292 } )
9393 . catch ( ErrorHandler . responseError ( ctx , 'voiceHandler' ) )
9494 . finally ( async ( ) => {
95+ await deleteFile ( mp3Path ) ;
9596 await ctx . deleteMessage ( processing . message_id ) ;
9697 } ) ;
9798 } ;
You can’t perform that action at this time.
0 commit comments