Spaces:
Sleeping
Sleeping
Upload community_contributions/chrys/agents/base.py with huggingface_hub
Browse files
community_contributions/chrys/agents/base.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import logging
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class AgentBase:
|
| 5 |
+
"""Base for ARIA agents. Uses a named logger so UI can map to agent and color."""
|
| 6 |
+
name: str = "Agent"
|
| 7 |
+
logger_name: str = "aria.agent"
|
| 8 |
+
|
| 9 |
+
def __init__(self):
|
| 10 |
+
self._logger = logging.getLogger(self.logger_name)
|
| 11 |
+
|
| 12 |
+
def log(self, message: str) -> None:
|
| 13 |
+
self._logger.info(message)
|