mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 13:52:43 +08:00
* update * revert the main branch lock file * regenerate the poetry.lock * move poetry into another dependency group * fix infer.sh and gpt code --------- Co-authored-by: yufansong <yufan@risingwave-labs.com>
47 lines
847 B
Python
47 lines
847 B
Python
from dotenv import load_dotenv
|
|
|
|
from opendevin.controller.agent import Agent
|
|
|
|
from .micro.agent import MicroAgent
|
|
from .micro.registry import all_microagents
|
|
|
|
load_dotenv()
|
|
|
|
|
|
from . import ( # noqa: E402
|
|
browsing_agent,
|
|
codeact_agent,
|
|
codeact_swe_agent,
|
|
delegator_agent,
|
|
dummy_agent,
|
|
gptswarm_agent,
|
|
monologue_agent,
|
|
planner_agent,
|
|
)
|
|
|
|
__all__ = [
|
|
'monologue_agent',
|
|
'codeact_agent',
|
|
'gptswarm_agent',
|
|
'codeact_swe_agent',
|
|
'planner_agent',
|
|
'delegator_agent',
|
|
'dummy_agent',
|
|
'browsing_agent',
|
|
]
|
|
|
|
for agent in all_microagents.values():
|
|
name = agent['name']
|
|
prompt = agent['prompt']
|
|
|
|
anon_class = type(
|
|
name,
|
|
(MicroAgent,),
|
|
{
|
|
'prompt': prompt,
|
|
'agent_definition': agent,
|
|
},
|
|
)
|
|
|
|
Agent.register(name, anon_class)
|