From f97f306bf8236ebc534529bb260125fe5488437c Mon Sep 17 00:00:00 2001 From: Tony Worm Date: Sun, 12 Feb 2023 21:44:25 -0500 Subject: [PATCH] tidy up --- README.md | 5 +++++ main.go | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e40907..8eab855 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,15 @@ Examples: chatgpt -p cynic -q "Is the world going to be ok?" chatgpt -p teacher convo.txt + # extra options + chatgpt -t 4096 # set max tokens in reponse + chatgpt -c # clean whitespace before sending + Usage: chatgpt [file] [flags] Flags: + -c, --clean remove excess whitespace from prompt before sending -h, --help help for chatgpt -i, --interactive start an interactive session with ChatGPT -p, --pretext string pretext to add to ChatGPT input, use 'list' or 'view:' to inspect predefined, '' to use a pretext, or otherwise supply any custom text diff --git a/main.go b/main.go index 070c868..6ac85a0 100644 --- a/main.go +++ b/main.go @@ -41,6 +41,10 @@ Examples: chatgpt -p optimistic -i chatgpt -p cynic -q "Is the world going to be ok?" chatgpt -p teacher convo.txt + + # extra options + chatgpt -t 4096 # set max tokens in reponse + chatgpt -c # clean whitespace before sending ` var interactiveHelp = `starting interactive session... @@ -197,7 +201,7 @@ func main() { rootCmd.Flags().StringVarP(&Question, "question", "q", "", "ask a single question and print the response back") rootCmd.Flags().StringVarP(&Pretext, "pretext", "p", "", "pretext to add to ChatGPT input, use 'list' or 'view:' to inspect predefined, '' to use a pretext, or otherwise supply any custom text") rootCmd.Flags().BoolVarP(&PromptMode, "interactive", "i", false, "start an interactive session with ChatGPT") - rootCmd.Flags().BoolVarP(&CleanPrompt, "clean", "x", false, "remove excess whitespace from prompt before sending") + rootCmd.Flags().BoolVarP(&CleanPrompt, "clean", "c", false, "remove excess whitespace from prompt before sending") rootCmd.Flags().IntVarP(&MaxTokens, "tokens", "t", 420, "set the MaxTokens to generate per response") rootCmd.Execute()