AI-Powered Git Commit Message Generator

0 downloads

askrobots_commitgen/settings.py
Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/askrobots_commitgen.git
HTTPS
https://gitstable.com/git/askrobots/askrobots_commitgen.git
SSH
ssh://git@gitstable.com:2222/askrobots/askrobots_commitgen.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

danq9 Create commit message adjusting OpenAI initialization and error handling. c0d2e25 2 years, 6 months ago History
settings.py · 540 bytes · 18 lines
1import os
2from dotenv import load_dotenv
3
4# Load environment variables from a .env file
5load_dotenv()
6
7# OpenAI API Key
8OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')
9
10# OpenAI Model to be used for generating commit messages
11OPENAI_MODEL = "gpt-4" # Replace with the correct model name if different
12
13# The maximum length of the commit message
14MAX_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
18DEFAULT_LANGUAGE = 'en'