Uses of Interface
org.springframework.ai.chat.messages.Message
Packages that use Message
Package
Description
Chat client API.
Provides classes for advising chat clients.
This package contains the core interfaces and classes supporting Retrieval Augmented
Generation flows.
The contract tests of a
SessionRepository
implementation.-
Uses of Message in org.springframework.ai.bedrock
Methods in org.springframework.ai.bedrock with parameters of type MessageModifier and TypeMethodDescriptionprotected @Nullable StringMessageToPromptConverter.messageToString(Message message) Method parameters in org.springframework.ai.bedrock with type arguments of type Message -
Uses of Message in org.springframework.ai.chat.client
Methods in org.springframework.ai.chat.client that return types with arguments of type MessageMethods in org.springframework.ai.chat.client with parameters of type MessageModifier and TypeMethodDescriptionMethod parameters in org.springframework.ai.chat.client with type arguments of type MessageModifier and TypeMethodDescription -
Uses of Message in org.springframework.ai.chat.client.advisor
Methods in org.springframework.ai.chat.client.advisor that return types with arguments of type MessageModifier and TypeMethodDescriptionToolCallingAdvisor.doGetNextInstructionsForToolCall(ChatClientRequest chatClientRequest, ChatClientResponse chatClientResponse, ToolExecutionResult toolExecutionResult) ToolCallingAdvisor.doGetNextInstructionsForToolCallStream(ChatClientRequest chatClientRequest, ChatClientResponse chatClientResponse, ToolExecutionResult toolExecutionResult) Hook method to determine the next instructions for a tool call iteration in streaming mode. -
Uses of Message in org.springframework.ai.chat.memory
Methods in org.springframework.ai.chat.memory that return types with arguments of type MessageModifier and TypeMethodDescriptionChatMemoryRepository.findByConversationId(String conversationId) Deprecated, for removal: This API element is subject to removal in a future version.InMemoryChatMemoryRepository.findByConversationId(String conversationId) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Get the messages in the chat memory for the specified conversation.Deprecated, for removal: This API element is subject to removal in a future version.Methods in org.springframework.ai.chat.memory with parameters of type MessageModifier and TypeMethodDescriptiondefault voidDeprecated, for removal: This API element is subject to removal in a future version.Save the specified message in the chat memory for the specified conversation.Method parameters in org.springframework.ai.chat.memory with type arguments of type MessageModifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Save the specified messages in the chat memory for the specified conversation.voidDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Replaces all the existing messages for the given conversation ID with the provided messages.voidDeprecated, for removal: This API element is subject to removal in a future version. -
Uses of Message in org.springframework.ai.chat.memory.repository.cassandra
Methods in org.springframework.ai.chat.memory.repository.cassandra that return types with arguments of type MessageModifier and TypeMethodDescriptionCassandraChatMemoryRepository.findByConversationId(String conversationId) Deprecated, for removal: This API element is subject to removal in a future version.Method parameters in org.springframework.ai.chat.memory.repository.cassandra with type arguments of type Message -
Uses of Message in org.springframework.ai.chat.memory.repository.jdbc
Methods in org.springframework.ai.chat.memory.repository.jdbc that return types with arguments of type MessageModifier and TypeMethodDescriptionJdbcChatMemoryRepository.findByConversationId(String conversationId) Deprecated, for removal: This API element is subject to removal in a future version.Method parameters in org.springframework.ai.chat.memory.repository.jdbc with type arguments of type Message -
Uses of Message in org.springframework.ai.chat.memory.repository.mongo
Methods in org.springframework.ai.chat.memory.repository.mongo that return MessageModifier and TypeMethodDescriptionstatic @Nullable MessageMongoChatMemoryRepository.mapMessage(Conversation conversation) Deprecated, for removal: This API element is subject to removal in a future version.Methods in org.springframework.ai.chat.memory.repository.mongo that return types with arguments of type MessageModifier and TypeMethodDescriptionMongoChatMemoryRepository.findByConversationId(String conversationId) Deprecated, for removal: This API element is subject to removal in a future version.Method parameters in org.springframework.ai.chat.memory.repository.mongo with type arguments of type Message -
Uses of Message in org.springframework.ai.chat.memory.repository.neo4j
Methods in org.springframework.ai.chat.memory.repository.neo4j that return types with arguments of type MessageModifier and TypeMethodDescriptionNeo4jChatMemoryRepository.findByConversationId(String conversationId) Deprecated, for removal: This API element is subject to removal in a future version.Method parameters in org.springframework.ai.chat.memory.repository.neo4j with type arguments of type Message -
Uses of Message in org.springframework.ai.chat.memory.repository.redis
Methods in org.springframework.ai.chat.memory.repository.redis that return MessageModifier and TypeMethodDescriptionAdvancedRedisChatMemoryRepository.MessageWithConversation.message()Returns the value of themessagerecord component.Methods in org.springframework.ai.chat.memory.repository.redis that return types with arguments of type MessageModifier and TypeMethodDescriptionRedisChatMemoryRepository.findByConversationId(String conversationId) Deprecated, for removal: This API element is subject to removal in a future version.Finds all messages for a given conversation ID.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Methods in org.springframework.ai.chat.memory.repository.redis with parameters of type MessageModifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Method parameters in org.springframework.ai.chat.memory.repository.redis with type arguments of type MessageModifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Constructors in org.springframework.ai.chat.memory.repository.redis with parameters of type MessageModifierConstructorDescriptionMessageWithConversation(String conversationId, Message message, long timestamp) Creates an instance of aMessageWithConversationrecord class. -
Uses of Message in org.springframework.ai.chat.messages
Classes in org.springframework.ai.chat.messages that implement MessageModifier and TypeClassDescriptionclassThe AbstractMessage class is an abstract implementation of the Message interface.classLets the generative know the content was generated as a response to the user.classA message of the type 'system' passed as input.classThe ToolResponseMessage class represents a message with a function content in a chat application.classA message of the type 'user' passed as input Messages with the user role are from the end-user or developer. -
Uses of Message in org.springframework.ai.chat.model
Methods in org.springframework.ai.chat.model with parameters of type Message -
Uses of Message in org.springframework.ai.chat.prompt
Methods in org.springframework.ai.chat.prompt that return MessageModifier and TypeMethodDescriptionAssistantPromptTemplate.createMessage()AssistantPromptTemplate.createMessage(Map<String, Object> model) PromptTemplate.createMessage()PromptTemplate.createMessage(List<Media> mediaList) PromptTemplate.createMessage(Map<String, Object> additionalVariables) PromptTemplateMessageActions.createMessage()PromptTemplateMessageActions.createMessage(List<Media> mediaList) PromptTemplateMessageActions.createMessage(Map<String, Object> model) SystemPromptTemplate.createMessage()SystemPromptTemplate.createMessage(Map<String, Object> model) Prompt.getLastUserOrToolResponseMessage()Get the last user or tool response message in the prompt.Methods in org.springframework.ai.chat.prompt that return types with arguments of type MessageModifier and TypeMethodDescriptionChatPromptTemplate.createMessages()ChatPromptTemplate.createMessages(Map<String, Object> model) PromptTemplateChatActions.createMessages()PromptTemplateChatActions.createMessages(Map<String, Object> model) Prompt.getInstructions()Methods in org.springframework.ai.chat.prompt with parameters of type MessageModifier and TypeMethodDescriptionMethod parameters in org.springframework.ai.chat.prompt with type arguments of type MessageConstructors in org.springframework.ai.chat.prompt with parameters of type MessageConstructor parameters in org.springframework.ai.chat.prompt with type arguments of type Message -
Uses of Message in org.springframework.ai.deepseek
Classes in org.springframework.ai.deepseek that implement MessageModifier and TypeClassDescriptionclassDeprecated, for removal: This API element is subject to removal in a future version. -
Uses of Message in org.springframework.ai.model.tool
Methods in org.springframework.ai.model.tool that return types with arguments of type MessageModifier and TypeMethodDescriptionDefaultToolExecutionResult.conversationHistory()Returns the value of theconversationHistoryrecord component.ToolExecutionResult.conversationHistory()The history of messages exchanged during the conversation, including the tool execution result.Method parameters in org.springframework.ai.model.tool with type arguments of type MessageModifier and TypeMethodDescriptionDefaultToolExecutionResult.Builder.conversationHistory(List<Message> conversationHistory) Constructor parameters in org.springframework.ai.model.tool with type arguments of type MessageModifierConstructorDescriptionDefaultToolExecutionResult(List<Message> conversationHistory, boolean returnDirect) Creates an instance of aDefaultToolExecutionResultrecord class. -
Uses of Message in org.springframework.ai.rag
Methods in org.springframework.ai.rag that return types with arguments of type MessageModifier and TypeMethodDescriptionQuery.history()Returns the value of thehistoryrecord component.Methods in org.springframework.ai.rag with parameters of type MessageMethod parameters in org.springframework.ai.rag with type arguments of type MessageConstructor parameters in org.springframework.ai.rag with type arguments of type Message -
Uses of Message in org.springframework.ai.session
Methods in org.springframework.ai.session that return MessageMethods in org.springframework.ai.session that return types with arguments of type MessageModifier and TypeMethodDescriptionSessionService.getActiveMessages(String sessionId) The messages of the active view, the context window to send to the model:getEvents(sessionId, EventFilter.active())as messages.SessionService.getMessages(String sessionId) The messages of the whole log, the events a compaction covered and the summaries included: the full history, not a prompt.Methods in org.springframework.ai.session with parameters of type MessageModifier and TypeMethodDescriptiondefault voidSessionService.appendMessage(String sessionId, Message message) Wraps the message in aSessionEventand appends it; seeSessionService.appendEvent(SessionEvent).The message aEventType.MESSAGEevent wraps; required for that type, not allowed for any other.booleanMessageFilter.shouldPersist(Message message) Whether the message is stored. -
Uses of Message in org.springframework.ai.session.compaction
Methods in org.springframework.ai.session.compaction that return types with arguments of type MessageModifier and TypeMethodDescriptionChatModelSummarizer.summarize(SummaryRequest request) CompactionSummarizer.summarize(SummaryRequest request) Summarizes the events that leave the view.CompactionResult.summary()Returns the value of thesummaryrecord component.Methods in org.springframework.ai.session.compaction with parameters of type Message -
Uses of Message in org.springframework.ai.test.session
Methods in org.springframework.ai.test.session that return MessageModifier and TypeMethodDescriptionprotected static Messageprotected static Messageprotected static MessageAn assistant message that calls one tool.protected static MessageAbstractSessionRepositoryContractTests.toolResponse(String callId, String toolName, String data) The result of one tool call.protected static MessageMethods in org.springframework.ai.test.session with parameters of type MessageModifier and TypeMethodDescriptionprotected voidAppends each message as its own event.protected static SessionEventprotected static SessionEventA synthetic event, as a compaction strategy would produce it.
AssistantMessage.getReasoning(), and build a prefix message as anAssistantMessagewhose metadata holdstrueunderDeepSeekChatModel.PREFIX_METADATA_KEY