Former-commit-id: a8cd556230c1d0bc4e090acc2276c035910ce6f6
This commit is contained in:
hiyouga
2024-03-09 21:35:24 +08:00
parent 48846676d8
commit c631799f5d
5 changed files with 14 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ class ChatModel:
self._loop = asyncio.new_event_loop()
self._thread = Thread(target=_start_background_loop, args=(self._loop,), daemon=True)
self._thread.start()
asyncio.run_coroutine_threadsafe(self.engine.start(), self._loop)
def chat(
self,