Skip to content

Commit 89e9130

Browse files
author
GabrielSCabrera
committed
Fix bug in CLI
1 parent 1255f50 commit 89e9130

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ A graphical user interface (GUI) for a chatbot application that employs OpenAI m
4343

4444
## Installation
4545

46-
### Pip
46+
### Pip (Recommended)
4747

4848
BanterBot is installable using the Python Package Index (PyPi):
4949

banterbot/gui/cli.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@ def run() -> None:
1212
graphical user interface for user interaction.
1313
"""
1414
parser = argparse.ArgumentParser(
15-
prog="BanterBot Command Line Interface",
15+
prog="BanterBot GUI",
1616
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."
2022
),
2123
epilog=(
2224
"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"
2528
"3) AZURE_SPEECH_REGION: The region associated with your Azure Cognitive Services Speech API key."
2629
),
2730
)
@@ -34,6 +37,8 @@ def run() -> None:
3437
help="Enable GPT-4; only works if you have GPT-4 API access.",
3538
)
3639

40+
args=parser.parse_args()
41+
3742
kwargs = {
3843
"model": get_model_by_name("gpt-4") if args.gpt4 else get_model_by_name("gpt-3.5-turbo"),
3944
}

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ BanterBotTK
8787
Installation
8888
------------
8989

90-
Pip
91-
~~~
90+
Pip (Recommended)
91+
~~~~~~~~~~~~~~~~~
9292

9393
BanterBot is installable using the Python Package Index (PyPi):
9494

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
description = (
1010
"BanterBot: An OpenAI ChatGPT-powered chatbot with Azure Neural Voices. Supports speech-to-text and text-to-speech "
11-
"interactions. Features real-time monitoring and tkinter frontend."
11+
"interactions. Features real-time monitoring and Tkinter frontend."
1212
)
1313

1414
with open("README.md", "r") as fs:
@@ -24,19 +24,19 @@ def run_tests():
2424
test_suite = test_loader.discover("tests", pattern="test_*.py")
2525
return test_suite
2626

27-
27+
version = "0.0.3"
2828
setup(
2929
name="BanterBot",
3030
packages=find_packages(),
3131
test_suite="setup.run_tests",
32-
version="0.0.2",
32+
version=version,
3333
description=description,
3434
long_description=long_description,
3535
long_description_content_type="text/markdown",
3636
author="Gabriel S. Cabrera",
3737
author_email="gabriel.sigurd.cabrera@gmail.com",
3838
url=url,
39-
download_url=url + f"/releases/download/v0.0.2-alpha/BanterBot-0.0.2.tar.gz",
39+
download_url=url + f"/releases/download/v{version}-alpha/BanterBot-{version}.tar.gz",
4040
keywords=[
4141
"tkinter",
4242
"tk",

0 commit comments

Comments
 (0)