public interface Tokenizer
Modifier and Type | Method and Description |
---|---|
default int |
estimateTokenCountInForcefulToolExecutionRequest(ToolExecutionRequest toolExecutionRequest)
Estimates the count of tokens in the given tool execution request.
|
default int |
estimateTokenCountInForcefulToolSpecification(ToolSpecification toolSpecification)
Estimates the count of tokens in the given tool specification.
|
int |
estimateTokenCountInMessage(ChatMessage message)
Estimates the count of tokens in the given message.
|
int |
estimateTokenCountInMessages(Iterable<ChatMessage> messages)
Estimates the count of tokens in the given messages.
|
int |
estimateTokenCountInText(String text)
Estimates the count of tokens in the given text.
|
int |
estimateTokenCountInToolExecutionRequests(Iterable<ToolExecutionRequest> toolExecutionRequests)
Estimates the count of tokens in the given tool execution requests.
|
default int |
estimateTokenCountInTools(Iterable<Object> objectsWithTools)
Estimates the count of tokens in
Tool annotations of the given objects. |
default int |
estimateTokenCountInTools(Object objectWithTools)
Estimates the count of tokens in
Tool annotations of the given object. |
int |
estimateTokenCountInToolSpecifications(Iterable<ToolSpecification> toolSpecifications)
Estimates the count of tokens in the given tool specifications.
|
int estimateTokenCountInText(String text)
text
- the text.int estimateTokenCountInMessage(ChatMessage message)
message
- the message.int estimateTokenCountInMessages(Iterable<ChatMessage> messages)
messages
- the messages.default int estimateTokenCountInTools(Object objectWithTools)
Tool
annotations of the given object.objectWithTools
- the object.default int estimateTokenCountInTools(Iterable<Object> objectsWithTools)
Tool
annotations of the given objects.objectsWithTools
- the objects.int estimateTokenCountInToolSpecifications(Iterable<ToolSpecification> toolSpecifications)
toolSpecifications
- the tool specifications.default int estimateTokenCountInForcefulToolSpecification(ToolSpecification toolSpecification)
toolSpecification
- the tool specification.int estimateTokenCountInToolExecutionRequests(Iterable<ToolExecutionRequest> toolExecutionRequests)
toolExecutionRequests
- the tool execution request.default int estimateTokenCountInForcefulToolExecutionRequest(ToolExecutionRequest toolExecutionRequest)
toolExecutionRequest
- the tool execution request.Copyright © 2024. All rights reserved.