Count 计算单个文本的 Token 数量
(ctx context.Context, text string)
| 12 | type TokenCounter interface { |
| 13 | // Count 计算单个文本的 Token 数量 |
| 14 | Count(ctx context.Context, text string) (int, error) |
| 15 | |
| 16 | // CountBatch 批量计算多个文本的 Token 数量 |
| 17 | CountBatch(ctx context.Context, texts []string) ([]int, error) |
no outgoing calls