|
14 | 14 | from agents.matmaster_agent.MrDice_agent.agent import init_MrDice_agent |
15 | 15 | from agents.matmaster_agent.apex_agent.agent import init_apex_agent |
16 | 16 | from agents.matmaster_agent.base_agents.io_agent import HandleFileUploadLlmAgent |
17 | | -from agents.matmaster_agent.callback import matmaster_prepare_state, matmaster_check_transfer, matmaster_set_lang, \ |
18 | | - matmaster_check_job_status |
| 17 | +from agents.matmaster_agent.callback import matmaster_prepare_state, matmaster_set_lang, matmaster_check_job_status |
19 | 18 | from agents.matmaster_agent.chembrain_agent.agent import init_chembrain_agent |
20 | 19 | from agents.matmaster_agent.constant import MATMASTER_AGENT_NAME, ModelRole |
21 | 20 | from agents.matmaster_agent.document_parser_agent.agent import init_document_parser_agent |
22 | 21 | from agents.matmaster_agent.llm_config import MatMasterLlmConfig |
| 22 | +from agents.matmaster_agent.model import MatMasterTargetAgentEnum |
23 | 23 | from agents.matmaster_agent.organic_reaction_agent.agent import init_organic_reaction_agent |
24 | 24 | from agents.matmaster_agent.perovskite_agent.agent import init_perovskite_agent |
25 | 25 | from agents.matmaster_agent.piloteye_electro_agent.agent import init_piloteye_electro_agent |
26 | | -from agents.matmaster_agent.prompt import AgentDescription, AgentInstruction, GlobalInstruction |
| 26 | +from agents.matmaster_agent.prompt import AgentDescription, AgentInstruction, GlobalInstruction, \ |
| 27 | + MatMasterCheckTransferPrompt |
| 28 | +from agents.matmaster_agent.public.callback import check_transfer |
27 | 29 | from agents.matmaster_agent.ssebrain_agent.agent import init_ssebrain_agent |
28 | 30 | from agents.matmaster_agent.structure_generate_agent.agent import init_structure_generate_agent |
29 | 31 | from agents.matmaster_agent.superconductor_agent.agent import init_superconductor_agent |
@@ -82,8 +84,9 @@ def __init__(self, llm_config): |
82 | 84 | instruction=AgentInstruction, |
83 | 85 | description=AgentDescription, |
84 | 86 | before_agent_callback=[matmaster_prepare_state, matmaster_set_lang], |
85 | | - after_model_callback=[matmaster_check_job_status, matmaster_check_transfer], |
86 | | - ) |
| 87 | + after_model_callback=[matmaster_check_job_status, |
| 88 | + check_transfer(prompt=MatMasterCheckTransferPrompt, |
| 89 | + target_agent_enum=MatMasterTargetAgentEnum)]) |
87 | 90 |
|
88 | 91 | @override |
89 | 92 | async def _run_async_impl(self, ctx: InvocationContext) -> AsyncGenerator[Event, None]: |
|
0 commit comments