Estimate Tool Schema Tokens • Rust AI Agent SDK
estimate_tool_schema_tokens: Estimate tokens for tool schemas.
estimate_tool_schema_tokens
Function
</div>
This function is defined in the context module.
Estimate tokens for tool schemas.
Signature
def estimate_tool_schema_tokens(tools: &[serde_json::Value]) -> usizeParameters
ParamField
&[serde_json::Value]No description available.
Returns
ResponseField
usizeThe result of the operation.
Uses
unwrap_or_defaultestimate_tokens_heuristic
Source
View on GitHubpraisonai/src/context/mod.rs at line 344