Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Aug 5, 2023
1 parent 42d1372 commit 27728ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions humanscript
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ data=$(echo '{

# Send request and stream chunked responses back
curl --silent --show-error "${HUMANSCRIPT_API}/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HUMANSCRIPT_API_KEY" \
-d "${data}" | \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${HUMANSCRIPT_API_KEY}" \
--data "${data}" | \
sed 's/^data: //' | # Strip chunk header
sed '/^\[DONE\]/d' | # Strip end chunk
tee >(jq --join-output --unbuffered '.error // ""' >&2 || cat) | # Log API errors to stderr (without breaking the pipe)
Expand Down

0 comments on commit 27728ba

Please sign in to comment.