Title: Think

Content: AI is thinking.
This commit is contained in:
ilguappo 2024-08-07 03:34:15 -07:00
parent cd5ee84da7
commit 78b72c3e36

View File

@ -59,10 +59,13 @@ if $(hasFlag -r --reset); then
kill "${SPINNER}" kill "${SPINNER}"
fi fi
spin "AI is thinking." &
SPINNER="$!"
curl -s "https://infer.x64.world/chat" \ curl -s "https://infer.x64.world/chat" \
-X POST \ -X POST \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "${message}" | jq -r '.content | gsub("\""; "")' >"${TMP_FILE}" -d "${message}" | jq -r '.content | gsub("\""; "")' >"${TMP_FILE}"
kill "${SPINNER}"
# trunk-ignore(shellcheck/SC2181) # trunk-ignore(shellcheck/SC2181)
if [[ 0 -ne $? ]]; then if [[ 0 -ne $? ]]; then
@ -70,6 +73,7 @@ if [[ 0 -ne $? ]]; then
exit 1 exit 1
fi fi
git commit -e -m "$(cat "${TMP_FILE}")" && rm "${TMP_FILE}" git commit -e -m "$(cat "${TMP_FILE}")" && rm "${TMP_FILE}"
popd >/dev/null popd >/dev/null