summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--chat.py5
-rw-r--r--style.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/chat.py b/chat.py
index 5b4f2aa..be2d77d 100644
--- a/chat.py
+++ b/chat.py
@@ -6,7 +6,7 @@ import time
from openai import OpenAI
from help import HelpCommands, start_chat
-from style import StyleLog as styler
+from style import StyleLog
# Read in token from "token" file
# TODO: env variable in future?
@@ -37,6 +37,7 @@ def main():
model = "gpt-3.5-turbo"
helper = HelpCommands(model)
+ styler = StyleLog()
messages = start_chat(model)
while True:
@@ -59,7 +60,7 @@ def main():
response_thread = threading.Thread(target=text_call, args=(api_call_queue, messages, model,))
response_thread.start()
- ellipsis_thread = threading.Thread(target=show_ellipsis)
+ ellipsis_thread = threading.Thread(target=styler.show_ellipsis, args=(api_call_done,))
ellipsis_thread.start()
response_thread.join()
diff --git a/style.py b/style.py
index 129bdd7..65fecf1 100644
--- a/style.py
+++ b/style.py
@@ -1,4 +1,5 @@
import sys
+import time
from prompt_toolkit import prompt
from prompt_toolkit.styles import Style
@@ -6,9 +7,9 @@ from prompt_toolkit.styles import Style
class StyleLog:
def prompt(role: str):
+ return
-
- def show_ellipsis():
+ def show_ellipsis(self, api_call_done):
loop = True
while loop:
for i in range(0, 4):