类 MsgHub.Builder
java.lang.Object
io.agentscope.core.pipeline.MsgHub.Builder
- 封闭类:
MsgHub
Builder for MsgHub.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明announcement(Msg... announcement) Set announcement messages to broadcast when entering the hub.announcement(List<Msg> announcement) Set announcement messages to broadcast when entering the hub.build()Build the MsgHub instance.enableAutoBroadcast(boolean enable) Enable or disable automatic broadcasting.Set the name of this MsgHub.participants(AgentBase... participants) Set the participants for this MsgHub.participants(List<AgentBase> participants) Set the participants for this MsgHub.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
name
Set the name of this MsgHub. If not provided, a random UUID will be generated.- 参数:
name- Hub name- 返回:
- This builder
-
participants
Set the participants for this MsgHub.- 参数:
participants- Agents participating in this hub (varargs)- 返回:
- This builder
-
participants
Set the participants for this MsgHub.- 参数:
participants- List of agents participating in this hub- 返回:
- This builder
-
announcement
Set announcement messages to broadcast when entering the hub.- 参数:
announcement- Messages to broadcast on entry (varargs)- 返回:
- This builder
-
announcement
Set announcement messages to broadcast when entering the hub.- 参数:
announcement- List of messages to broadcast on entry- 返回:
- This builder
-
enableAutoBroadcast
Enable or disable automatic broadcasting. Default is true.- 参数:
enable- True to enable auto-broadcast, false to disable- 返回:
- This builder
-
build
Build the MsgHub instance.- 返回:
- New MsgHub instance
- 抛出:
IllegalArgumentException- if participants list is empty
-