mirror of
https://github.com/Ladebeze66/llm_ticket3.git
synced 2025-12-15 20:17:14 +01:00
17 lines
604 B
Python
17 lines
604 B
Python
from .base_agent import BaseAgent
|
|
from typing import Any
|
|
|
|
class AgentImageSorter(BaseAgent):
|
|
"""
|
|
Agent pour trier les images en fonction de leur contenu.
|
|
"""
|
|
def __init__(self, llm):
|
|
super().__init__("AgentImageSorter", llm)
|
|
|
|
def executer(self, image_description: str) -> bool:
|
|
prompt = f"L'image suivante est-elle pertinente pour BRG_Lab ? Description : {image_description}"
|
|
response = self.llm.interroger(prompt)
|
|
result = "oui" in response.lower()
|
|
self.ajouter_historique("tri_image", image_description, result)
|
|
return result
|