Skip to content

Add configurable LLM model support

Latest

Choose a tag to compare

@navidshad navidshad released this 31 Jul 11:04

🎉 New Release: Configurable LLM Model Support

✨ What's New

This release adds the ability to configure which LLM model to use for generating PR descriptions, making the action more flexible and cost-effective.

�� Key Features

  • Configurable LLM Models: Choose from GPT-4, GPT-3.5, GPT-4o, and other OpenAI models
  • Cost Optimization: Use more cost-effective models like GPT-4o-mini or GPT-3.5-turbo
  • Backward Compatibility: All existing functionality preserved
  • Updated Default: Now uses GPT-4o-mini by default for better cost/performance balance

📝 Usage Examples

# Use default model (gpt-4o-mini)
- uses: navidshad/pull-request-description@v1.1.0
  with:
    api_key: ${{ secrets.OPENAI_API_KEY }}
    prompt: "Generate a PR description"

# Specify a different model
- uses: navidshad/pull-request-description@v1.1.0
  with:
    api_key: ${{ secrets.OPENAI_API_KEY }}
    prompt: "Generate a PR description"
    model: "gpt-4o"

# Use cost-effective model
- uses: navidshad/pull-request-description@v1.1.0
  with:
    api_key: ${{ secrets.OPENAI_API_KEY }}
    prompt: "Generate a PR description"
    model: "gpt-3.5-turbo"

🔧 Technical Changes

  • Added model input parameter to action.yml
  • Updated index.js to use dynamic model selection
  • Enhanced README with comprehensive documentation
  • Maintained consistent coding style with double quotes

�� Available Models

  • gpt-4o-mini (default) - Fast and cost-effective
  • gpt-4o - Latest and most capable
  • gpt-4-turbo - High performance
  • gpt-3.5-turbo - Cost-effective option
  • gpt-4 - Standard GPT-4 model

🔄 Migration Guide

No migration required! Existing workflows will continue to work with the new default model (GPT-4o-mini). If you want to use a specific model, simply add the model parameter to your workflow.

🙏 Acknowledgments

This is an improved fork of the original pull-request-description action by @alvarocperez.


Full Changelog: Compare v1.0.1...v1.1.0