Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateMessageTokens ¶
EstimateMessageTokens estimates the token count for a single message, including Content, ReasoningContent, ToolCalls arguments, ToolCallID metadata, and Media items. Uses a heuristic of 2.5 characters per token.
func EstimateToolDefsTokens ¶
func EstimateToolDefsTokens(defs []providers.ToolDefinition) int
EstimateToolDefsTokens estimates the total token cost of tool definitions as they appear in the LLM request.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.