Tokens approximates token count as char/4, good enough for budgeting.
(s string)
| 33 | } |
| 34 | |
| 35 | // Tokens approximates token count as char/4, good enough for budgeting. |
| 36 | func Tokens(s string) int { return (len(s) + 3) / 4 } |
| 37 | |
| 38 | func (m Message) Tokens() int { |
no outgoing calls