Interface MessageServiceAsync
-
- All Implemented Interfaces:
public interface MessageServiceAsync
-
-
Method Summary
Modifier and Type Method Description abstract BatchServiceAsyncbatches()abstract CompletableFuture<BetaMessage>create(BetaMessageCreateParams params, RequestOptions requestOptions)Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation. abstract CompletableFuture<BetaMessage>create(BetaMessageCreateParams params)Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation. abstract AsyncStreamResponse<BetaRawMessageStreamEvent>createStreaming(BetaMessageCreateParams params, RequestOptions requestOptions)Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation. abstract AsyncStreamResponse<BetaRawMessageStreamEvent>createStreaming(BetaMessageCreateParams params)Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation. abstract CompletableFuture<BetaMessageTokensCount>countTokens(BetaMessageCountTokensParams params, RequestOptions requestOptions)Count the number of tokens in a Message. abstract CompletableFuture<BetaMessageTokensCount>countTokens(BetaMessageCountTokensParams params)Count the number of tokens in a Message. -
-
Method Detail
-
batches
abstract BatchServiceAsync batches()
-
create
abstract CompletableFuture<BetaMessage> create(BetaMessageCreateParams params, RequestOptions requestOptions)
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.
The Messages API can be used for either single queries or stateless multi-turn conversations.
-
create
abstract CompletableFuture<BetaMessage> create(BetaMessageCreateParams params)
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.
The Messages API can be used for either single queries or stateless multi-turn conversations.
-
createStreaming
abstract AsyncStreamResponse<BetaRawMessageStreamEvent> createStreaming(BetaMessageCreateParams params, RequestOptions requestOptions)
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.
The Messages API can be used for either single queries or stateless multi-turn conversations.
-
createStreaming
abstract AsyncStreamResponse<BetaRawMessageStreamEvent> createStreaming(BetaMessageCreateParams params)
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.
The Messages API can be used for either single queries or stateless multi-turn conversations.
-
countTokens
abstract CompletableFuture<BetaMessageTokensCount> countTokens(BetaMessageCountTokensParams params, RequestOptions requestOptions)
Count the number of tokens in a Message.
The Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.
-
countTokens
abstract CompletableFuture<BetaMessageTokensCount> countTokens(BetaMessageCountTokensParams params)
Count the number of tokens in a Message.
The Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.
-
-
-
-