Skip to content

The-No-Hands-company/VersaAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

VersaAI πŸ€–

License: MIT Python 3.8+ Status: Production

Production-Grade Multi-Model AI Platform for Developers

VersaAI is an intelligent code assistant that combines multiple AI models (local and cloud) to provide powerful coding assistance through a CLI, code editor integration, and Python API. Built for privacy, performance, and flexibility.


✨ Features

πŸ€– Multi-Model AI - Use DeepSeek, StarCoder, CodeLlama, Qwen, GPT-4, Claude
🧠 Intelligent Routing - Automatically selects best model for each task
πŸ’¬ CLI Code Assistant - Interactive terminal-based AI pair programmer
πŸ”Œ Editor Integration - Real-time AI assistance in NLPL Code Editor
πŸ“š RAG System - Understands your codebase with semantic search
πŸ”’ Privacy-First - Local models keep your code 100% private
⚑ High Performance - Fast responses with optimized model loading
πŸ’° Cost-Effective - Free local models + optional cloud APIs


πŸš€ Quick Start

Option 1: Full Stack (CLI + GUI + Editor Integration)

./launch.sh
# Select: 1. Full Stack (Backend + Flutter UI)

Option 2: CLI Code Assistant Only

versaai
# Or: python3 versaai_cli.py

Option 3: Flutter Desktop UI

cd ui && ./scripts/run_with_backend.sh

Option 4: Code Editor Integration

python3 start_editor_bridge.py  # Backend server
# Then open NLPL Code Editor - AI features auto-connect

Choose Your Model:

  • Local Models (Free, Private) - DeepSeek, StarCoder, CodeLlama, WizardCoder
  • OpenAI API - GPT-4, GPT-3.5-Turbo (requires API key)
  • Anthropic API - Claude 3.5, Claude 3 (requires API key)

πŸ“– See INTEGRATION_COMPLETE.md for full documentation

πŸ’¬ Chat Mode:
> Explain async/await in Python

πŸ“ Code Mode:
> /code Write a function to validate emails

πŸ”§ File Mode:
> /file mycode.py  # Analyze specific file

That's it! You're now coding with AI assistance.


πŸ“– Documentation

πŸ“˜ Complete User Guide - Everything you need to know
πŸš€ Quick Start Guide - Get started in 5 minutes
πŸ“š User Manual - In-depth documentation
πŸŽ“ Tutorials - Step-by-step guides
πŸ”Œ Editor Integration - Integrate with your editor
πŸ”€ Multi-Model Setup - Use multiple models
⚑ Quick Reference - Command cheat sheet


🎯 Use Cases

Use Case Description
Code Completion Real-time suggestions as you type
Code Explanation Understand unfamiliar code
Refactoring Improve code quality and structure
Debugging Find and fix bugs with AI help
Test Generation Auto-generate unit tests
Documentation Add comments and docstrings
Code Review Get AI feedback on your code
Learning Ask questions about programming concepts

πŸ”§ Installation Options

Option 1: Basic (CLI Only)

pip install -e .
versaai

Option 2: Full (CLI + Editor + All Features)

pip install -e ".[all]"

# Download models
versaai  # Interactive model downloader

# Start editor backend
python -m versaai.code_editor_bridge.server

Option 3: Docker

docker pull versaai/versaai:latest
docker run -it versaai/versaai

🧠 Available Models

Local Models (Free, Private)

Model Size RAM Best For
DeepSeek Coder 1.3B 834MB 2GB Fast completions
DeepSeek Coder 6.7B 4.1GB 8GB Balanced quality
StarCoder2 7B 4.3GB 8GB Code generation
CodeLlama 7B 4.0GB 8GB General coding
Qwen2.5-Coder 7B 4.4GB 8GB Latest, high quality

Cloud Models (Paid, Powerful)

Model Provider Best For
GPT-4 OpenAI Complex tasks, architecture
GPT-3.5 Turbo OpenAI Fast, cost-effective
Claude 3 Sonnet Anthropic Explanations, docs
Claude 3 Opus Anthropic Highest quality

πŸ”Œ Code Editor Integration

VersaAI integrates with the NLPL Code Editor for real-time AI assistance.

Setup

# Terminal 1: Start VersaAI backend
cd VersaAI
python -m versaai.code_editor_bridge.server

# Terminal 2: Start Code Editor
cd code_editor
npm install
npm run dev

Features in Editor

  • AI Chat Panel - Ctrl+Alt+V
  • Code Completions - Automatic suggestions
  • Explain Code - Right-click β†’ Explain
  • Refactor - Right-click β†’ Refactor
  • Generate Code - Right-click β†’ Generate
  • Debug - Right-click β†’ Debug

See Editor Integration Guide for details.


πŸŽ“ Examples

Example 1: Code Explanation

$ versaai

> Explain this code:
> def fibonacci(n):
>     return n if n <= 1 else fibonacci(n-1) + fibonacci(n-2)

AI: This is a recursive implementation of the Fibonacci sequence.
    It returns n for base cases (0 or 1), otherwise recursively
    calculates fib(n-1) + fib(n-2). Note: This has exponential
    time complexity O(2^n). Consider using memoization or iteration
    for better performance.

Example 2: Code Generation

> /code Write a function to validate email addresses with regex

AI: Here's a robust email validation function:

    import re
    
    def validate_email(email: str) -> bool:
        """
        Validates email address format.
        
        Args:
            email: Email address to validate
            
        Returns:
            True if valid, False otherwise
        """
        pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
        return bool(re.match(pattern, email))

Example 3: Multi-Model Mode

$ versaai --multi-model

> Complete: def quicksort(arr):
AI: [Using deepseek-1.3b for fast completion]
    def quicksort(arr):
        if len(arr) <= 1:
            return arr
        pivot = arr[len(arr) // 2]
        left = [x for x in arr if x < pivot]
        middle = [x for x in arr if x == pivot]
        right = [x for x in arr if x > pivot]
        return quicksort(left) + middle + quicksort(right)

> Design a scalable microservices architecture
AI: [Routing to GPT-4 for complex architecture]
    Here's a comprehensive microservices architecture...

πŸ› Troubleshooting

Issue: "Model not found"

# Download model
versaai  # Select "Download new model"

# Or manual download
cd ~/.versaai/models
wget <model-url>

Issue: "Out of memory"

# Use smaller model
versaai --model deepseek-1.3b

# Or reduce context window
export VERSAAI_MAX_TOKENS=512

Issue: "Can't connect to editor backend"

# Check if backend is running
ps aux | grep code_editor_bridge

# Start it
python -m versaai.code_editor_bridge.server

See Troubleshooting Guide for more.


πŸ”’ Privacy & Security

Local Models

  • βœ… 100% offline, no data leaves your machine
  • βœ… No telemetry, tracking, or analytics
  • βœ… Your code stays private

Cloud APIs (Optional)

  • ⚠️ Data sent to OpenAI/Anthropic servers
  • ⚠️ Subject to provider's privacy policy
  • βœ… Can be disabled with VERSAAI_LOCAL_ONLY=true

πŸ“Š Benchmarks

Task DeepSeek 1.3B DeepSeek 6.7B GPT-4
Code Completion 2s 5s 3s
Code Generation 3s 8s 5s
Explanation 4s 10s 6s
Quality (1-10) 7/10 8.5/10 9.5/10
Cost Free Free ~$0.03/request

🀝 Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

Development Setup

# Clone
git clone https://github.com/The-No-hands-Company/VersaAI.git
cd VersaAI

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black versaai/
isort versaai/

πŸ“„ License

MIT License - See LICENSE for details.


πŸ™ Acknowledgments

Built with:

  • llama.cpp - Fast local model inference
  • OpenAI & Anthropic - Cloud API support
  • Hugging Face - Model hosting
  • langchain - RAG framework

πŸ“ž Support

  • πŸ“– Documentation: See guides above
  • πŸ› Bug Reports: Open an issue on GitHub
  • πŸ’‘ Feature Requests: Open an issue with [Feature] tag
  • πŸ’¬ Questions: Open a discussion on GitHub

Made with ❀️ by The No-hands Company

Start coding smarter with AI today! πŸš€

pip install -e .
versaai

About

VersaAI is a **production-grade, multi-model AI platform** for developers that provides: - CLI Code Assistant - Code Editor Integration - Multi-Model AI Routing - RAG System for codebase understanding - Privacy-first local models + optional cloud APIs

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages