Interface BetaResponsesClientEvent.Visitor
-
- All Implemented Interfaces:
public interface BetaResponsesClientEvent.Visitor<T extends Object>An interface that defines how to map each variant of BetaResponsesClientEvent to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitResponseCreate(BetaResponsesClientEvent.ResponseCreate responseCreate)Client event for creating a response over a persistent WebSocket connection. abstract TvisitResponseInject(BetaResponseInjectEvent responseInject)Injects input items into an active response over a WebSocket connection. Tunknown(JsonValue json)Maps an unknown variant of BetaResponsesClientEvent to a value of type T. -
-
Method Detail
-
visitResponseCreate
abstract T visitResponseCreate(BetaResponsesClientEvent.ResponseCreate responseCreate)
Client event for creating a response over a persistent WebSocket connection. This payload uses the same top-level fields as
POST /v1/responses.Notes:
streamis implicit over WebSocket and should not be sent.backgroundis not supported over WebSocket.
-
visitResponseInject
abstract T visitResponseInject(BetaResponseInjectEvent responseInject)
Injects input items into an active response over a WebSocket connection. The items are validated and committed atomically. Currently, the server accepts client-owned tool outputs that resume a waiting agent.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BetaResponsesClientEvent to a value of type T.
An instance of BetaResponsesClientEvent can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-