Skip to content

Commit

Permalink
chat: default to gpt-4o, add quick mode option
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjpxie committed Jun 18, 2024
1 parent 9614457 commit 5ef820c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions pxutil/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,20 @@ def chat_main():
chat based on chatGPT API
"""
parser = argparse.ArgumentParser(
description="ChatGPT cli, type q to exit. Set env variable OPENAI_API_KEY first."
description="ChatGPT cli, type q to exit. Set environment variable OPENAI_API_KEY first."
)
parser.add_argument(
"-m",
"--model",
default="gpt-3.5-turbo",
help="OpenAI chatGPT model, gpt-3.5-turbo (default), gpt-4o etc.",
default="gpt-4o",
help="OpenAI chatGPT model, gpt-4o(default), gpt-3.5-turbo etc.",
)
parser.add_argument(
"-q",
"--quick",
action="store_true",
help="Quick mode to get answer, e.g., add 'Short answer pls' to chat.",
)
args = parser.parse_args()

register_signal_ctrl_c()
Expand All @@ -70,6 +76,8 @@ def chat_main():
question = input("> ")
if question in ("q", "quit"):
break
if args.quick:
question += "\nShort answer pls."
answer = chat.chat(question)
print(answer)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from setuptools import find_packages, setup, Extension
from Cython.Build import cythonize

_version = "0.0.32"
_version = "0.0.33"

with open("README.md") as readme:
long_description = readme.read()
Expand Down

0 comments on commit 5ef820c

Please sign in to comment.