Daniel Marques commited on
Commit
b63eab3
·
1 Parent(s): 07e217d

fix: add websocket in handlerToken

Browse files
Files changed (1) hide show
  1. main.py +1 -2
main.py CHANGED
@@ -73,8 +73,7 @@ class MyCustomSyncHandler(BaseCallbackHandler):
73
  def on_llm_new_token(self, token: str, **kwargs) -> Any:
74
  print(token)
75
 
76
- if self.websocket != None:
77
- asyncio.run(self.websocket.send_text(token))
78
 
79
  print(token)
80
 
 
73
  def on_llm_new_token(self, token: str, **kwargs) -> Any:
74
  print(token)
75
 
76
+ self.state(token)
 
77
 
78
  print(token)
79