llm_ticket3/agents/agent_json_analyser.py
2025-04-06 15:02:20 +02:00

15 lines
578 B
Python

from .base_agent import BaseAgent
from typing import Dict, Any
class AgentJsonAnalyser(BaseAgent):
"""
Agent pour analyser les fichiers JSON et extraire les informations pertinentes.
"""
def __init__(self, llm):
super().__init__("AgentJsonAnalyser", llm)
def executer(self, ticket_json: Dict) -> str:
prompt = f"Analyse ce ticket JSON et identifie les éléments importants : {ticket_json}"
response = self.llm.interroger(prompt)
self.ajouter_historique("analyse_json", ticket_json, response)
return response