We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7cdc3d commit 0d08303Copy full SHA for 0d08303
dbgpt/agent/core/base_agent.py
@@ -47,6 +47,7 @@ class ConversableAgent(Role, Agent):
47
stream_out: bool = True
48
# 确认当前Agent是否需要进行参考资源展示
49
show_reference: bool = False
50
+ name_prefix: str = None
51
52
executor: Executor = Field(
53
default_factory=lambda: ThreadPoolExecutor(max_workers=1),
@@ -58,6 +59,13 @@ def __init__(self, **kwargs):
58
59
Role.__init__(self, **kwargs)
60
Agent.__init__(self)
61
62
+ @property
63
+ def name(self) -> str:
64
+ """Return the name of the agent."""
65
+ if self.name_prefix is not None:
66
+ return f"{self.current_profile.get_name()}[{self.name_prefix}]"
67
+ return self.current_profile.get_name()
68
+
69
def check_available(self) -> None:
70
"""Check if the agent is available.
71
0 commit comments