Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
working on ollama.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
robert2411 committed Oct 12, 2024
1 parent 1efc6dd commit 5a28b34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ollama.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ jobs:
for file in ${{ steps.get-modified-files.outputs.all_changed_files }}; do
file_content=$(cat $file)
echo "Review $file with content \r\n $file_content"
modified_file_review=$(curl -s http://127.0.0.1:11434/api/generate -d '{"model": "codegemma", "prompt": "Review the following file:\n\n```\n$file_content\n```", "stream": false}' | jq -r '.response')
prompt="Review the following file:\n\n```\$file_content\n```"
echo "${prompt}"
modified_file_review=$(curl -s http://127.0.0.1:11434/api/generate -d '{"model": "codegemma", "prompt": "${prompt}", "stream": false}' | jq -r '.response')
gh pr comment ${{ github.event.pull_request.number }} --body "Ollama Code Review for \`$file\`:\r\n\r\n$modified_file_review"
done
shell: bash

0 comments on commit 5a28b34

Please sign in to comment.