This commit is contained in:
hiyouga
2024-03-09 21:35:24 +08:00
parent af0e370fb1
commit 412c52e325
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,