mirror of
https://github.com/Ladebeze66/llm_ticket3.git
synced 2025-12-16 15:07:49 +01:00
17 lines
620 B
Python
17 lines
620 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, "image_sorter")
|
|
|
|
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
|