every-other-token (Python)
See how sure an LLM was about every token of its answer. Ask for logprobs,
pass the response to render(), and get an HTML heatmap: green where the
model was confident, amber where it hesitated, red where it was guessing.
Hover a token for its probability, logprob, perplexity and the model's top
alternatives.
from openai import OpenAI
from every_other_token import render
resp = OpenAI().chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Name three moons of Jupiter."}],
logprobs=True,
top_logprobs=5,
)
render(resp) # in Jupyter this displays the heatmap
Works with OpenAI Chat Completions and legacy Completions (SDK objects or
dicts), lists of streamed chunks, vLLM / llama.cpp / LM Studio
(OpenAI-compatible servers) and vLLM's offline RequestOutput. Pure Python,
no dependencies.
From the shell:
eot-py response.json -o heatmap.html
eot-py response.json --format text
Full guide: https://github.com/Mattbusel/Every-Other-Token/blob/main/docs/python.md
This is the Python companion to the every-other-token Rust CLI, which streams live from OpenAI, Anthropic, Gemini, OpenRouter and local models. MIT licensed.
Metadata
Release files for every-other-token 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| every_other_token-0.1.0.tar.gz | 15.3 kB | With provenance | Details for every_other_token-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| every_other_token-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for every_other_token-0.1.0-py3-none-any.whl |
Total release size: 29.1 kB
Release files / every_other_token-0.1.0.tar.gz
| Download URL | every_other_token-0.1.0.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66c06ef9e6fc379b1365b4578c2205bd291478c6af1b46016a29e00b3ba00171
|
|
BLAKE2b-256 checksum How to use checksums |
78e5b87fe872a5461e51d8e70168291b2b02f5f7190147dc9bbf2938395ed687
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logRelease files / every_other_token-0.1.0-py3-none-any.whl
| Download URL | every_other_token-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d45ea9527c9d1243f07f2a387448266cf5c89c8ca13b6cfd3ffadd39865c9c0d
|
|
BLAKE2b-256 checksum How to use checksums |
bfea385409c9cdf2b41a016d1d82398c22d836b88104a454fd46e4932bfd3731
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logSecurity for every-other-token 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for every_other_token-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.