diff --git a/README.md b/README.md index f0536e4..a6ce30c 100644 --- a/README.md +++ b/README.md @@ -298,6 +298,7 @@ For GitHub, you can use the official LGTM AI GitHub Action: with: ai-api-key: ${{ secrets.AI_API_KEY }} git-api-key: ${{ secrets.GITHUB_TOKEN }} + model: 'gpt-5' pr-number: ${{ github.event.issue.number }} ``` diff --git a/action.yml b/action.yml index b6262cf..106b506 100644 --- a/action.yml +++ b/action.yml @@ -22,7 +22,6 @@ inputs: model: description: "AI model to use (e.g. gpt-4o, claude-3-5-sonnet-latest, gemini-2.0-flash)" required: false - default: "gpt-5" version: description: "LGTM AI version (latest, v0.7.2, etc.)" @@ -61,10 +60,13 @@ runs: --pr-url "https://github.com/${{ github.repository }}/pull/${{ inputs.pr-number }}" --git-api-key "${{ inputs.git-api-key }}" --ai-api-key "${{ inputs.ai-api-key }}" - --model "${{ inputs.model }}" ) # Optional flags + if [ -n "${{ inputs.model }}" ]; then + ARGS+=(--model "${{ inputs.model }}") + fi + if [ "${{ inputs.publish }}" = "true" ]; then ARGS+=(--publish) fi