Uses of Class
dev.langchain4j.data.message.AiMessage
Package
Description
-
Uses of AiMessage in dev.langchain4j.data.message
Modifier and TypeMethodDescriptionstatic AiMessage
AiMessage.aiMessage
(ToolExecutionRequest... toolExecutionRequests) Create a newAiMessage
with the given tool execution requests.static AiMessage
Create a newAiMessage
with the given text.static AiMessage
AiMessage.aiMessage
(String text, List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessage
with the given text and tool execution requests.static AiMessage
AiMessage.aiMessage
(List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessage
with the given tool execution requests.static AiMessage
AiMessage.from
(ToolExecutionRequest... toolExecutionRequests) Create a newAiMessage
with the given tool execution requests.static AiMessage
Create a newAiMessage
with the given text.static AiMessage
AiMessage.from
(String text, List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessage
with the given text and tool execution requests.static AiMessage
AiMessage.from
(List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessage
with the given tool execution requests. -
Uses of AiMessage in dev.langchain4j.model.anthropic
Modifier and TypeMethodDescriptionAnthropicChatModel.generate
(List<ChatMessage> messages) AnthropicChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
AnthropicStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
AnthropicStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
AnthropicStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.anthropic.internal.client
Modifier and TypeMethodDescriptionabstract void
AnthropicClient.createMessage
(AnthropicCreateMessageRequest request, StreamingResponseHandler<AiMessage> handler) void
DefaultAnthropicClient.createMessage
(AnthropicCreateMessageRequest request, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.anthropic.internal.mapper
Modifier and TypeMethodDescriptionstatic AiMessage
AnthropicMapper.toAiMessage
(List<AnthropicContent> contents) -
Uses of AiMessage in dev.langchain4j.model.azure
Modifier and TypeMethodDescriptionAzureOpenAiChatModel.generate
(List<ChatMessage> messages) AzureOpenAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) AzureOpenAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
AzureOpenAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
AzureOpenAiStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
AzureOpenAiStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.bedrock
Modifier and TypeMethodDescriptionBedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages) BedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) BedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) BedrockMistralAiChatModel.generate
(List<ChatMessage> messages) -
Uses of AiMessage in dev.langchain4j.model.bedrock.internal
Modifier and TypeMethodDescriptionAbstractBedrockChatModel.generate
(List<ChatMessage> messages) AbstractBedrockChatModel.toAiMessage
(T result) Modifier and TypeMethodDescriptionprotected ChatModelResponse
AbstractSharedBedrockChatModel.createModelListenerResponse
(String responseId, String responseModel, Response<AiMessage> response) void
AbstractBedrockStreamingChatModel.generate
(String userMessage, StreamingResponseHandler<AiMessage> handler) void
AbstractBedrockStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.chat
Modifier and TypeMethodDescriptionChatLanguageModel.generate
(ChatMessage... messages) Generates a response from the model based on a sequence of messages.ChatLanguageModel.generate
(List<ChatMessage> messages) Generates a response from the model based on a sequence of messages.ChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Generates a response from the model based on a list of messages and a single tool specification.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.DisabledChatLanguageModel.generate
(ChatMessage... messages) DisabledChatLanguageModel.generate
(List<ChatMessage> messages) DisabledChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) DisabledChatLanguageModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
DisabledStreamingChatLanguageModel.generate
(String userMessage, StreamingResponseHandler<AiMessage> handler) void
DisabledStreamingChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
DisabledStreamingChatLanguageModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
DisabledStreamingChatLanguageModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) default void
StreamingChatLanguageModel.generate
(UserMessage userMessage, StreamingResponseHandler<AiMessage> handler) Generates a response from the model based on a message from a user.default void
StreamingChatLanguageModel.generate
(String userMessage, StreamingResponseHandler<AiMessage> handler) Generates a response from the model based on a message from a user.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.void
StreamingChatLanguageModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) Generates a response from the model based on a sequence of messages.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. -
Uses of AiMessage in dev.langchain4j.model.chat.listener
Modifier and TypeMethodDescriptionModifierConstructorDescriptionChatModelResponse
(String id, String model, TokenUsage tokenUsage, FinishReason finishReason, AiMessage aiMessage) -
Uses of AiMessage in dev.langchain4j.model.chat.response
Modifier and TypeMethodDescription -
Uses of AiMessage in dev.langchain4j.model.chatglm
-
Uses of AiMessage in dev.langchain4j.model.dashscope
Modifier and TypeMethodDescriptionQwenStreamingResponseBuilder.build()
QwenChatModel.generate
(List<ChatMessage> messages) QwenChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) QwenChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
QwenStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
QwenStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
QwenStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.github
Modifier and TypeMethodDescriptionGitHubModelsChatModel.generate
(List<ChatMessage> messages) GitHubModelsChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) GitHubModelsChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
GitHubModelsStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
GitHubModelsStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
GitHubModelsStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.googleai
Modifier and TypeMethodDescriptionGoogleAiGeminiChatModel.generate
(List<ChatMessage> messages) GoogleAiGeminiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) GoogleAiGeminiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
GoogleAiGeminiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
GoogleAiGeminiStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
GoogleAiGeminiStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.huggingface
-
Uses of AiMessage in dev.langchain4j.model.input
-
Uses of AiMessage in dev.langchain4j.model.jlama
Modifier and TypeMethodDescriptionJlamaChatModel.generate
(List<ChatMessage> messages) JlamaChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) JlamaChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
JlamaStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.localai
Modifier and TypeMethodDescriptionLocalAiChatModel.generate
(List<ChatMessage> messages) LocalAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) LocalAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
LocalAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
LocalAiStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
LocalAiStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.mistralai
Modifier and TypeMethodDescriptionMistralAiChatModel.generate
(List<ChatMessage> messages) Generates chat response based on the given list of messages.MistralAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Generates an AI message response based on the given list of chat messages and a tool specification.MistralAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Generates an AI message response based on the given list of chat messages and tool specifications.Modifier and TypeMethodDescriptionvoid
MistralAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) Generates streamed token response based on the given list of messages and tool specification.void
MistralAiStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) Generates streamed token response based on the given list of messages.void
MistralAiStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) Generates streamed token response based on the given list of messages and tool specifications. -
Uses of AiMessage in dev.langchain4j.model.mistralai.internal.client
Modifier and TypeMethodDescriptionvoid
DefaultMistralAiClient.streamingChatCompletion
(MistralAiChatCompletionRequest request, StreamingResponseHandler<AiMessage> handler) abstract void
MistralAiClient.streamingChatCompletion
(MistralAiChatCompletionRequest request, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.mistralai.internal.mapper
Modifier and TypeMethodDescriptionstatic AiMessage
MistralAiMapper.aiMessageFrom
(MistralAiChatCompletionResponse response) -
Uses of AiMessage in dev.langchain4j.model.ollama
Modifier and TypeMethodDescriptionOllamaChatModel.generate
(List<ChatMessage> messages) OllamaChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
OllamaStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.openai
Modifier and TypeMethodDescriptionstatic AiMessage
InternalOpenAiHelper.aiMessageFrom
(dev.ai4j.openai4j.chat.ChatCompletionResponse response) Modifier and TypeMethodDescriptionOpenAiStreamingResponseBuilder.build()
OpenAiChatModel.generate
(List<ChatMessage> messages) OpenAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) OpenAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
OpenAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
OpenAiStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
OpenAiStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.qianfan
Modifier and TypeMethodDescriptionstatic AiMessage
InternalQianfanHelper.aiMessageFrom
(ChatCompletionResponse response) Modifier and TypeMethodDescriptionQianfanChatModel.generate
(List<ChatMessage> messages) QianfanChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) QianfanChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
QianfanStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
QianfanStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
QianfanStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.qianfan.client
-
Uses of AiMessage in dev.langchain4j.model.vertexai
Modifier and TypeMethodDescriptionVertexAiChatModel.generate
(List<ChatMessage> messages) VertexAiGeminiChatModel.generate
(List<ChatMessage> messages) VertexAiGeminiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) VertexAiGeminiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
VertexAiGeminiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
VertexAiGeminiStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
VertexAiGeminiStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.model.workersai
Modifier and TypeMethodDescriptionWorkersAiChatModel.generate
(@NonNull ChatMessage... messages) Generates a response from the model based on a sequence of messages.WorkersAiChatModel.generate
(List<ChatMessage> messages) Generates a response from the model based on a sequence of messages.WorkersAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Generates a response from the model based on a list of messages and a single tool specification.WorkersAiChatModel.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. -
Uses of AiMessage in dev.langchain4j.model.zhipu
Modifier and TypeMethodDescriptionZhipuAiChatModel.generate
(List<ChatMessage> messages) ZhipuAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) ZhipuAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Modifier and TypeMethodDescriptionvoid
ZhipuAiStreamingChatModel.generate
(String userMessage, StreamingResponseHandler<AiMessage> handler) void
ZhipuAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) void
ZhipuAiStreamingChatModel.generate
(List<ChatMessage> messages, StreamingResponseHandler<AiMessage> handler) void
ZhipuAiStreamingChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications, StreamingResponseHandler<AiMessage> handler) -
Uses of AiMessage in dev.langchain4j.service
Modifier and TypeMethodDescriptionAiServiceTokenStream.onComplete
(Consumer<Response<AiMessage>> completionHandler) TokenStream.onComplete
(Consumer<Response<AiMessage>> completionHandler) The provided consumer will be invoked when a language model finishes streaming a response. -
Uses of AiMessage in dev.langchain4j.service.output