Skip to main content

Une application RAG (Vectoriseur + Chat) créée pour la communauté de développeurs Python en Afrique.

Project description

🌍 Wooma African RAG Assistant

Un package Python complet développé par et pour la communauté africaine (Wooma CI), combinant un vectoriseur de documents et un assistant conversationnel (RAG) propulsé par l'IA.

Python Version License

🎯 Fonctionnalités

  • Vectoriseur de documents (GUI) : Interface graphique élégante pour extraire et vectoriser vos données (PDF, DOCX, XLSX, CSV, JSON, TXT) vers ChromaDB.
  • Chat Assistant (Web UI) : Interface web réactive avec streaming, historique, copie de code et coloration syntaxique.
  • Prêt pour l'intégration : Utilisable en ligne de commande (CLI) ou importable en tant que module dans vos propres scripts Python.
  • FastAPI Ready : Montez le chat directement comme une sous-application dans vos propres projets FastAPI.

🚀 Installation

Installez simplement le package via pip :

pip install wooma-rag-assistant

Note : Assurez-vous d'avoir Ollama installé et lancé en arrière-plan pour l'inférence des modèles LLM.

💻 Cas d'utilisation

1. En ligne de commande (CLI)

Une fois installé, vous disposez de deux commandes globales dans votre terminal :

Lancer le vectoriseur (Interface Graphique) :

rag-vectorizer

Lancer le serveur Web de Chat :

rag-chat --port 8080 --model llama3.2

2. Importation dans vos propres scripts Python

Vous pouvez réutiliser la logique d'extraction de documents dans vos projets Data Science :

from pathlib import Path
from rag_assistant import DocumentProcessor, CollectionManager

# Extraire le texte et les métadonnées d'un fichier
fichier = Path("mon_document_afrique.pdf")
processeur = DocumentProcessor()
lignes, metadonnees = processeur.process_file(fichier)

print(f"Extractions : {len(lignes)} fragments.")

# Voir vos collections ChromaDB
manager = CollectionManager()
print(manager.list_collections())

3. Intégration dans une API (FastAPI)

Vous développez déjà une API FastAPI ? Montez notre application RAG en une seule ligne de code :

import uvicorn
from fastapi import FastAPI
from rag_assistant import app as rag_app

mon_api = FastAPI()

@mon_api.get("/hello")
def hello():
    return {"message": "Bienvenue sur mon API"}

# Intégrer l'assistant RAG sous l'URL /rag
mon_api.mount("/rag", rag_app)

if __name__ == "__main__":
    uvicorn.run(mon_api, host="0.0.0.0", port=8000)

Rendez-vous ensuite sur http://localhost:8000/rag/ !

🤝 Contribution

Vos contributions (Pull Requests) sont les bienvenues pour améliorer cet outil !

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wooma_rag_assistant-0.1.3.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wooma_rag_assistant-0.1.3-py3-none-any.whl (30.2 kB view details)

Uploaded Python 3

File details

Details for the file wooma_rag_assistant-0.1.3.tar.gz.

File metadata

  • Download URL: wooma_rag_assistant-0.1.3.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for wooma_rag_assistant-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1d144b0c01de9ad7e142b1eddd0038b6d8e7da4061022b31c8430c06358e6c78
MD5 ea964493a4ed560171b86d2edbe85c3b
BLAKE2b-256 5ff876a2a53bae62dd7a74f79f8e84b6de0fa55c680b59e767ea427cc1bc9834

See more details on using hashes here.

File details

Details for the file wooma_rag_assistant-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for wooma_rag_assistant-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9d8660c5eea158327c086353eefa578389c2f55a083c8f5eecdc7ba728aabbe5
MD5 8bf2c0c3f2138ed4348b71caa229b319
BLAKE2b-256 b1bdc4ddb1437c830f5d71f7f2226e158e8598da0238773155887d81911295d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page