mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
15 lines
395 B
Python
15 lines
395 B
Python
from application.agents.classic_agent import ClassicAgent
|
|
|
|
|
|
class AgentCreator:
|
|
agents = {
|
|
"classic": ClassicAgent,
|
|
}
|
|
|
|
@classmethod
|
|
def create_agent(cls, type, *args, **kwargs):
|
|
agent_class = cls.agents.get(type.lower())
|
|
if not agent_class:
|
|
raise ValueError(f"No agent class found for type {type}")
|
|
return agent_class(*args, **kwargs)
|