Lab Information

The xfusion AI Development Team is building intelligent developer-assistance tools that enhance productivity and communication across engineering workflows. Continuing this mission, you are tasked to develop a Python-based AI Commit Generator that analyzes code change descriptions and produces clean, Conventional Commit–style messages — ensuring consistency and clarity in version control histories.

Your task is to build a function that takes a summary of code changes and generates a formal Git commit message adhering to the Conventional Commit standard (: ). The file /root/openaiproject/commit_generator.py is ready.

Initialize the OpenAI client using api_key & base_url credentials provided under root/.bash_profile.

Define a function named generate_commit(changes: str) -> str.