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 π¦