Skip to content

feat: add summarize code review prompt for Claude 3.7 Sonnet

What does this merge request do and why?

How to set up and validate locally

  • Make the curl request to use the new prompt version:
curl -X 'POST' \
  'http://localhost:5052/v1/prompts/summarize_review' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "inputs": {"draft_notes_content": "Question: Have you considered using a more efficient algorithm for the sorting function? The current implementation might have performance issues with large datasets.\n\nRecommendation: Add more comprehensive error handling in the parseConfig function to prevent crashes in production.\n\nQuestion: Why did you choose to implement this as a separate module instead of extending the existing one?\n\nRecommendation: The variable naming could be improved for better readability. Consider using more descriptive names than x, y, and z.\n\nRecommendation: Add unit tests for the new functionality to ensure it works as expected."},
  "prompt_version": "2.0.0",
  "stream": false
}'
  • Fetch the logs to make sure it's using the new prompt version:
gdk tail -f gitlab-ai-gateway | grep "Request to LLM"

Screenshots

Screenshot_2025-02-28_at_10.31.20_AM

Screenshot_2025-02-28_at_10.31.03_AM

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Kinshuk Singh

Merge request reports

Loading