Modifier and Type | Class and Description |
---|---|
class |
AiMessage
Represents a response message from an AI (language model).
|
class |
SystemMessage
Represents a system message, typically defined by a developer.
|
class |
ToolExecutionResultMessage
Represents the result of a tool execution in response to a
ToolExecutionRequest . |
class |
UserMessage
Represents a message from a user, typically an end user of the application.
|
Modifier and Type | Method and Description |
---|---|
ChatMessage |
GsonChatMessageJsonCodec.messageFromJson(String json) |
static ChatMessage |
ChatMessageDeserializer.messageFromJson(String json)
Deserializes a JSON string into a
ChatMessage . |
ChatMessage |
ChatMessageJsonCodec.messageFromJson(String json)
Deserializes a JSON string to a
ChatMessage object. |
Modifier and Type | Method and Description |
---|---|
Class<? extends ChatMessage> |
ChatMessageType.messageClass()
Returns the class of the message type.
|
List<ChatMessage> |
GsonChatMessageJsonCodec.messagesFromJson(String json) |
static List<ChatMessage> |
ChatMessageDeserializer.messagesFromJson(String json)
Deserializes a JSON string into a list of
ChatMessage . |
List<ChatMessage> |
ChatMessageJsonCodec.messagesFromJson(String json)
Deserializes a JSON string to a list of
ChatMessage objects. |
Modifier and Type | Method and Description |
---|---|
String |
GsonChatMessageJsonCodec.messageToJson(ChatMessage message) |
static String |
ChatMessageSerializer.messageToJson(ChatMessage message)
Serializes a chat message into a JSON string.
|
String |
ChatMessageJsonCodec.messageToJson(ChatMessage message)
Serializes a
ChatMessage object to a JSON string. |
Modifier and Type | Method and Description |
---|---|
String |
GsonChatMessageJsonCodec.messagesToJson(List<ChatMessage> messages) |
static String |
ChatMessageSerializer.messagesToJson(List<ChatMessage> messages)
Serializes a list of chat messages into a JSON string.
|
String |
ChatMessageJsonCodec.messagesToJson(List<ChatMessage> messages)
Serializes a list of
ChatMessage objects to a JSON string. |
Modifier and Type | Method and Description |
---|---|
List<ChatMessage> |
ChatMemory.messages()
Retrieves messages from the chat memory.
|
Modifier and Type | Method and Description |
---|---|
void |
ChatMemory.add(ChatMessage message)
Adds a message to the chat memory.
|
Modifier and Type | Method and Description |
---|---|
int |
Tokenizer.estimateTokenCountInMessage(ChatMessage message)
Estimates the count of tokens in the given message.
|
Modifier and Type | Method and Description |
---|---|
int |
Tokenizer.estimateTokenCountInMessages(Iterable<ChatMessage> messages)
Estimates the count of tokens in the given messages.
|
Modifier and Type | Method and Description |
---|---|
default Response<AiMessage> |
ChatLanguageModel.generate(ChatMessage... messages)
Generates a response from the model based on a sequence of messages.
|
Modifier and Type | Method and Description |
---|---|
int |
TokenCountEstimator.estimateTokenCount(List<ChatMessage> messages)
Estimates the count of tokens in the specified list of messages.
|
Response<AiMessage> |
ChatLanguageModel.generate(List<ChatMessage> messages)
Generates a response from the model based on a sequence of messages.
|
default Response<AiMessage> |
ChatLanguageModel.generate(List<ChatMessage> messages,
List<ToolSpecification> toolSpecifications)
Generates a response from the model based on a list of messages and a list of tool specifications.
|
default void |
StreamingChatLanguageModel.generate(List<ChatMessage> messages,
List<ToolSpecification> toolSpecifications,
StreamingResponseHandler<AiMessage> handler)
Generates a response from the model based on a list of messages and a list of tool specifications.
|
void |
StreamingChatLanguageModel.generate(List<ChatMessage> messages,
StreamingResponseHandler<AiMessage> handler)
Generates a response from the model based on a sequence of messages.
|
default Response<AiMessage> |
ChatLanguageModel.generate(List<ChatMessage> messages,
ToolSpecification toolSpecification)
Generates a response from the model based on a list of messages and a single tool specification.
|
default void |
StreamingChatLanguageModel.generate(List<ChatMessage> messages,
ToolSpecification toolSpecification,
StreamingResponseHandler<AiMessage> handler)
Generates a response from the model based on a list of messages and a tool specification.
|
Modifier and Type | Method and Description |
---|---|
default Response<Moderation> |
ModerationModel.moderate(ChatMessage message)
Moderates the given chat message.
|
Modifier and Type | Method and Description |
---|---|
Response<Moderation> |
ModerationModel.moderate(List<ChatMessage> messages)
Moderates the given list of chat messages.
|
Modifier and Type | Method and Description |
---|---|
List<ChatMessage> |
Metadata.chatMemory() |
Modifier and Type | Method and Description |
---|---|
static Metadata |
Metadata.from(UserMessage userMessage,
Object chatMemoryId,
List<ChatMessage> chatMemory) |
Constructor and Description |
---|
Metadata(UserMessage userMessage,
Object chatMemoryId,
List<ChatMessage> chatMemory) |
Modifier and Type | Method and Description |
---|---|
protected String |
CompressingQueryTransformer.format(ChatMessage message) |
Modifier and Type | Method and Description |
---|---|
protected String |
CompressingQueryTransformer.format(List<ChatMessage> chatMemory) |
Modifier and Type | Method and Description |
---|---|
List<ChatMessage> |
ChatMemoryStore.getMessages(Object memoryId)
Retrieves messages for a specified chat memory.
|
List<ChatMessage> |
InMemoryChatMemoryStore.getMessages(Object memoryId) |
Modifier and Type | Method and Description |
---|---|
void |
ChatMemoryStore.updateMessages(Object memoryId,
List<ChatMessage> messages)
Updates messages for a specified chat memory.
|
void |
InMemoryChatMemoryStore.updateMessages(Object memoryId,
List<ChatMessage> messages) |
Copyright © 2024. All rights reserved.