diff options
| -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): | 
