diff --git a/dbgpt/agent/core/plan/awel/agent_operator.py b/dbgpt/agent/core/plan/awel/agent_operator.py index 650c92cf0..8a68d307a 100644 --- a/dbgpt/agent/core/plan/awel/agent_operator.py +++ b/dbgpt/agent/core/plan/awel/agent_operator.py @@ -22,7 +22,6 @@ # TODO: Don't dependent on MixinLLMOperator from dbgpt.model.operators.llm_operator import MixinLLMOperator -from dbgpt.serve.prompt.api.endpoints import get_service from dbgpt.util.i18n_utils import _ from .... import ActionOutput @@ -291,6 +290,7 @@ async def get_agent( prompt_template = None if self.awel_agent.agent_prompt: + from dbgpt.serve.prompt.api.endpoints import get_service prompt_service = get_service() prompt_template = prompt_service.get_template( self.awel_agent.agent_prompt.code diff --git a/dbgpt/agent/core/plan/awel/agent_operator_resource.py b/dbgpt/agent/core/plan/awel/agent_operator_resource.py index 226274f8c..bbdbbfa68 100644 --- a/dbgpt/agent/core/plan/awel/agent_operator_resource.py +++ b/dbgpt/agent/core/plan/awel/agent_operator_resource.py @@ -12,8 +12,6 @@ ResourceCategory, register_resource, ) -from dbgpt.serve.prompt.api.endpoints import get_service - from ....resource.base import AgentResource, ResourceType from ....resource.manage import get_resource_manager from ....util.llm.llm import LLMConfig, LLMStrategyType @@ -21,6 +19,7 @@ def _agent_resource_prompt_values() -> List[OptionValue]: + from dbgpt.serve.prompt.api.endpoints import get_service prompt_service = get_service() prompts = prompt_service.get_target_prompt() return [