Estimate Messages • AI Agent SDK

estimate_messages: Estimate tokens for a list of messages.

estimate_messages

Method

</div>

This is a method of the TokenEstimator class in the models module.

Estimate tokens for a list of messages.

Signature

python
def estimate_messages(messages: List[Dict[str, Any]]) -> int

Parameters

ParamField List

No description available.

Returns

ResponseField int

The result of the operation.

Source

View on GitHub

praisonaiagents/context/models.py at line 457