Interface MessageServiceAsync
-
- All Implemented Interfaces:
public interface MessageServiceAsync
-
-
Method Summary
Modifier and Type Method Description abstract BatchServiceAsyncbatches()abstract CompletableFuture<Message>create(MessageCreateParams 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<Message>create(MessageCreateParams 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<RawMessageStreamEvent>createStreaming(MessageCreateParams 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<RawMessageStreamEvent>createStreaming(MessageCreateParams 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<MessageTokensCount>countTokens(MessageCountTokensParams params, RequestOptions requestOptions)Count the number of tokens in a Message. abstract CompletableFuture<MessageTokensCount>countTokens(MessageCountTokensParams params)Count the number of tokens in a Message. -
-
Method Detail
-
batches
abstract BatchServiceAsync batches()
-
create
abstract CompletableFuture<Message> create(MessageCreateParams 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<Message> create(MessageCreateParams 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<RawMessageStreamEvent> createStreaming(MessageCreateParams 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<RawMessageStreamEvent> createStreaming(MessageCreateParams 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<MessageTokensCount> countTokens(MessageCountTokensParams 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<MessageTokensCount> countTokens(MessageCountTokensParams 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.
-
-
-
-