Class FilePartParser

java.lang.Object
io.agentscope.core.a2a.agent.message.FilePartParser
All Implemented Interfaces:
PartParser<io.a2a.spec.FilePart>

public class FilePartParser extends Object implements PartParser<io.a2a.spec.FilePart>
Parser for FilePart to ContentBlock.
  • FilePart with mimeType is `image/*` parse to ImageBlock
  • FilePart with mimeType is `audio/*` parse to AudioBlock
  • FilePart with mimeType is `video/*` parse to VideoBlock
  • Constructor Details

    • FilePartParser

      public FilePartParser()
  • Method Details

    • parse

      public io.agentscope.core.message.ContentBlock parse(io.a2a.spec.FilePart part)
      Description copied from interface: PartParser
      Parse the given part and convert it to a ContentBlock.
      Specified by:
      parse in interface PartParser<io.a2a.spec.FilePart>
      Parameters:
      part - the part to parse, not null
      Returns:
      the parsed content block