Package io.agentscope.core.studio
Class StudioUserAgent.Builder
java.lang.Object
io.agentscope.core.studio.StudioUserAgent.Builder
- Enclosing class:
- StudioUserAgent
Builder for UserProxyAgent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the UserProxyAgent.description(String description) Sets the agent description (optional).inputTimeout(Duration inputTimeout) Sets the timeout for waiting for user input from Studio (default: 30 minutes).Sets the agent name (default: "User").studioClient(StudioClient studioClient) Sets the Studio HTTP client for requesting user input.webSocketClient(StudioWebSocketClient webSocketClient) Sets the Studio WebSocket client for receiving user input.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the agent name (default: "User").- Parameters:
name- Agent name- Returns:
- This builder
-
description
Sets the agent description (optional).- Parameters:
description- Agent description- Returns:
- This builder
-
studioClient
Sets the Studio HTTP client for requesting user input.Both studioClient and webSocketClient must be set to enable Studio integration.
- Parameters:
studioClient- Studio HTTP client- Returns:
- This builder
-
webSocketClient
Sets the Studio WebSocket client for receiving user input.Both studioClient and webSocketClient must be set to enable Studio integration.
- Parameters:
webSocketClient- Studio WebSocket client- Returns:
- This builder
-
inputTimeout
Sets the timeout for waiting for user input from Studio (default: 30 minutes).- Parameters:
inputTimeout- Timeout duration- Returns:
- This builder
-
build
Builds the UserProxyAgent.- Returns:
- A new UserProxyAgent instance
-