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.

Diagram

uses

returns

Agent

Tool: estimate_tool_schema_tokens

Result

Signature

python
def estimate_tool_schema_tokens(tools: &[serde_json::Value]) -> usize

Parameters

ParamField &[serde_json::Value]

No description available.

Returns

ResponseField usize

The result of the operation.

Uses

  • unwrap_or_default
  • estimate_tokens_heuristic

Source

View on GitHub

praisonai/src/context/mod.rs at line 344


Related Documentation