Skip to content

Cluster3824/AI_Code_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Code Generator

A Python application that generates code using AI models (Ollama or Google Gemini) based on user prompts.

Features

  • 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

Requirements

  • Python 3.6+
  • Required packages (see requirements.txt)

Installation

  1. Clone the repository:
git clone https://github.com/Cluster3824/AI_Code_Generator.git
cd AI_Code_Generator
  1. Install dependencies:
pip install -r requirements.txt

Usage

  1. Run the application:
python Code_generator.py
  1. Choose your AI model:

    • Enter 0 for Ollama
    • Enter 1 for Google Gemini
  2. Follow the prompts to configure your chosen model:

    • For Ollama: Enter the model name
    • For Gemini: Enter your API key and model name
  3. Start generating code by describing your requirements

  4. Type exit to quit the application

Configuration

Ollama Setup

  • Install Ollama on your system
  • Pull the desired model (e.g., ollama pull llama2)

Gemini Setup

  • Get your API key from Google AI Studio
  • Supported models: gemini-1.5-flash, gemini-pro, etc.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Python application that generates code using AI models (Ollama or Google Gemini) based on user prompts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages