Enum Class AiObservationAttributes

java.lang.Object
java.lang.Enum<AiObservationAttributes>
org.springframework.ai.observation.conventions.AiObservationAttributes
All Implemented Interfaces:
Serializable, Comparable<AiObservationAttributes>, Constable

public enum AiObservationAttributes extends Enum<AiObservationAttributes>
Collection of attribute keys used in AI observations (spans, metrics, events). Based on the OpenTelemetry Semantic Conventions for AI Systems.
Since:
1.0.0
Author:
Thomas Vitale
See Also:
  • Enum Constant Details

    • AI_OPERATION_TYPE

      public static final AiObservationAttributes AI_OPERATION_TYPE
      The name of the operation being performed.
    • AI_PROVIDER

      public static final AiObservationAttributes AI_PROVIDER
      The model provider as identified by the client instrumentation.
    • REQUEST_MODEL

      public static final AiObservationAttributes REQUEST_MODEL
      The name of the model a request is being made to.
    • REQUEST_FREQUENCY_PENALTY

      public static final AiObservationAttributes REQUEST_FREQUENCY_PENALTY
      The frequency penalty setting for the model request.
    • REQUEST_MAX_TOKENS

      public static final AiObservationAttributes REQUEST_MAX_TOKENS
      The maximum number of tokens the model generates for a request.
    • REQUEST_PRESENCE_PENALTY

      public static final AiObservationAttributes REQUEST_PRESENCE_PENALTY
      The presence penalty setting for the model request.
    • REQUEST_STOP_SEQUENCES

      public static final AiObservationAttributes REQUEST_STOP_SEQUENCES
      List of sequences that the model will use to stop generating further tokens.
    • REQUEST_TEMPERATURE

      public static final AiObservationAttributes REQUEST_TEMPERATURE
      The temperature setting for the model request.
    • REQUEST_TOP_K

      public static final AiObservationAttributes REQUEST_TOP_K
      The top_k sampling setting for the model request.
    • REQUEST_TOP_P

      public static final AiObservationAttributes REQUEST_TOP_P
      The top_p sampling setting for the model request.
    • REQUEST_EMBEDDING_DIMENSIONS

      public static final AiObservationAttributes REQUEST_EMBEDDING_DIMENSIONS
      The number of dimensions the resulting output embeddings have.
    • REQUEST_IMAGE_RESPONSE_FORMAT

      public static final AiObservationAttributes REQUEST_IMAGE_RESPONSE_FORMAT
      The format in which the generated image is returned.
    • REQUEST_IMAGE_SIZE

      public static final AiObservationAttributes REQUEST_IMAGE_SIZE
      The size of the image to generate.
    • REQUEST_IMAGE_STYLE

      public static final AiObservationAttributes REQUEST_IMAGE_STYLE
      The style of the image to generate.
    • RESPONSE_FINISH_REASONS

      public static final AiObservationAttributes RESPONSE_FINISH_REASONS
      Reasons the model stopped generating tokens, corresponding to each generation received.
    • RESPONSE_ID

      public static final AiObservationAttributes RESPONSE_ID
      The unique identifier for the AI response.
    • RESPONSE_MODEL

      public static final AiObservationAttributes RESPONSE_MODEL
      The name of the model that generated the response.
    • USAGE_INPUT_TOKENS

      public static final AiObservationAttributes USAGE_INPUT_TOKENS
      The number of tokens used in the model input.
    • USAGE_OUTPUT_TOKENS

      public static final AiObservationAttributes USAGE_OUTPUT_TOKENS
      The number of tokens used in the model output.
    • USAGE_TOTAL_TOKENS

      public static final AiObservationAttributes USAGE_TOTAL_TOKENS
      The total number of tokens used in the model exchange.
    • PROMPT

      public static final AiObservationAttributes PROMPT
      The full prompt sent to the model.
    • COMPLETION

      public static final AiObservationAttributes COMPLETION
      The full response received from the model.
  • Method Details

    • values

      public static AiObservationAttributes[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AiObservationAttributes valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • value

      public String value()