diff options
author | Schark <jordan@schark.online> | 2023-12-02 09:18:48 -0800 |
---|---|---|
committer | Schark <jordan@schark.online> | 2023-12-02 09:18:48 -0800 |
commit | 1f88bb51a3ab9f1ce1d0fa1058a851521a02d017 (patch) | |
tree | 056097fad105b7c931555bf4028c23f04d0d2583 | |
parent | f580735aaafdc8e0c9128955fcb93c039d10b8b9 (diff) | |
download | cli-gpt-1f88bb51a3ab9f1ce1d0fa1058a851521a02d017.tar.gz cli-gpt-1f88bb51a3ab9f1ce1d0fa1058a851521a02d017.zip |
Style hotfix
-rw-r--r-- | chat.py | 5 | ||||
-rw-r--r-- | style.py | 5 |
2 files changed, 6 insertions, 4 deletions
@@ -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() @@ -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): |