Package | Description |
---|---|
dev.langchain4j.data.message | |
dev.langchain4j.memory | |
dev.langchain4j.model | |
dev.langchain4j.model.chat | |
dev.langchain4j.model.moderation |
Modifier and Type | Class and Description |
---|---|
class |
AiMessage
Represents a response message from an AI (LLM).
|
class |
SystemMessage
Represents a system message, typically defined by a developer.
|
class |
ToolExecutionResultMessage
Represents the result of a tool execution.
|
class |
UserMessage
Represents a message from a user, typically an end user of the application.
|
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) |
Modifier and Type | Method and Description |
---|---|
int |
Tokenizer.estimateTokenCountInMessages(Iterable<ChatMessage> messages) |
Modifier and Type | Method and Description |
---|---|
default AiMessage |
ChatLanguageModel.sendMessages(ChatMessage... messages)
Sends a sequence of messages to the LLM and returns a response.
|
Modifier and Type | Method and Description |
---|---|
int |
TokenCountEstimator.estimateTokenCount(List<ChatMessage> messages) |
AiMessage |
ChatLanguageModel.sendMessages(List<ChatMessage> messages)
Sends a list of messages to the LLM and returns a response.
|
AiMessage |
ChatLanguageModel.sendMessages(List<ChatMessage> messages,
List<ToolSpecification> toolSpecifications)
Sends a list of messages and a list of tool specifications to the LLM and returns a response.
|
void |
StreamingChatLanguageModel.sendMessages(List<ChatMessage> messages,
List<ToolSpecification> toolSpecifications,
StreamingResponseHandler handler) |
void |
StreamingChatLanguageModel.sendMessages(List<ChatMessage> messages,
StreamingResponseHandler handler) |
AiMessage |
ChatLanguageModel.sendMessages(List<ChatMessage> messages,
ToolSpecification toolSpecification)
Sends a list of messages and a specification of a tool that must be executed to the LLM and returns a response
that contains a request to execute specified tool.
|
void |
StreamingChatLanguageModel.sendMessages(List<ChatMessage> messages,
ToolSpecification toolSpecification,
StreamingResponseHandler handler) |
Modifier and Type | Method and Description |
---|---|
Moderation |
ModerationModel.moderate(ChatMessage message) |
Modifier and Type | Method and Description |
---|---|
Moderation |
ModerationModel.moderate(List<ChatMessage> messages) |
Copyright © 2023. All rights reserved.