askrobots / askrobots_commitgen
Public
AI-Powered Git Commit Message Generator
danq9
Create commit message adjusting OpenAI initialization and error handling.
c0d2e25
2 years, 6 months ago
History
settings.py · 540 bytes · 18 lines
| 1 | import os |
| 2 | from dotenv import load_dotenv |
| 3 | |
| 4 | # Load environment variables from a .env file |
| 5 | load_dotenv() |
| 6 | |
| 7 | # OpenAI API Key |
| 8 | OPENAI_API_KEY = os.getenv('OPENAI_API_KEY') |
| 9 | |
| 10 | # OpenAI Model to be used for generating commit messages |
| 11 | OPENAI_MODEL = "gpt-4" # Replace with the correct model name if different |
| 12 | |
| 13 | # The maximum length of the commit message |
| 14 | MAX_COMMIT_MESSAGE_LENGTH = 200 |
| 15 | |
| 16 | # Any other global settings can be added here |
| 17 | # For example, the language for the commit messages, if you plan to support multiple languages |
| 18 | DEFAULT_LANGUAGE = 'en' |