Class MessageServiceImpl
-
- All Implemented Interfaces:
-
com.anthropic.services.blocking.beta.MessageService
public final class MessageServiceImpl implements MessageService
-
-
Method Summary
Modifier and Type Method Description BatchServicebatches()BetaMessagecreate(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. StreamResponse<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. BetaMessageTokensCountcountTokens(BetaMessageCountTokensParams params, RequestOptions requestOptions)Count the number of tokens in a Message. -
-
Method Detail
-
batches
BatchService batches()
-
create
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
StreamResponse<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
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.
-
-
-
-