1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use ;
/// How many tokens a request/response round trip cost, in whatever detail the
/// provider reports.
///
/// `prompt_tokens` and `completion_tokens` are supported by every provider;
/// the rest are `None` unless the provider you're using reports them.
/// Token accounting for an embeddings call -- kept separate from [`Usage`]
/// rather than reusing it with the other fields left at zero, since embedding
/// billing has no completion, cache, or thinking tokens at all; a type with
/// only the field that applies is clearer than one with four that never do.