Class PromptTestFile

  • All Implemented Interfaces:
    Serializable

    public final class PromptTestFile
    extends Object
    implements Serializable
    An input file for a prompt query uploaded by the user; or an output file (returned by a prompt query), used by PromptQueryTestViewModel when testing prompt queries in the prompt query configuration UI.
    Since:
    8.5.0
    See Also:
    Serialized Form
    • Constructor Detail

      • PromptTestFile

        public PromptTestFile​(String fileName,
                              String mimeType,
                              Path file)
        Creates a new prompt test file uploaded by the user to test a prompt query.
        Parameters:
        fileName - The name of the file.
        mimeType - The MIME type of the file.
        file - Path on the file system where the data is stored. The actual name of the file may differ from the name of the file uploaded by the user.
    • Method Detail

      • getFile

        public File getFile()
        Gets the file on the file system where the data is stored. Only use this for reading the binary data, do not use the name of the file. The actual name of the file may differ from the name of the file uploaded by the user. Use getFileName() to get the original name of the file.
        Returns:
        The file.
      • getFileName

        public String getFileName()
        Gets the name of the file as uploaded by the user.
        Returns:
        The name of the file.
      • getMimeType

        public String getMimeType()
        Gets the MIME type of the file as uploaded by the user.
        Returns:
        The MIME type of the file.
      • getPath

        public Path getPath()
        Gets the file on the file system where the data is stored. Only use this for reading the binary data, do not use the name of the file. The actual name of the file may differ from the name of the file uploaded by the user. Use getFileName() to get the original name of the file.
        Returns:
        The file.