omega-tool-model
First-party Omega tool-use model source, serving harnesses, and verification records
Brought by drakestapleton
omega-tool-model / pack / demo
| 1 | #!/bin/sh |
| 2 | # The only authorized operation in this example is reading the bundled fixture. |
| 3 | set -eu |
| 4 | cd -P "$(dirname "$0")" |
| 5 | request=$(./model --demo) |
| 6 | case "$request" in |
| 7 | '{"tool":"read_file","path":"jobs/item76666.om"}') ;; |
| 8 | *) printf 'Unrecognized model request: %s\n' "$request" >&2; exit 1 ;; |
| 9 | esac |
| 10 | printf 'Model requested %s\n' "$request" |
| 11 | source_text=$(cat jobs/item76666.om) |
| 12 | reply=$(printf '%s\n' 'Task: Fix the error in this file and confirm its goal.' \ |
| 13 | 'File: jobs/item76666.om' \ |
| 14 | 'Goal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.' \ |
| 15 | 'State: read' 'Source:' "$source_text" 'Tool result: Read succeeded.' 'Answer:' | ./model) |
| 16 | printf 'Model replied %s\n' "$reply" |
| 17 | test "$reply" = '{"tool":"omega_check","path":"jobs/item76666.om"}' |