Files
dinlo 4655401fd3 Initial commit
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 18:45:38 +08:00

11 lines
333 B
Bash

#!/bin/bash
# Wrapper script for translator model that filters out thinking tags
if [ -z "$1" ]; then
echo "Usage: ./translate.sh \"text to translate\""
exit 1
fi
# Run ollama and filter output
ollama run translator "$1" 2>/dev/null | sed 's/<think>.*<\/think>//g' | sed '/^$/d' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'