mirror of
https://github.com/danog/captionbot-clients.git
synced 2024-11-30 04:18:58 +01:00
Fixed rating
This commit is contained in:
parent
e0ede9452a
commit
730e39858a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
bash/token
|
bash/token
|
||||||
|
*~
|
||||||
|
@ -56,7 +56,7 @@ if [ "$2" != "norate" ];then
|
|||||||
[ $s -gt 0 -a $s -le 5 ] 2>/dev/null || echo "You didn't input a valid number. Please try again!"
|
[ $s -gt 0 -a $s -le 5 ] 2>/dev/null || echo "You didn't input a valid number. Please try again!"
|
||||||
done
|
done
|
||||||
|
|
||||||
result=$(curl -s https://www.captionbot.ai/api/message -H "Content-Type: application/json; charset=utf-8" -X POST -d '{"conversationId":'$conversationId', waterMark:'$watermark', "userMessage":"'$s'"}' | sed 's/\\"/"/g;s/^"//g;s/"$//g' | ./JSON.sh -s)
|
result=$(curl -s https://www.captionbot.ai/api/message -H 'Accept: */*'-H 'Referer: https://www.captionbot.ai/' -H 'Content-Type: application/json; charset=utf-8' -X POST -d '{"conversationId":'$conversationId', waterMark:'$watermark', "userMessage":"'$s'"}' | sed 's/\\"/"/g;s/^"//g;s/"$//g' | ./JSON.sh -s)
|
||||||
message=$(echo "$result" | sed '/\[".*Message"\]/!d;s/\[".*Message"\]\t//g;s/^"//g;s/"$//g')
|
message=$(echo "$result" | sed '/\[".*Message"\]/!d;s/\[".*Message"\]\t//g;s/^"//g;s/"$//g')
|
||||||
|
|
||||||
[ "$message" = "$s" ] && echo "Thanks for leaving your feedback!" || echo "$message"
|
[ "$message" = "$s" ] && echo "Thanks for leaving your feedback!" || echo "$message"
|
||||||
|
Loading…
Reference in New Issue
Block a user