refactor: architektur-optimierungen (systemd, jq, httpx, commit-hook)

This commit is contained in:
Hitonabi
2026-07-06 20:38:18 +02:00
parent 3fba487963
commit c92f238d2d
5 changed files with 30 additions and 4 deletions
+2 -2
View File
@@ -65,8 +65,8 @@ case "$ROLE" in
*) SYS="${WORKER_SYS:-$BUILD_SYS}" ;;
esac
RESP="$(jq -n --arg m "$MODEL" --arg s "$SYS" --arg u "$TASK" --argjson t "$MAXTOK" --argjson temp "$TEMP" \
'{model:$m, temperature:$temp, max_tokens:$t, messages:[{role:"system",content:$s},{role:"user",content:$u}]}' \
RESP="$(printf '%s' "$TASK" | jq -Rs . | jq -n --arg m "$MODEL" --arg s "$SYS" --argjson t "$MAXTOK" --argjson temp "$TEMP" \
'{model:$m, temperature:$temp, max_tokens:$t, messages:[{role:"system",content:$s},{role:"user",content:input}]}' \
| curl -s --max-time 300 "$ENDPOINT" -H 'Content-Type: application/json' -d @- 2>/dev/null)"
OUT="$(printf '%s' "$RESP" | jq -r '.choices[0].message.content // empty' 2>/dev/null)"