mirror of
https://github.com/Ladebeze66/llm_ticket3.git
synced 2025-12-15 20:06:51 +01:00
23 lines
605 B
Python
23 lines
605 B
Python
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
|