Uses of Class
dev.langchain4j.data.message.AiMessage
Packages that use AiMessage
Package
Description
-
Uses of AiMessage in dev.langchain4j.data.message
Methods in dev.langchain4j.data.message that return AiMessageModifier and TypeMethodDescriptionstatic AiMessageAiMessage.aiMessage(ToolExecutionRequest... toolExecutionRequests) Create a newAiMessagewith the given tool execution requests.static AiMessageCreate a newAiMessagewith the given text.static AiMessageAiMessage.aiMessage(String text, List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given text and tool execution requests.static AiMessageAiMessage.aiMessage(List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given tool execution requests.AiMessage.Builder.build()static AiMessageAiMessage.from(ToolExecutionRequest... toolExecutionRequests) Create a newAiMessagewith the given tool execution requests.static AiMessageCreate a newAiMessagewith the given text.static AiMessageAiMessage.from(String text, List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given text and tool execution requests.static AiMessageAiMessage.from(List<ToolExecutionRequest> toolExecutionRequests) Create a newAiMessagewith the given tool execution requests.Create a clone of thisAiMessagewith the given text. -
Uses of AiMessage in dev.langchain4j.guardrail
Methods in dev.langchain4j.guardrail with parameters of type AiMessageModifier and TypeMethodDescriptionprotected StringJsonExtractorOutputGuardrail.getInvalidJsonMessage(AiMessage aiMessage, String json) Generates a message indicating that the provided JSON is invalid.protected StringJsonExtractorOutputGuardrail.getInvalidJsonReprompt(AiMessage aiMessage, String json) Generates a reprompt message indicating that the provided JSON is invalid.protected OutputGuardrailResultJsonExtractorOutputGuardrail.invokeInvalidJson(AiMessage aiMessage, String json) default OutputGuardrailResultOutputGuardrail.successWith(AiMessage successfulAiMessage) Produces a successful result with specific success textdefault OutputGuardrailResultOutputGuardrail.successWith(AiMessage successfulAiMessage, Object successfulResult) Produces a non-fatal failurestatic OutputGuardrailResultOutputGuardrailResult.successWith(AiMessage successfulAiMessage) Produces a successful result with specific success textstatic OutputGuardrailResultOutputGuardrailResult.successWith(AiMessage successfulAiMessage, Object successfulResult) Produces a non-fatal failuredefault OutputGuardrailResultValidates the response from the LLM. -
Uses of AiMessage in dev.langchain4j.model.anthropic.internal.mapper
Methods in dev.langchain4j.model.anthropic.internal.mapper that return AiMessageModifier and TypeMethodDescriptionstatic AiMessageAnthropicMapper.toAiMessage(List<AnthropicContent> contents) static AiMessageAnthropicMapper.toAiMessage(List<AnthropicContent> contents, boolean returnThinking) -
Uses of AiMessage in dev.langchain4j.model.chat.response
Methods in dev.langchain4j.model.chat.response that return AiMessageMethods in dev.langchain4j.model.chat.response with parameters of type AiMessageModifier and TypeMethodDescription -
Uses of AiMessage in dev.langchain4j.model.googleai
Methods in dev.langchain4j.model.googleai with parameters of type AiMessageModifier and TypeMethodDescriptionGeneratedImageHelper.getGeneratedImages(AiMessage aiMessage) Extracts generated images from an AiMessage.static booleanGeneratedImageHelper.hasGeneratedImages(AiMessage aiMessage) Checks if an AiMessage contains generated images. -
Uses of AiMessage in dev.langchain4j.model.input
Methods in dev.langchain4j.model.input that return AiMessage -
Uses of AiMessage in dev.langchain4j.model.mistralai.internal.mapper
Methods in dev.langchain4j.model.mistralai.internal.mapper that return AiMessageModifier and TypeMethodDescriptionstatic AiMessageMistralAiMapper.aiMessageFrom(MistralAiChatCompletionResponse response) -
Uses of AiMessage in dev.langchain4j.model.openai.internal
Methods in dev.langchain4j.model.openai.internal that return AiMessageModifier and TypeMethodDescriptionstatic AiMessageOpenAiUtils.aiMessageFrom(ChatCompletionResponse response) static AiMessageOpenAiUtils.aiMessageFrom(ChatCompletionResponse response, boolean returnThinking) Methods in dev.langchain4j.model.openai.internal that return types with arguments of type AiMessage