from abc import ABC, abstractmethod from typing import List, Dict, Any class BaseAgent(ABC): """ Classe de base pour les agents. """ def __init__(self, nom: str, llm: Any): self.nom = nom self.llm = llm self.historique: List[Dict[str, Any]] = [] def ajouter_historique(self, action: str, input_data: Any, output_data: Any): self.historique.append({ "action": action, "input": input_data, "output": output_data }) @abstractmethod def executer(self, *args, **kwargs) -> Any: pass