Class DefaultChatModelObservationConvention

java.lang.Object
org.springframework.ai.chat.observation.DefaultChatModelObservationConvention
All Implemented Interfaces:
io.micrometer.observation.KeyValuesConvention, io.micrometer.observation.ObservationConvention<ChatModelObservationContext>, ChatModelObservationConvention

public class DefaultChatModelObservationConvention extends Object implements ChatModelObservationConvention
Default conventions to populate observations for chat model operations.
Since:
1.0.0
Author:
Thomas Vitale
  • Field Details

  • Constructor Details

    • DefaultChatModelObservationConvention

      public DefaultChatModelObservationConvention()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface io.micrometer.observation.ObservationConvention<ChatModelObservationContext>
    • getContextualName

      public String getContextualName(ChatModelObservationContext context)
      Specified by:
      getContextualName in interface io.micrometer.observation.ObservationConvention<ChatModelObservationContext>
    • getLowCardinalityKeyValues

      public io.micrometer.common.KeyValues getLowCardinalityKeyValues(ChatModelObservationContext context)
      Specified by:
      getLowCardinalityKeyValues in interface io.micrometer.observation.ObservationConvention<ChatModelObservationContext>
    • aiOperationType

      protected io.micrometer.common.KeyValue aiOperationType(ChatModelObservationContext context)
    • aiProvider

      protected io.micrometer.common.KeyValue aiProvider(ChatModelObservationContext context)
    • requestModel

      protected io.micrometer.common.KeyValue requestModel(ChatModelObservationContext context)
    • responseModel

      protected io.micrometer.common.KeyValue responseModel(ChatModelObservationContext context)
    • getHighCardinalityKeyValues

      public io.micrometer.common.KeyValues getHighCardinalityKeyValues(ChatModelObservationContext context)
      Specified by:
      getHighCardinalityKeyValues in interface io.micrometer.observation.ObservationConvention<ChatModelObservationContext>
    • requestFrequencyPenalty

      protected io.micrometer.common.KeyValues requestFrequencyPenalty(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • requestMaxTokens

      protected io.micrometer.common.KeyValues requestMaxTokens(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • requestPresencePenalty

      protected io.micrometer.common.KeyValues requestPresencePenalty(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • requestStopSequences

      protected io.micrometer.common.KeyValues requestStopSequences(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • requestTemperature

      protected io.micrometer.common.KeyValues requestTemperature(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • requestTopK

      protected io.micrometer.common.KeyValues requestTopK(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • requestTopP

      protected io.micrometer.common.KeyValues requestTopP(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • responseFinishReasons

      protected io.micrometer.common.KeyValues responseFinishReasons(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • responseId

      protected io.micrometer.common.KeyValues responseId(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • usageInputTokens

      protected io.micrometer.common.KeyValues usageInputTokens(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • usageOutputTokens

      protected io.micrometer.common.KeyValues usageOutputTokens(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)
    • usageTotalTokens

      protected io.micrometer.common.KeyValues usageTotalTokens(io.micrometer.common.KeyValues keyValues, ChatModelObservationContext context)