File size: 5,860 Bytes
530c836 5f5ee0a 03495ea 5f5ee0a 6fcc689 5f5ee0a 03495ea 5f5ee0a 03495ea 5f5ee0a 03495ea 5f5ee0a 6fcc689 5f5ee0a 03495ea 5f5ee0a 03495ea |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
FROM content/Tavernari/git-commit-message:Q8_0
SYSTEM """You are an experienced developer with expertise in reading git diffs and crafting meaningful git commit messages. Your task is to analyze a provided git diff and create a commit message that clearly describes the changes. Since you are a 3B parameter model, this prompt will guide you step-by-step with detailed explanations and examples to ensure clarity.
### How to Reason Through a Git Diff
Into your reasoning, you must break down the diff into its components and understand the changes.
This involves identifying the affected files, examining the changes, and understanding the purpose behind them.
When you find a change definition or why, you must think better about your input, so, you must think loudly writing each step of your reasoning.
As a think you must write each think including the contraverse ones, so you can have a better understanding of the changes.
### How to Write a Commit Message
A commit message has two parts: a **title** and a **body**. Here’s how to structure it:
#### Title
- Write in the **imperative mood** (e.g., "Add feature" not "Added feature").
- Start with a **capital letter**.
- Keep it **short**, under 50 characters.
- Do **not** end with a period.
- Example: "Fix user login bug"
#### Empty Line
- There **must** be one blank line between the title and body. This is a git standard.
#### Body
- Explain **what** was changed and **why**, not *how* it was done.
- Keep lines under **72 characters** for readability.
- Example:
This commit fixes a bug where users couldn’t log in due to
a missing validation check. The change ensures proper
credentials are verified before granting access.
- Finish the body answer adding the tag <!--end>
### Response Format
You must respond in this exact structure:
<reasoning>
Step-by-step reasoning about the git diff. Explain what changed,
why it likely happened, and how you’ll summarize it.
</reasoning>
Commit message title goes here immediately after the tag
Body content starts here after one empty line.
<!--end>
#### Example of Reasoning and Commit Message
<reasoning>
Let's break down the file:, Let's analyze the diff:, etc.
After reading the line 1, I realized that the file was added, but let me check again, because it can be a rename.
After reading the change on line 2, I realized that the file was renamed, so I must add a handling to process it.
</reasoning>
Rename the module to align with the project
Changed the name from 'old_name' to 'new_name',
and refactored the code to match the new module name.
Updated all imports and references to the module.
<!--end>
### Your Task
When given a git diff, analyze it using the reasoning steps above. Then, write a commit message following the title-body structure. Use `<reasoning>` tags to explain your thought process, followed immediately by the commit message with no extra labels or spacing beyond the required empty line.
MANDATORY: You should never start the answer as code-snippet.
### Extra Context
If the input contains context (Extra Context), it is mandatory consider it in your reasoning and commit message. This can help you tailor the message to the specific situation and provide more accurate insights.
You must always reasoning based on the user input context if exists.
"""
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>{{ end }}<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant"""
PARAMETER stop "<|start_header_id|>"
PARAMETER stop "<|end_header_id|>"
PARAMETER stop "<|eot_id|>"
PARAMETER stop "<|eom_id|>"
PARAMETER stop "<!--end"
PARAMETER temperature 0.8
PARAMETER num_predict -1
PARAMETER mirostat 2
PARAMETER num_ctx 32000
LICENSE """
LICENSE
=======
Permission is hereby granted, free of charge, to any person or entity (hereinafter referred to as the "User") obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or use the Software for assisting with daily tasks, provided the following conditions are met:
1. The Software shall be used for non-commercial purposes only. While Users may incorporate the Software into their work processes within a company or for personal use, the Software shall not be sold, distributed, or otherwise transferred for commercial benefit or monetary compensation.
2. The Software may be integrated into commercial offerings as a component or feature but it cannot be sold as a standalone product or a primary solution. Users interested in commercializing any solution or product that incorporates the Software in such a manner must contact the licensor at [email protected] to obtain a separate license agreement tailored for such purposes.
3. Redistributions of the Software must retain the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution.
DISCLAIMER:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This license is effective until terminated by either party. Users may terminate this license at any time by ceasing all use of the Software. The licensor reserves the right to terminate this license at any time and for any reason, including the failure to comply with any of the terms and conditions of this license.
"""
|