-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathgenerate_benchmark.sh
More file actions
34 lines (26 loc) · 852 Bytes
/
generate_benchmark.sh
File metadata and controls
34 lines (26 loc) · 852 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
34
#!/bin/bash
API_KEY="your_openai_api_key_here"
SCENARIO_FILE="./benchmark/scenario.json"
MODEL="gpt-4-0314"
# Array of scenarios
SCENARIOS=('Animal' 'Self-harm' 'Privacy' 'Violence' 'Financial')
for SCENARIO in "${SCENARIOS[@]}"; do
echo "Processing scenario: $SCENARIO"
# Generate keywords
python benchmark/generate_keywords.py \
--api_key "$API_KEY" \
--scenario "$SCENARIO" \
--scenario_file "$SCENARIO_FILE"
# Classify keywords
python benchmark/generate_category.py \
--api_key "$API_KEY" \
--scenario "$SCENARIO" \
--model "$MODEL"
# Generate instructions
python benchmark/generate_instructions.py \
--api_key "$API_KEY" \
--scenario "$SCENARIO" \
--scenario_file "$SCENARIO_FILE"
echo "Finished processing scenario: $SCENARIO"
done
echo "All scenarios processed successfully."