mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
feat: logging stacks
This commit is contained in:
14
application/agents/agent_creator.py
Normal file
14
application/agents/agent_creator.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user