feat(ai): add translation AI

This commit is contained in:
Ayo Ayco 2025-09-26 12:32:05 +02:00
parent 2d91d7e87e
commit e6747c4a97

18
ai-translate.sh Executable file
View file

@ -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