A Python application that generates code using AI models (Ollama or Google Gemini) based on user prompts.
- Support for both Ollama and Google Gemini AI models
- Interactive command-line interface
- Code generation with detailed explanations
- Model availability checking
- Error handling and validation
- Python 3.6+
- Required packages (see requirements.txt)
- Clone the repository:
git clone https://github.com/Cluster3824/AI_Code_Generator.git
cd AI_Code_Generator- Install dependencies:
pip install -r requirements.txt- Run the application:
python Code_generator.py-
Choose your AI model:
- Enter
0for Ollama - Enter
1for Google Gemini
- Enter
-
Follow the prompts to configure your chosen model:
- For Ollama: Enter the model name
- For Gemini: Enter your API key and model name
-
Start generating code by describing your requirements
-
Type
exitto quit the application
- Install Ollama on your system
- Pull the desired model (e.g.,
ollama pull llama2)
- Get your API key from Google AI Studio
- Supported models: gemini-1.5-flash, gemini-pro, etc.
This project is licensed under the MIT License - see the LICENSE file for details.