makaveli10 commited on
Commit
779ed30
1 Parent(s): 79ce63a

send llm responses with eos=True

Browse files
Files changed (1) hide show
  1. whisper_live/trt_server.py +4 -3
whisper_live/trt_server.py CHANGED
@@ -358,9 +358,10 @@ class ServeClient:
358
  llm_response = self.llm_queue.get()
359
 
360
  if llm_response:
361
- # eos = llm_response["eos"]
362
- # if eos:
363
- self.websocket.send(json.dumps(llm_response))
 
364
  except queue.Empty:
365
  pass
366
 
 
358
  llm_response = self.llm_queue.get()
359
 
360
  if llm_response:
361
+ eos = llm_response["eos"]
362
+ if eos:
363
+ logging.info(f"[LLM INFO:] sending response to client : {llm_response}")
364
+ self.websocket.send(json.dumps(llm_response))
365
  except queue.Empty:
366
  pass
367