mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 00:23:17 +00:00
17 lines
478 B
Python
17 lines
478 B
Python
from application.agents.classic_agent import ClassicAgent
|
|
from application.agents.react_agent import ReActAgent
|
|
|
|
|
|
class AgentCreator:
|
|
agents = {
|
|
"classic": ClassicAgent,
|
|
"react": ReActAgent,
|
|
}
|
|
|
|
@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)
|