Uses of Class
dev.langchain4j.model.output.TokenUsage
Package
Description
-
Uses of TokenUsage in dev.langchain4j.model.anthropic
-
Uses of TokenUsage in dev.langchain4j.model.anthropic.internal.mapper
Modifier and TypeMethodDescriptionstatic TokenUsage
AnthropicMapper.toTokenUsage
(AnthropicUsage anthropicUsage) -
Uses of TokenUsage in dev.langchain4j.model.bedrock
Modifier and TypeMethodDescriptionBedrockAI21LabsChatModelResponse.getTokenUsage()
BedrockAnthropicCompletionChatModelResponse.getTokenUsage()
BedrockAnthropicMessageChatModelResponse.getTokenUsage()
BedrockCohereChatModelResponse.getTokenUsage()
BedrockLlamaChatModelResponse.getTokenUsage()
BedrockStabilityAIChatModelResponse.getTokenUsage()
BedrockTitanChatModelResponse.getTokenUsage()
-
Uses of TokenUsage in dev.langchain4j.model.bedrock.internal
-
Uses of TokenUsage in dev.langchain4j.model.chat.listener
Modifier and TypeMethodDescriptionChatModelResponse.ChatModelResponseBuilder.tokenUsage
(TokenUsage tokenUsage) ModifierConstructorDescriptionChatModelResponse
(String id, String model, TokenUsage tokenUsage, FinishReason finishReason, AiMessage aiMessage) -
Uses of TokenUsage in dev.langchain4j.model.chat.response
-
Uses of TokenUsage in dev.langchain4j.model.mistralai.internal.mapper
Modifier and TypeMethodDescriptionstatic TokenUsage
MistralAiMapper.tokenUsageFrom
(MistralAiUsage mistralAiUsage) -
Uses of TokenUsage in dev.langchain4j.model.openai
Modifier and TypeMethodDescriptionstatic TokenUsage
InternalOpenAiHelper.tokenUsageFrom
(dev.ai4j.openai4j.shared.Usage openAiUsage) -
Uses of TokenUsage in dev.langchain4j.model.output
Modifier and TypeMethodDescriptionTokenUsage.add
(TokenUsage that) Adds the token usage of two responses together.static TokenUsage
TokenUsage.sum
(TokenUsage first, TokenUsage second) Adds two token usages.Response.tokenUsage()
Get the token usage statistics.Modifier and TypeMethodDescriptionTokenUsage.add
(TokenUsage that) Adds the token usage of two responses together.static <T> @NonNull Response
<T> Response.from
(@NonNull T content, TokenUsage tokenUsage) Create a new Response.static <T> @NonNull Response
<T> Response.from
(@NonNull T content, TokenUsage tokenUsage, FinishReason finishReason) Create a new Response.static <T> @NonNull Response
<T> Response.from
(@NonNull T content, TokenUsage tokenUsage, FinishReason finishReason, @Nullable Map<String, Object> metadata) Create a new Response.static TokenUsage
TokenUsage.sum
(TokenUsage first, TokenUsage second) Adds two token usages.ModifierConstructorDescriptionResponse
(@NonNull T content, TokenUsage tokenUsage, FinishReason finishReason) Create a new Response.Response
(@NonNull T content, TokenUsage tokenUsage, FinishReason finishReason, @Nullable Map<String, Object> metadata) Create a new Response. -
Uses of TokenUsage in dev.langchain4j.service
ModifierConstructorDescriptionResult
(T content, TokenUsage tokenUsage, List<Content> sources, FinishReason finishReason, List<ToolExecution> toolExecutions) -
Uses of TokenUsage in dev.langchain4j.store.embedding