Skip to content

Commit

Permalink
Merge pull request #40 from Liu233w/main
Browse files Browse the repository at this point in the history
Allow user specify models
  • Loading branch information
thomas-endres-tng authored Mar 22, 2024
2 parents 380e583 + edae7dd commit 92a2c4f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ You may then:
- `-l` or `--legacy` will use the GPT3.5 AI model instead of GPT4 (in case you don't have API access to GPT4)
- `--debug` will display additional output
- `-a` or `--api-key` will store your API key in the local keychain
- `-m` or `--model` will query ChatGPT with the specified model
- `-v` or `--version` will show the current version
- `-h` or `--help` will show the help message
```
Expand Down
10 changes: 10 additions & 0 deletions please.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ check_args() {
store_api_key
exit 0
;;
-m|--model)
if [ -n "$2" ] && [ "${2:0:1}" != "-" ] && [ "${2:0:3}" == "gpt" ]; then
model="$2"
shift 2
else
echo "Error: --model requires a gpt model"
exit 1
fi
;;
-v|--version)
display_version
exit 0
Expand Down Expand Up @@ -113,6 +122,7 @@ display_help() {
echo " -l, --legacy Use GPT 3.5 (in case you do not have GPT4 API access)"
echo " --debug Show debugging output"
echo " -a, --api-key Store your API key in the local keychain"
echo " -m, --model Specify the exact LLM model for the script"
echo " -v, --version Display version information and exit"
echo " -h, --help Display this help message and exit"
echo
Expand Down

0 comments on commit 92a2c4f

Please sign in to comment.