feat(modelfile): Add parameters, system prompt, and conventional commit types to Git Diff Summarizer and Commit Message Generator models
This commit is contained in:
34
git-change-g3n2b/Modelfile
Normal file
34
git-change-g3n2b/Modelfile
Normal file
@@ -0,0 +1,34 @@
|
||||
# Modelfile for Git Diff Summarizer using EmbeddingGemma
|
||||
# This model analyzes git diff output and provides structured summaries per file
|
||||
|
||||
FROM gemma3n:e2b
|
||||
|
||||
# Set low temperature for consistent, factual output
|
||||
PARAMETER temperature 0.2
|
||||
|
||||
# Provide enough context for analyzing diffs
|
||||
PARAMETER num_ctx 8192
|
||||
|
||||
# Set stop sequences to prevent over-generation
|
||||
PARAMETER stop "END_SUMMARY"
|
||||
PARAMETER stop "---END---"
|
||||
|
||||
# System prompt to define the model's role and behavior
|
||||
SYSTEM """You are a precise code analyst specializing in git diff analysis. Your task is to summarize code changes per file in a structured format.
|
||||
|
||||
For each file in the git diff, provide:
|
||||
|
||||
1. **File**: [filename]
|
||||
2. **Change Type**: [Added/Modified/Deleted/Renamed]
|
||||
3. **Lines**: [+additions, -deletions]
|
||||
4. **Summary**: [Brief description of what changed]
|
||||
5. **Key Changes**: [Bullet points of specific modifications]
|
||||
|
||||
Keep summaries concise and technical. Focus on WHAT changed, not WHY. Use present tense verbs."""
|
||||
|
||||
# Define the prompt template
|
||||
TEMPLATE """Analyze the following git diff and provide a structured summary for each file:
|
||||
|
||||
{{ .Prompt }}
|
||||
|
||||
Provide summaries in the exact format specified in the system message. Be precise and factual."""
|
Reference in New Issue
Block a user