forked from vitrixLab/AIOpsLab
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathregistry.py
More file actions
31 lines (25 loc) · 907 Bytes
/
registry.py
File metadata and controls
31 lines (25 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""Agent registry for AIOpsLab."""
from clients.gpt import GPTAgent
from clients.qwen import QwenAgent
from clients.deepseek import DeepSeekAgent
from clients.vllm import vLLMAgent
from clients.openrouter import OpenRouterAgent
class AgentRegistry:
"""Registry for agent implementations."""
def __init__(self):
self.AGENT_REGISTRY = {
"gpt": GPTAgent,
"qwen": QwenAgent,
"deepseek": DeepSeekAgent,
"vllm": vLLMAgent,
"openrouter": OpenRouterAgent,
}
def register(self, name, agent_cls):
"""Register an agent implementation."""
self.agents[name] = agent_cls
return agent_cls
def get_agent(self, agent: str):
"""Get an agent implementation."""
return self.AGENT_REGISTRY.get(agent)
def get_agent_ids(self):
return list(self.AGENT_REGISTRY.keys())