Skip to content

thepiloter/omnigenai_toolkit

 
 

Repository files navigation

OmniGenAI Toolkit

OmniGenAI Toolkit is a lightweight, rule-based AI chatbot written entirely in Python. It requires no external model downloads, making it perfect for educational use, rapid prototyping, or extending into more advanced AI tools.


🔧 Features

  • ✅ Regex-based pattern matching chatbot
  • ✅ Customizable responses
  • ✅ Fallback logic with keyword detection
  • ✅ 100% Python Standard Library — no downloads or external dependencies
  • ✅ Unit tested and modular structure
  • ✅ Docker support for isolated execution
  • ✅ No API keys or external services required

📦 Installation

Option 1: Local Installation

Clone and install the package locally:

git clone https://github.com/gopalakrishnanarjun/omnigenai_toolkit.git
cd omnigenai-toolkit
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install .

Option 2: Docker Installation (Recommended)

Run the chatbot in a completely isolated Docker container:

git clone https://github.com/gopalakrishnanarjun/omnigenai_toolkit.git
cd omnigenai-toolkit

# Build and run with Docker
docker build -t omnigenai-toolkit .
docker run -it omnigenai-toolkit

# Or use Docker Compose
docker-compose up --build

🚀 Usage

Local Usage

To run the example chatbot:

python examples/run_chat.py

Docker Usage

The Docker container automatically runs the chatbot when started:

# Interactive mode
docker run -it omnigenai-toolkit

# Or with Docker Compose
docker-compose up

Running Tests

# Local testing
python -m pytest tests/

# Docker testing
docker run omnigenai-toolkit python -m pytest tests/

💬 Example Session

You: hello
Bot: Hi there!

You: what is your name
Bot: I'm SmartAI, your simple Python chatbot.

You: what time is it?
Bot: The current time is 14:32:08.

You: bye
Bot: Goodbye! 👋

🗂 Project Structure

omnigenai-toolkit/
├── docs/                   # Documentation (optional)
├── examples/               # Example usage scripts
│   └── run_chat.py
├── omnigenai_toolkit/      # Main module code
│   └── chatbot.py
├── tests/                  # Unit tests
│   └── test_chatbot.py
├── .dockerignore           # Docker ignore file
├── .gitignore
├── docker-compose.yml      # Docker Compose configuration
├── Dockerfile              # Docker configuration
├── LICENSE
├── README.md
└── setup.py

🧠 How It Works

  • Uses re to match user input against predefined patterns.
  • Returns randomized responses for variety.
  • If no match is found, falls back to simple keyword checks like "time" or "weather".

🐳 Docker Benefits

The containerized version provides:

  • Complete isolation: No dependency conflicts with your local environment
  • Consistent execution: Same behavior across different operating systems
  • Security: Runs with non-root user permissions
  • Easy deployment: Single command to build and run
  • No external dependencies: Completely self-contained with no API requirements

🌱 Future Enhancements

🔹 Short-Term

  • Store patterns and responses in external JSON/YAML
  • Add chatbot personality profiles (e.g., sarcastic, friendly)

🔹 Medium-Term

  • Add memory/context support for ongoing conversations
  • Create web interface using Flask or FastAPI

🔹 Long-Term

  • Integrate voice input/output
  • Use cloud APIs (optional) for GPT-style responses
  • Add multilingual support and translation layer

🤝 Contributing

  1. Fork the repo
  2. Create a new feature branch
  3. Push your changes and open a Pull Request

All contributions are welcome — from typo fixes to new features!


📄 License

This project is licensed under the MIT License — free to use, modify, and distribute.


✨ Author

Built with ❤️ by Gopalakrishnan Arjunan (https://github.com/gopalakrishnanarjun)


🙌 Acknowledgments

Inspired by early rule-based AI bots like ELIZA and built for offline-friendly simplicity.

About

A Python package for Generative AI applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.0%
  • Dockerfile 6.0%