Interface MessageService
-
- All Implemented Interfaces:
public interface MessageService
-
-
Method Summary
Modifier and Type Method Description abstract BatchServicebatches()abstract 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. abstract BetaMessagecreate(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 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. abstract StreamResponse<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 BetaMessageTokensCountcountTokens(BetaMessageCountTokensParams params, RequestOptions requestOptions)Count the number of tokens in a Message. abstract BetaMessageTokensCountcountTokens(BetaMessageCountTokensParams params)Count the number of tokens in a Message. -
-
Method Detail
-
batches
abstract BatchService batches()
-
create
abstract 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 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 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.
-
createStreaming
abstract StreamResponse<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 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 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.
-
-
-
-