Interface ChatServiceAsync
-
- All Implemented Interfaces:
public interface ChatServiceAsync
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceChatServiceAsync.WithRawResponseA view of ChatServiceAsync that provides access to raw HTTP responses for each method.
-
Method Summary
-
-
Method Detail
-
withRawResponse
abstract ChatServiceAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract ChatServiceAsync withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
create
CompletableFuture<ChatCreateResponse> create()
Creates a persistent OpenCode chat session in a Modal sandbox. Session state is retained and can be resumed across requests.
-
create
abstract CompletableFuture<ChatCreateResponse> create(ChatCreateParams params, RequestOptions requestOptions)
-
create
CompletableFuture<ChatCreateResponse> create(ChatCreateParams params)
-
create
CompletableFuture<ChatCreateResponse> create(RequestOptions requestOptions)
-
delete
CompletableFuture<ChatDeleteResponse> delete(String id)
Snapshots and terminates the active sandbox (if any), then marks the chat as ended.
-
delete
CompletableFuture<ChatDeleteResponse> delete(String id, ChatDeleteParams params, RequestOptions requestOptions)
-
delete
CompletableFuture<ChatDeleteResponse> delete(String id, ChatDeleteParams params)
-
delete
abstract CompletableFuture<ChatDeleteResponse> delete(ChatDeleteParams params, RequestOptions requestOptions)
-
delete
CompletableFuture<ChatDeleteResponse> delete(ChatDeleteParams params)
-
delete
CompletableFuture<ChatDeleteResponse> delete(String id, RequestOptions requestOptions)
-
cancel
CompletableFuture<ChatCancelResponse> cancel(String id)
Aborts the active OpenCode generation for this chat session.
-
cancel
CompletableFuture<ChatCancelResponse> cancel(String id, ChatCancelParams params, RequestOptions requestOptions)
-
cancel
CompletableFuture<ChatCancelResponse> cancel(String id, ChatCancelParams params)
-
cancel
abstract CompletableFuture<ChatCancelResponse> cancel(ChatCancelParams params, RequestOptions requestOptions)
-
cancel
CompletableFuture<ChatCancelResponse> cancel(ChatCancelParams params)
-
cancel
CompletableFuture<ChatCancelResponse> cancel(String id, RequestOptions requestOptions)
-
replyToQuestion
CompletableFuture<Void> replyToQuestion(String requestId, ChatReplyToQuestionParams params)
Answers a pending OpenCode question for the chat session bound to this agent chat.
-
replyToQuestion
CompletableFuture<Void> replyToQuestion(String requestId, ChatReplyToQuestionParams params, RequestOptions requestOptions)
-
replyToQuestion
CompletableFuture<Void> replyToQuestion(ChatReplyToQuestionParams params)
-
replyToQuestion
abstract CompletableFuture<Void> replyToQuestion(ChatReplyToQuestionParams params, RequestOptions requestOptions)
-
respondStreaming
AsyncStreamResponse<String> respondStreaming(String id, ChatRespondParams params)
Streams a single assistant turn as normalized state events with stable turn, message, and part ids. Emits session.usage before turn.completed when token data is available.
-
respondStreaming
AsyncStreamResponse<String> respondStreaming(String id, ChatRespondParams params, RequestOptions requestOptions)
-
respondStreaming
AsyncStreamResponse<String> respondStreaming(ChatRespondParams params)
-
respondStreaming
abstract AsyncStreamResponse<String> respondStreaming(ChatRespondParams params, RequestOptions requestOptions)
-
sendMessage
CompletableFuture<Void> sendMessage(String id, ChatSendMessageParams params)
Proxies a message to the OpenCode session bound to this chat.
-
sendMessage
CompletableFuture<Void> sendMessage(String id, ChatSendMessageParams params, RequestOptions requestOptions)
-
sendMessage
CompletableFuture<Void> sendMessage(ChatSendMessageParams params)
-
sendMessage
abstract CompletableFuture<Void> sendMessage(ChatSendMessageParams params, RequestOptions requestOptions)
-
streamStreaming
AsyncStreamResponse<String> streamStreaming(String id)
Relays OpenCode SSE events for this chat. Supports replay from buffered events using Last-Event-ID.
-
streamStreaming
AsyncStreamResponse<String> streamStreaming(String id, ChatStreamParams params, RequestOptions requestOptions)
-
streamStreaming
AsyncStreamResponse<String> streamStreaming(String id, ChatStreamParams params)
-
streamStreaming
abstract AsyncStreamResponse<String> streamStreaming(ChatStreamParams params, RequestOptions requestOptions)
-
streamStreaming
AsyncStreamResponse<String> streamStreaming(ChatStreamParams params)
-
streamStreaming
AsyncStreamResponse<String> streamStreaming(String id, RequestOptions requestOptions)
-
uiStreamStreaming
AsyncStreamResponse<String> uiStreamStreaming(String id, ChatUiStreamParams params)
Streams a single assistant turn as AI SDK UIMessageChunk SSE events for direct client rendering.
-
uiStreamStreaming
AsyncStreamResponse<String> uiStreamStreaming(String id, ChatUiStreamParams params, RequestOptions requestOptions)
-
uiStreamStreaming
AsyncStreamResponse<String> uiStreamStreaming(ChatUiStreamParams params)
-
uiStreamStreaming
abstract AsyncStreamResponse<String> uiStreamStreaming(ChatUiStreamParams params, RequestOptions requestOptions)
-
-
-
-