Uses of Interface
org.springframework.ai.chat.metadata.Usage
Packages that use Usage
Package
Description
Provides the API for embedding observations.
Provides classes for observing model data.
-
Uses of Usage in org.springframework.ai.bedrock.converse.api
Constructors in org.springframework.ai.bedrock.converse.api with parameters of type UsageModifierConstructorDescriptionConverseChatResponseStream(software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeAsyncClient bedrockRuntimeAsyncClient, software.amazon.awssdk.services.bedrockruntime.model.ConverseStreamRequest converseStreamRequest, @Nullable Usage accumulatedUsage) -
Uses of Usage in org.springframework.ai.chat.metadata
Classes in org.springframework.ai.chat.metadata that implement UsageModifier and TypeClassDescriptionclassDefault implementation of theUsageinterface.classA EmptyUsage implementation that returns zero for all property gettersMethods in org.springframework.ai.chat.metadata that return UsageModifier and TypeMethodDescriptionChatResponseMetadata.getUsage()Returns AI provider specific metadata on API usage.Methods in org.springframework.ai.chat.metadata with parameters of type UsageModifier and TypeMethodDescription -
Uses of Usage in org.springframework.ai.chat.model
Classes in org.springframework.ai.chat.model that implement Usage -
Uses of Usage in org.springframework.ai.embedding
Methods in org.springframework.ai.embedding that return UsageModifier and TypeMethodDescriptionEmbeddingResponseMetadata.getUsage()The AI provider specific metadata on API usage.Methods in org.springframework.ai.embedding with parameters of type UsageConstructors in org.springframework.ai.embedding with parameters of type Usage -
Uses of Usage in org.springframework.ai.google.genai.metadata
Classes in org.springframework.ai.google.genai.metadata that implement UsageModifier and TypeClassDescriptionclassExtended usage metadata for Google GenAI responses that includes thinking tokens, cached content, tool-use tokens, and modality breakdowns. -
Uses of Usage in org.springframework.ai.image
Methods in org.springframework.ai.image that return UsageModifier and TypeMethodDescriptionImageResponseMetadata.getUsage()Return the token usage associated with the image response.Methods in org.springframework.ai.image with parameters of type UsageModifier and TypeMethodDescriptionvoidSet the token usage associated with the image response.Constructors in org.springframework.ai.image with parameters of type UsageModifierConstructorDescriptionImageResponseMetadata(Long created, Usage usage) Create a newImageResponseMetadata. -
Uses of Usage in org.springframework.ai.mistralai
Methods in org.springframework.ai.mistralai with parameters of type UsageModifier and TypeMethodDescriptionstatic ChatResponseMetadataMistralAiChatModel.from(MistralAiApi.ChatCompletion result, Usage usage) -
Uses of Usage in org.springframework.ai.model.observation
Methods in org.springframework.ai.model.observation with parameters of type Usage -
Uses of Usage in org.springframework.ai.support
Methods in org.springframework.ai.support that return UsageModifier and TypeMethodDescriptionstatic UsageUsageCalculator.getCumulativeUsage(Usage currentUsage, @Nullable ChatResponse previousChatResponse) Accumulate usage tokens from the previous chat response to the current usage tokens.Methods in org.springframework.ai.support with parameters of type UsageModifier and TypeMethodDescriptionstatic UsageUsageCalculator.getCumulativeUsage(Usage currentUsage, @Nullable ChatResponse previousChatResponse) Accumulate usage tokens from the previous chat response to the current usage tokens.static booleanCheck if theUsageis empty.static ChatResponseUsageCalculator.withUsage(ChatResponse chatResponse, Usage usage) Returns a copy of the given chat response with its usage replaced by the providedUsage, preserving all other response metadata.