-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathqa
executable file
·23 lines (19 loc) · 825 Bytes
/
qa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# "quick question audio": ask chatgpt for something with a quick answer, using audio input to dictate the prompt
# compare https://two-wrongs.com/q
if [[ "$1" == "-h" || "$1" == "-?" || "$1" == "--help" ]]; then
cat <<EOF
Usage: $(basename $0) [chatgpt arguments] [prompt]
This script asks chatgpt for something with a quick answer, using audio input to dictate the prompt.
Terminate the dictation with any key press.
Additional arguments can be given for chatgpt, e.g. -fm file, -4, -
Full usage of chatgpt for more arguments:
EOF
chatgpt -h
exit 1
fi
echo "Please dictate prompt for chatgpt and then press any key."
if [ "$#" -gt 0 ]; then
echo "Additional arguments will be given to chatgpt: $*"
fi
exec chatgpt -s "Answer in as few words as possible. Use a brief style with short replies." -ua "$@"