# tinker_cookbook.completers.TokensWithLogprobs *Generated from tinker-cookbook at commit [`4a3a282`](https://github.com/thinking-machines-lab/tinker-cookbook/tree/4a3a2829190b45999021e423bc90b7523108edf4). Source links point at that snapshot.* ## *class* [**tinker_cookbook.completers.TokensWithLogprobs**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/completers.py#L22)() A sequence of token IDs with optional log-probabilities and a stop reason. **Fields:** - [**tokens**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/completers.py#L25) (*list[int]*) - [**maybe_logprobs**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/completers.py#L26) (*list[float] | None*) - [**stop_reason**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/completers.py#L27) (*tinker.[StopReason](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/rl/stopreason/index.md)*, default: `'stop'`) - [**sequence_id**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/completers.py#L30) (*str | None*, default: `None`) – https://tinker-docs.thinkingmachines.ai/tinker/datum/#provenance - [**prompt_cache_hit_tokens**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/completers.py#L32) (*int*, default: `0`) – Prompt tokens billed as prefix-cache hits for this sample (SampleResponse.prompt_cache_hit_tokens). ## Referenced by - [tinker_cookbook.completers.TinkerTokenCompleter.__call__](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/completers/tinkertokencompleter/#tinkertokencompleter-call) - [tinker_cookbook.completers.TokenCompleter.__call__](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/completers/tokencompleter/#tokencompleter-call) - [tinker_cookbook.rl.Transition](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/rl/transition/index.md)