Compare commits

...

2 Commits

Author SHA1 Message Date
0xacx
a8b61627b2
Merge pull request #25 from oligeo/bugfixes
Update chatgpt.sh
2023-03-03 01:24:34 +02:00
oligeo
38c95afc52
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
2023-03-02 22:17:50 +01:00

View File

@ -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"