Class ChatSendMessageParams
-
- All Implemented Interfaces:
-
dev.case.api.core.Params
public final class ChatSendMessageParams implements Params
Sends a message and returns the complete response as a single JSON body. Blocks until the agent turn completes.
When to use this endpoint: Best for server-to-server integrations, background processing, or any context where you want the full response in one call without managing an SSE stream.
Alternatives:
POST /chat/:id/respond— streaming SSE with normalized events (recommended for custom chat UIs)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatSendMessageParams.BuilderA builder for ChatSendMessageParams.
public final classChatSendMessageParams.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 classChatSendMessageParams.Part
-
Method Summary
Modifier and Type Method Description final Optional<String>id()final Optional<List<ChatSendMessageParams.Part>>parts()Message content parts. final JsonField<List<ChatSendMessageParams.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 ChatSendMessageParams.BuildertoBuilder()final ChatSendMessageParams.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 ChatSendMessageParamsnone()final static ChatSendMessageParams.Builderbuilder()Returns a mutable builder for constructing an instance of ChatSendMessageParams. -
-
Method Detail
-
parts
final Optional<List<ChatSendMessageParams.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<ChatSendMessageParams.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 ChatSendMessageParams.Builder toBuilder()
-
_body
final ChatSendMessageParams.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 ChatSendMessageParams none()
-
builder
final static ChatSendMessageParams.Builder builder()
Returns a mutable builder for constructing an instance of ChatSendMessageParams.
-
-
-
-