Class ChatRespondParams
-
- All Implemented Interfaces:
-
dev.case.api.core.Params
public final class ChatRespondParams implements Params
Streams a single assistant turn as normalized SSE events with stable turn, message, and part IDs. Emits events:
turn.started,turn.status,message.created,message.part.updated,message.completed,session.usage,turn.completed.When to use this endpoint: Recommended for building custom chat UIs that need real-time streaming progress. This is the primary streaming endpoint for new integrations.
Alternatives:
POST /chat/:id/message— synchronous, returns complete response as JSON (best for server-to-server)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatRespondParams.BuilderA builder for ChatRespondParams.
public final classChatRespondParams.BodyMessage payload following the AI SDK UIMessage format. The body is passed through 1:1 to the underlying OpenCode session. Currently only text parts are supported.
public final classChatRespondParams.Part
-
Method Summary
Modifier and Type Method Description final Optional<String>id()final Optional<List<ChatRespondParams.Part>>parts()Message content parts. final JsonField<List<ChatRespondParams.Part>>_parts()Returns the raw JSON value of parts. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final ChatRespondParams.BuildertoBuilder()final ChatRespondParams.Body_body()final String_pathParam(Integer index)Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static ChatRespondParamsnone()final static ChatRespondParams.Builderbuilder()Returns a mutable builder for constructing an instance of ChatRespondParams. -
-
Method Detail
-
parts
final Optional<List<ChatRespondParams.Part>> parts()
Message content parts. Currently only "text" type is supported. Additional types (e.g. file, image) may be added in future versions.
-
_parts
final JsonField<List<ChatRespondParams.Part>> _parts()
Returns the raw JSON value of parts.
Unlike parts, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final ChatRespondParams.Builder toBuilder()
-
_body
final ChatRespondParams.Body _body()
-
_pathParam
final String _pathParam(Integer index)
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
none
final static ChatRespondParams none()
-
builder
final static ChatRespondParams.Builder builder()
Returns a mutable builder for constructing an instance of ChatRespondParams.
-
-
-
-