@@ -12,16 +12,19 @@ def run() -> None:
12
12
graphical user interface for user interaction.
13
13
"""
14
14
parser = argparse .ArgumentParser (
15
- prog = "BanterBot Command Line Interface " ,
15
+ prog = "BanterBot GUI " ,
16
16
description = (
17
- "This program defines an interface for a text-based conversational agent based on the Persona class. The "
18
- "program uses the termighty library to create a graphical user interface for user interaction and handles "
19
- "input and output processing, as well as text-to-speech synthesis."
17
+ "This program initializes a GUI that allows users to interact with a chatbot by entering a name and a "
18
+ "message, and it displays the conversation history in a scrollable text area. Users can send messages by "
19
+ "pressing the `Send` button or the `Enter` key. The chatbot's responses are generated using the specified "
20
+ "OpenAI model and can be played back using the specified Azure Neural Voice. Additionally, users can "
21
+ "toggle speech-to-text input by pressing the `Listen` button."
20
22
),
21
23
epilog = (
22
24
"Requires three environment variables for full functionality. "
23
- "1) OPENAI_API_KEY: A valid OpenAI API key, "
24
- "2) AZURE_SPEECH_KEY: A valid Azure Cognitive Services Speech API key for TTS functionality, and "
25
+ "1) OPENAI_API_KEY: A valid OpenAI API key,\n "
26
+ "2) AZURE_SPEECH_KEY: A valid Azure Cognitive Services Speech API key for text-to-speech and "
27
+ "speech-to-text functionality,\n "
25
28
"3) AZURE_SPEECH_REGION: The region associated with your Azure Cognitive Services Speech API key."
26
29
),
27
30
)
@@ -34,6 +37,8 @@ def run() -> None:
34
37
help = "Enable GPT-4; only works if you have GPT-4 API access." ,
35
38
)
36
39
40
+ args = parser .parse_args ()
41
+
37
42
kwargs = {
38
43
"model" : get_model_by_name ("gpt-4" ) if args .gpt4 else get_model_by_name ("gpt-3.5-turbo" ),
39
44
}
0 commit comments