Open Onigam opened 5 months ago
You can have it from the marketplace
You just need to add this github action
name: Code Review
permissions:
contents: read
pull-requests: write
on:
pull_request:
pull_request_review_comment:
types: [created]
concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref ||
github.sha }}-${{ github.workflow }}-${{ github.event_name ==
'pull_request_review_comment' && 'pr_comment' || 'pr' }}
cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }}
jobs:
review:
runs-on: ubuntu-latest
steps:
- name: AI-based PR Reviewer & Summarizer with Mistral 8x7B Chat Capabilities
uses: Onigam/ai-mistral-pr-reviewer@mistralai-support-marketplace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
with:
debug: false
review_simple_changes: false
review_comment_lgtm: false
openai_base_url: "https://api.mistral.ai/v1"
openai_light_model: "mistral-tiny"
openai_heavy_model: "mistral-small"
Instead of using OpenAI api I want to use Mistral AI api using the 8x7B model.
The only blocker with this code is the
presence_penalty: 1
parameter in the index.js file, we just need to remove this line to avoid OpenAI error 422 due to this Extra inputs not supported and permitted from Mistral APII created a fork with this fix here
Now I'm using Mistral instead of OpenAI than is a lot cheaper