From e6747c4a978cfcef2c1ab3ce63fbf348c7f94632 Mon Sep 17 00:00:00 2001 From: Ayo Date: Fri, 26 Sep 2025 12:32:05 +0200 Subject: [PATCH] feat(ai): add translation AI --- ai-translate.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 ai-translate.sh diff --git a/ai-translate.sh b/ai-translate.sh new file mode 100755 index 0000000..6ea8205 --- /dev/null +++ b/ai-translate.sh @@ -0,0 +1,18 @@ +#! /bin/bash + +# Load config +. ${HOME}/ayo.conf + +host=$ollama_remote_host +model="llama3.1:8b" + +TEMP=$(mktemp) +vim $TEMP + +PROMPT="Translate everything that follows into English. Only give me the translated text in English." + +OUTPUT=$(mktemp) + +OLLAMA_HOST=$host ollama run $model "$PROMPT -- " < $TEMP > $OUTPUT + +typora $OUTPUT