-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathai_chat
More file actions
executable file
·33 lines (29 loc) · 744 Bytes
/
ai_chat
File metadata and controls
executable file
·33 lines (29 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# Parse command-line arguments
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-t|--type)
type="$2"
shift # past argument
shift # past value
;;
-f|--filename)
filename="$2"
shift # past argument
shift # past value
;;
-q|--question)
question="$2"
shift # past argument
shift # past value
;;
*) # unknown option
echo "Unknown option: $1"
exit 1
;;
esac
done
# Call the Python script with the provided arguments
python3 "$SCRIPT_DIR/src/ai_chat.py" -t "$type" -f "$filename" -q "$question"