about summary refs log tree commit diff stats
path: root/bash/talk-to-computer/test_model_selector.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bash/talk-to-computer/test_model_selector.sh')
-rwxr-xr-xbash/talk-to-computer/test_model_selector.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/bash/talk-to-computer/test_model_selector.sh b/bash/talk-to-computer/test_model_selector.sh
new file mode 100755
index 0000000..f727d42
--- /dev/null
+++ b/bash/talk-to-computer/test_model_selector.sh
@@ -0,0 +1,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 ==="