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