Uses of Interface
org.springframework.ai.chat.messages.part.MessagePart
Packages that use MessagePart
Package
Description
Ordered, typed content parts carried by chat messages: text, tool calls, tool results,
media and an opaque fallback for provider blocks that are not modeled yet.
-
Uses of MessagePart in org.springframework.ai.chat.messages
Fields in org.springframework.ai.chat.messages with type parameters of type MessagePartModifier and TypeFieldDescriptionprotected final List<MessagePart>AssistantMessage.Builder.explicitPartsMethods in org.springframework.ai.chat.messages with type parameters of type MessagePartMethods in org.springframework.ai.chat.messages that return types with arguments of type MessagePartModifier and TypeMethodDescriptionprotected List<MessagePart>AssistantMessage.Builder.buildParts()The parts this builder would put in the message: explicit parts first, then the legacy text, tool calls and media in that order.AbstractMessage.getParts()The ordered content parts of this message.protected static List<MessagePart>AbstractMessage.legacyParts(@Nullable String textContent) Methods in org.springframework.ai.chat.messages with parameters of type MessagePartModifier and TypeMethodDescriptionAssistantMessage.Builder.part(MessagePart part) Appends a content part.UserMessage.Builder.part(MessagePart part) Adds a part.Method parameters in org.springframework.ai.chat.messages with type arguments of type MessagePartModifier and TypeMethodDescriptionAssistantMessage.Builder.parts(List<MessagePart> parts) Appends content parts in order.ToolResponseMessage.Builder.parts(List<MessagePart> parts) Adds parts, in order, for example when rebuilding a persisted message.UserMessage.Builder.parts(List<MessagePart> parts) Adds parts, in order.Constructor parameters in org.springframework.ai.chat.messages with type arguments of type MessagePartModifierConstructorDescriptionprotectedAbstractMessage(MessageType messageType, List<MessagePart> parts, Map<String, Object> metadata) Create a new AbstractMessage from an ordered list of parts.protectedAssistantMessage(List<MessagePart> parts, Map<String, Object> properties) Creates a message from an ordered list of content parts, which may includeReasoningParts interleaved with the rest of the content.protectedToolResponseMessage(Map<String, Object> metadata, List<MessagePart> parts) Creates a message from an ordered list of parts.protectedUserMessage(List<MessagePart> parts, Map<String, Object> metadata) Creates a message from an ordered list of parts. -
Uses of MessagePart in org.springframework.ai.chat.messages.part
Classes in org.springframework.ai.chat.messages.part that implement MessagePartModifier and TypeClassDescriptionfinal recordA media element (image, audio, video, document) produced by the model or supplied by the caller.final recordModel reasoning (thinking) that preceded or accompanied the answer.final recordA run of text produced by the model or supplied by the caller.final recordA tool call requested by the model.final recordThe result of one tool call.final recordA part that neither an adapter nor this version of Spring AI recognizes, kept verbatim so nothing is silently dropped.Methods in org.springframework.ai.chat.messages.part that return MessagePartModifier and TypeMethodDescriptionstatic MessagePartStreamingParts.complete(MessagePart part, int index) Marks a part as the complete content block at the given index.static MessagePartStreamingParts.partial(MessagePart part, int index) Marks a part as a delta of the content block at the given index.static MessagePartStreamingParts.strip(MessagePart part) Removes the streaming attributes from a part.MessagePart.withAttributes(Map<String, String> attributes) Returns a copy of this part with the given attributes replacing the current ones.Methods in org.springframework.ai.chat.messages.part that return types with arguments of type MessagePartModifier and TypeMethodDescriptionToolResultPart.content()Returns the value of thecontentrecord component.Methods in org.springframework.ai.chat.messages.part with parameters of type MessagePartModifier and TypeMethodDescriptionstatic MessagePartStreamingParts.complete(MessagePart part, int index) Marks a part as the complete content block at the given index.static booleanStreamingParts.isPartial(MessagePart part) Whether a streamed part is a delta.static MessagePartStreamingParts.partial(MessagePart part, int index) Marks a part as a delta of the content block at the given index.static @Nullable IntegerStreamingParts.partIndex(MessagePart part) The content block index of a streamed part.static MessagePartStreamingParts.strip(MessagePart part) Removes the streaming attributes from a part.Constructor parameters in org.springframework.ai.chat.messages.part with type arguments of type MessagePartModifierConstructorDescriptionToolResultPart(@Nullable String id, @Nullable String name, List<MessagePart> content, boolean isError, @Nullable OpaquePayload payload, Map<String, String> attributes) Creates an instance of aToolResultPartrecord class.