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.azure.openai
Methods in org.springframework.ai.azure.openai with parameters of type UsageModifier and TypeMethodDescriptionstatic ChatResponseMetadata
AzureOpenAiChatModel.from
(com.azure.ai.openai.models.ChatCompletions chatCompletions, PromptMetadata promptFilterMetadata, Usage usage) static ChatResponseMetadata
AzureOpenAiChatModel.from
(ChatResponse chatResponse, Usage usage) -
Uses of Usage in org.springframework.ai.chat.metadata
Classes in org.springframework.ai.chat.metadata that implement UsageModifier and TypeClassDescriptionclass
Default implementation of theUsage
interface.class
A EmpytUsage implementation that returns zero for all property gettersMethods in org.springframework.ai.chat.metadata that return UsageModifier and TypeMethodDescriptionstatic Usage
UsageUtils.getCumulativeUsage
(Usage currentUsage, ChatResponse previousChatResponse) Accumulate usage tokens from the previous chat response to the current usage tokens.ChatResponseMetadata.getUsage()
Returns AI provider specific metadata on API usage.Methods in org.springframework.ai.chat.metadata with parameters of type UsageModifier and TypeMethodDescriptionstatic Usage
UsageUtils.getCumulativeUsage
(Usage currentUsage, ChatResponse previousChatResponse) Accumulate usage tokens from the previous chat response to the current usage tokens.static boolean
Check if theUsage
is empty. -
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.mistralai
Methods in org.springframework.ai.mistralai with parameters of type UsageModifier and TypeMethodDescriptionstatic ChatResponseMetadata
MistralAiChatModel.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