blob: f727d4237c1ae1a8de81da6f0a852b6dfa71b7c3 (
plain) (
blame)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#!/bin/bash
# Test script for the Dynamic Model Selector
source "./model_selector.sh"
echo "=== Dynamic Model Selector Test ==="
echo
# Test 1: Show available models
echo "Test 1: Available Models"
echo "Available models:"
get_available_models | nl
echo
# Test 2: Task type classification
echo "Test 2: Task Type Classification"
echo "Coding task: $(classify_task_type "How can I implement a binary search algorithm?" "puzzle")"
echo "Reasoning task: $(classify_task_type "Why do you think this approach might fail?" "socratic")"
echo "Creative task: $(classify_task_type "Write a story about a robot" "exploration")"
echo
# Test 3: Model selection for coding task
echo "Test 3: Model Selection for Coding Task"
selected_model=$(select_model_for_task "How can I implement a sorting algorithm?" "puzzle" "")
echo "Selected model: $selected_model"
if [ -n "$selected_model" ]; then
echo "Model info:"
get_model_info "$selected_model"
fi
echo
# Test 4: Model selection for reasoning task
echo "Test 4: Model Selection for Reasoning Task"
selected_model=$(select_model_for_task "What are the implications of this decision?" "socratic" "")
echo "Selected model: $selected_model"
if [ -n "$selected_model" ]; then
echo "Model info:"
get_model_info "$selected_model"
fi
echo
# Test 5: Model selection with preferred models
echo "Test 5: Model Selection with Preferred Models"
preferred="llama3:8b-instruct-q4_K_M phi3:3.8b-mini-4k-instruct-q4_K_M"
selected_model=$(select_model_for_task "How can we improve this code?" "puzzle" "$preferred")
echo "Selected model: $selected_model"
echo
echo "=== Test Complete ==="
|