From 26b5f9e52c97130561467ed2bad04f0835f36772 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Sat, 20 May 2023 16:16:23 +0200 Subject: [PATCH] bugfix --- gpt4all_api/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpt4all_api/api.py b/gpt4all_api/api.py index 177e7f18..61ea2f56 100644 --- a/gpt4all_api/api.py +++ b/gpt4all_api/api.py @@ -313,7 +313,7 @@ class ModelProcess: return True else: # Stream the generated text to the main process - self.generation_queue.put((text,self.id)) + self.generation_queue.put((text,self.id, 0)) self._check_set_config_queue() self._check_cancel_queue() self._check_clear_queue() @@ -719,7 +719,7 @@ class GPT4AllAPI(): while(self.process.is_generating.value): # Simulating other commands being issued chunk = "" while not self.process.generation_queue.empty(): - chk, tok = self.process.generation_queue.get() + chk, tok, message_type = self.process.generation_queue.get() chunk += chk if chunk!="": self.process_chunk(chunk)