Compare commits

...

8 Commits

  1. 2
      README.md
  2. 6
      chatgpt.sh

@ -163,7 +163,7 @@ This script relies on curl for the requests to the api and jq to parse the json
## Contributors
:pray: Thanks to all the people who used, tested, submitted issues, PRs and proposed changes:
[pfr-dev](https://www.github.com/pfr-dev), [jordantrizz](https://www.github.com/jordantrizz), [se7en-x230](https://www.github.com/se7en-x230), [mountaineerbr](https://www.github.com/mountaineerbr), [oligeo](https://www.github.com/oligeo), [biaocy](https://www.github.com/biaocy), [dmd](https://www.github.com/dmd), [goosegit11](https://www.github.com/goosegit11), [dilatedpupils](https://www.github.com/dilatedpupils), [direster](https://www.github.com/direster), [rxaviers](https://www.github.com/rxaviers), [Zeioth](https://www.github.com/Zeioth), [edshamis](https://www.github.com/edshamis), [nre-ableton](https://www.github.com/nre-ableton), [TobiasLaving](https://www.github.com/TobiasLaving), [RexAckermann](https://www.github.com/RexAckermann), [emirkmo](https://www.github.com/emirkmo), [np](https://www.github.com/np), [camAtGitHub](https://github.com/camAtGitHub), [keyboardsage](https://github.com/keyboardsage)
[pfr-dev](https://www.github.com/pfr-dev), [jordantrizz](https://www.github.com/jordantrizz), [se7en-x230](https://www.github.com/se7en-x230), [mountaineerbr](https://www.github.com/mountaineerbr), [oligeo](https://www.github.com/oligeo), [biaocy](https://www.github.com/biaocy), [dmd](https://www.github.com/dmd), [goosegit11](https://www.github.com/goosegit11), [dilatedpupils](https://www.github.com/dilatedpupils), [direster](https://www.github.com/direster), [rxaviers](https://www.github.com/rxaviers), [Zeioth](https://www.github.com/Zeioth), [edshamis](https://www.github.com/edshamis), [nre-ableton](https://www.github.com/nre-ableton), [TobiasLaving](https://www.github.com/TobiasLaving), [RexAckermann](https://www.github.com/RexAckermann), [emirkmo](https://www.github.com/emirkmo), [np](https://www.github.com/np), [camAtGitHub](https://github.com/camAtGitHub), [keyboardsage](https://github.com/keyboardsage) [tomas223](https://github.com/tomas223)
## Contributing
Contributions are very welcome!

@ -125,6 +125,8 @@ request_to_image() {
# $1 should be the message(s) formatted with role and content
request_to_chat() {
local message="$1"
escaped_system_prompt=$(escape "$SYSTEM_PROMPT")
curl https://api.openai.com/v1/chat/completions \
-sS \
-H 'Content-Type: application/json' \
@ -132,7 +134,7 @@ request_to_chat() {
-d '{
"model": "'"$MODEL"'",
"messages": [
{"role": "system", "content": "'"$SYSTEM_PROMPT"'"},
{"role": "system", "content": "'"$escaped_system_prompt"'"},
'"$message"'
],
"max_tokens": '$MAX_TOKENS',
@ -319,7 +321,7 @@ while $running; do
if [ -z "$pipe_mode_prompt" ]; then
if [ $MULTI_LINE_PROMPT = true ]; then
echo -e "\nEnter a prompt: (Press Enter then Ctrl-D to send)"
cat > "${USER_INPUT_TEMP_FILE}"
cat >"${USER_INPUT_TEMP_FILE}"
input_from_temp_file=$(cat "${USER_INPUT_TEMP_FILE}")
prompt=$(escape "$input_from_temp_file")
else

Loading…
Cancel
Save