Skip to main content

estimate_tool_schema_tokens

Function
This function is defined in the context module.
Estimate tokens for tool schemas.

Signature

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

Parameters

tools
&
required
No description available.

Returns

Returns
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