Class CommonPromptOutputProperty

java.lang.Object
de.xima.fc.prompt.service.support.CommonPromptOutputProperty

public final class CommonPromptOutputProperty extends Object
Constants with common names for prompt output properties, see computeQueryOutput.
Since:
8.5.0
  • Field Details

    • OUTPUT_PARAMETER_ANSWER

      public static final String OUTPUT_PARAMETER_ANSWER
      The name of the output parameter that contains the main text answer from a prompt query. We encourage implementations to use a record value descriptor for their output descriptor, so that more properties can be added later. If the query produces a single text answer that can be considered the main answer (e.g. when prompting the model for a text response; or when transcribing speech to text), it should be placed in a property with this name. By adhering to this convention, you can improve compatibility with other prompt service implementations.
      See Also:
    • OUTPUT_PARAMETER_TOKEN_USAGE

      public static final String OUTPUT_PARAMETER_TOKEN_USAGE
      The name of the output parameter that contains the token usage statistics from a prompt query. If the prompt service provides token usage information (e.g. number of input and output tokens used), it should be placed in a property with this name. The value associated with this property can be a complex type (e.g. a record value descriptor) that includes details such as input tokens, output tokens, and total tokens used. The exact structure of the value can vary depending on the prompt service implementation, but recommended fields include:
      • input: The number of input tokens used, i.e. tokens in the prompt.
      • output: The number of output tokens generated by the model, i.e. tokens in the response.
      • total: The total number of tokens used, which is the sum of input and output tokens.
      See Also:
    • OUTPUT_PARAMETER_TOKEN_USAGE_INPUT

      public static final String OUTPUT_PARAMETER_TOKEN_USAGE_INPUT
      The name of the field in the output parameter OUTPUT_PARAMETER_TOKEN_USAGE that contains the number of input tokens used, i.e. tokens in the prompt. We encourage implementations to use these common field names to improve with other prompt service implementations.
      See Also:
    • OUTPUT_PARAMETER_TOKEN_USAGE_OUTPUT

      public static final String OUTPUT_PARAMETER_TOKEN_USAGE_OUTPUT
      The name of the field in the output parameter OUTPUT_PARAMETER_TOKEN_USAGE that contains the number of output tokens generated by the model, i.e. tokens in the response. We encourage implementations to use these common field names to improve compatibility with other prompt service implementations.
      See Also:
    • OUTPUT_PARAMETER_TOKEN_USAGE_TOTAL

      public static final String OUTPUT_PARAMETER_TOKEN_USAGE_TOTAL
      The name of the field in the output parameter OUTPUT_PARAMETER_TOKEN_USAGE that contains the total number of tokens used, which is the sum of input and output tokens. We encourage implementations to use these common field names to improve compatibility with other prompt service implementations.
      See Also: