Update chatgpt.sh

With the new chat completion mode it is not possible to influence the init prompt. So it should be set in the initprompt parameters.

It is wrong to execute two shifts with the switch parameters.

it should also be considered whether the context mode can be omitted due to the new chat completion mode
pull/25/head
oligeo 1 year ago committed by GitHub
parent a60e191acb
commit 38c95afc52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      chatgpt.sh

@ -147,12 +147,14 @@ while [[ "$#" -gt 0 ]]; do
case $1 in
-i | --init-prompt)
CHAT_INIT_PROMPT="$2"
SYSTEM_PROMPT="$2"
CONTEXT=true
shift
shift
;;
--init-prompt-from-file)
CHAT_INIT_PROMPT=$(cat "$2")
SYSTEM_PROMPT=$(cat "$2")
CONTEXT=true
shift
shift
@ -190,13 +192,11 @@ while [[ "$#" -gt 0 ]]; do
-c | --chat-context)
CONTEXT=true
shift
shift
;;
-cc | --chat-completion)
MODEL="gpt-3.5-turbo"
CHAT_COMPLETION=true
shift
shift
;;
*)
echo "Unknown parameter: $1"

Loading…
Cancel
Save