wronai/
├── README.md
├── requirements.txt
├── setup.py
├── docker-compose.yml
├── .env.example
├──
├── src/wronai/
│ ├── __init__.py
│ ├── core/
│ │ ├── __init__.py
│ │ ├── llm_manager.py # Zarządzanie modelami
│ │ ├── rag_engine.py # RAG pipeline
│ │ └── code_generator.py # Generowanie kodu
│ │
│ ├── models/
│ │ ├── __init__.py
│ │ ├── embeddings.py # Modele embeddingów
│ │ └── quantized/ # Kwantyzowane modele
│ │
│ ├── data/
│ │ ├── knowledge_base/ # Baza wiedzy
│ │ ├── vectors/ # Baza wektorowa
│ │ └── cache/ # Cache
│ │
│ ├── api/
│ │ ├── __init__.py
│ │ ├── main.py # FastAPI app
│ │ ├── endpoints/
│ │ └── middleware/
│ │
│ ├── agents/
│ │ ├── __init__.py
│ │ ├── python_agent.py # Agent Python
│ │ ├── bash_agent.py # Agent Bash
│ │ └── rag_agent.py # Agent RAG
│ │
│ └── utils/
│ ├── __init__.py
│ ├── monitoring.py # Monitoring wydajności
│ ├── optimization.py # Optymalizacje
│ └── security.py # Bezpieczeństwo
│
├── tests/
│ ├── unit/
│ ├── integration/
│ └── performance/
│
├── scripts/
│ ├── install_models.sh # Instalacja modeli
│ ├── setup_rpi.sh # Setup RPi
│ └── benchmark.py # Testy wydajności
│
├── docs/
│ ├── installation.md
│ ├── configuration.md
│ ├── api_reference.md
│ └── examples/
│
├── examples/
│ ├── basic_rag.py
│ ├── code_generation.py
│ └── edge_deployment.py
│
└── deployment/
├── docker/
│ ├── Dockerfile.rpi
│ └── Dockerfile.dev
├── k8s/
└── ansible/
# Klonowanie repo
git clone https://github.com/wronai/www.git
cd wronai
# Setup środowiska
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Instalacja Ollama (ARM64)
curl -fsSL https://ollama.ai/install.sh | sh# Llama 3.2 1B (kwantyzowany)
ollama pull llama3.2:1b-instruct-q4_0
# Lub TinyLlama
ollama pull tinyllama:1.1b-chat-v1.0-q4_0# Start WronAI
python -m wronai.api.main
# Lub z Docker
docker-compose up -d- Chunking: Inteligentny podział dokumentów
- Embeddings: SentenceTransformers (all-MiniLM-L6-v2)
- Vector DB: ChromaDB z kompresją
- Retrieval: Hybrydowy (semantic + keyword)
- Python: Generowanie skryptów, funkcji, klas
- Bash: Automatyzacja, scripting systemowy
- Templates: Gotowe wzorce kodu
- Validation: Sprawdzanie składni
- Model Caching: Inteligentne cache'owanie
- Memory Management: Optymalizacja RAM
- CPU Scheduling: Priorytetyzacja zadań
- Quantization: Q4_0, Q2_K support
- Czas odpowiedzi modelu
- Zużycie pamięci RAM
- Temperatura CPU
- Przepustowość I/O
- Grafana + Prometheus
- Lokalny web dashboard
- CLI monitoring tools
# Model settings
WRONAI_MODEL_NAME=llama3.2:1b-instruct-q4_0
WRONAI_MAX_TOKENS=512
WRONAI_TEMPERATURE=0.7
# RAG settings
WRONAI_CHUNK_SIZE=256
WRONAI_CHUNK_OVERLAP=50
WRONAI_TOP_K=5
# Performance
WRONAI_CACHE_SIZE=100MB
WRONAI_MAX_CONCURRENT=2from wronai import WronAI
ai = WronAI()
ai.load_documents("./docs")
response = ai.query(
"Jak zoptymalizować Python na RPi?",
context_limit=3
)
print(response)code = ai.generate_code(
"Napisz funkcję do monitorowania temperatury CPU",
language="python",
style="modern"
)
print(code)script = ai.generate_bash(
"Skrypt backupu z rotacją logów",
features=["compression", "cleanup", "logging"]
)
print(script)- Sandboxing: Bezpieczne wykonywanie kodu
- Input Validation: Sanityzacja wejść
- Rate Limiting: Ochrona przed nadużyciem
- Access Control: Kontrola dostępu
| Model | RAM Usage | Inference Time | Tokens/sec |
|---|---|---|---|
| Llama3.2-1B-Q4 | ~800MB | ~2.5s | ~15 |
| TinyLlama-Q4 | ~600MB | ~1.8s | ~20 |
| Phi-3.5-mini-Q2 | ~1.2GB | ~3.2s | ~12 |
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
Apache License - zobacz LICENSE file.
WronAI - Inteligentny asystent AI dla edge computing 🦅