Class FilePartParser
java.lang.Object
io.agentscope.core.a2a.agent.message.FilePartParser
- All Implemented Interfaces:
PartParser<io.a2a.spec.FilePart>
Parser for
FilePart to ContentBlock.
FilePartwith mimeType is `image/*` parse toImageBlockFilePartwith mimeType is `audio/*` parse toAudioBlockFilePartwith mimeType is `video/*` parse toVideoBlock
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.agentscope.core.message.ContentBlockparse(io.a2a.spec.FilePart part) Parse the given part and convert it to a ContentBlock.
-
Constructor Details
-
FilePartParser
public FilePartParser()
-
-
Method Details
-
parse
public io.agentscope.core.message.ContentBlock parse(io.a2a.spec.FilePart part) Description copied from interface:PartParserParse the given part and convert it to a ContentBlock.- Specified by:
parsein interfacePartParser<io.a2a.spec.FilePart>- Parameters:
part- the part to parse, not null- Returns:
- the parsed content block
-