Skip to main content

tool_definition_tokens

Function tool_definition_tokens 

Source
pub fn tool_definition_tokens(model: &str, tools: &[Value]) -> usize
Expand description

Tokens the tool definitions occupy in a request, counted over the same OpenAI function-schema JSON the run attaches to every model call.