Class MessageServiceAsyncImpl
-
- All Implemented Interfaces:
-
com.anthropic.services.async.beta.MessageServiceAsync
public final class MessageServiceAsyncImpl implements MessageServiceAsync
-
-
Method Summary
Modifier and Type Method Description BatchServiceAsyncbatches()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. 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. CompletableFuture<BetaMessageTokensCount>countTokens(BetaMessageCountTokensParams params, RequestOptions requestOptions)Count the number of tokens in a Message. -
-
Method Detail
-
batches
BatchServiceAsync batches()
-
create
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.
-
createStreaming
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.
-
countTokens
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.
-
-
-
-