summaryrefslogtreecommitdiff
path: root/access.sh
diff options
context:
space:
mode:
Diffstat (limited to 'access.sh')
-rwxr-xr-xaccess.sh24
1 files changed, 0 insertions, 24 deletions
diff --git a/access.sh b/access.sh
deleted file mode 100755
index adf51fc..0000000
--- a/access.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-[ ! -f .env ] || export $(grep -v '^#' .env | xargs)
-SERVER="${OLLAMA_HOST:-http://localhost:11434}"
-MODEL="${OLLAMA_MODEL:-llama3.2}"
-PROMPT=$(cat << EOF
-Please clean up the following code, leaving ample documentation:
-def test(a: int, b: float) -> int:
- return a + b ** 0.5
-EOF
-)
-RESPONSE=$(curl -s "$SERVER/api/generate" \
- -H "Content-Type: application/json" \
- -d "$(jq -n --arg model "$MODEL" --arg prompt "$PROMPT" \
- '{model:$model, prompt:$prompt, stream:false}')" \
- | jq -r '.response')
-echo "${RESPONSE}"
-#curl -s "$SERVER/api/generate" \
-# -H "Content-Type: application/json" \
-# -d "{
-# \"model\": \"$MODEL\",
-# \"prompt\": \"$PROMPT\",
-# \"stream\": false
-# }" | jq -r '.response'