Spaces:
Running
Running
Link the demo's trace to exact lines of code
#2
by lewtun HF Staff - opened
- README.md +11 -7
- build/build_bundle.py +10 -4
- index.html +34 -7
- pybot-24cbc0439e07.zip → pybot-24cbc0439e07-c4076a39.zip +2 -2
- pybot_web.py +81 -18
- tree.json +1 -1
- worker.js +1 -1
README.md
CHANGED
|
@@ -20,11 +20,15 @@ only serves files. Each reply shows which of PyBot's modules and files produced
|
|
| 20 |
- `worker.js`: loads Pyodide 314.0.7 from jsDelivr and the bot bundle, then answers turns. Like transformers.js does
|
| 21 |
for model files, it keeps the bundle in Cache Storage, so a second visit doesn't download it again.
|
| 22 |
- `pybot_web.py`: the glue: fixed random seeds as in the benchmark's eval server (so replies match the leaderboard run),
|
| 23 |
-
the trace via `sys.monitoring`, and the
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
| 26 |
It is built from the same code as `bot/` in the GitHub repo.
|
| 27 |
-
- `tree.json`: PyBot's files and line counts for the treemap, and the repo
|
|
|
|
|
|
|
| 28 |
- `Dockerfile`: only serves the files above (`python -m http.server`). A static Space would redirect the large files to a
|
| 29 |
CDN without CORS headers, which blocks the worker's fetch of the bundle and the fonts.
|
| 30 |
|
|
@@ -33,8 +37,8 @@ only serves files. Each reply shows which of PyBot's modules and files produced
|
|
| 33 |
```sh
|
| 34 |
git clone https://github.com/huggingface/pybot && (cd pybot && zip -qr ../bot-src.zip bot -i '*.py')
|
| 35 |
npm install pyodide@314.0.7 # the same version as worker.js: bytecode only loads in the Python that compiled it
|
| 36 |
-
node build/build.mjs bot-src.zip build/build_bundle.py pybot-<sha12>.zip
|
| 37 |
```
|
| 38 |
|
| 39 |
-
Then regenerate `tree.json` (`[path, line count]` for every `bot/**.py`
|
| 40 |
-
name makes browsers download the new bundle). To test locally, serve this folder (`python -m http.server`) and open it.
|
|
|
|
| 20 |
- `worker.js`: loads Pyodide 314.0.7 from jsDelivr and the bot bundle, then answers turns. Like transformers.js does
|
| 21 |
for model files, it keeps the bundle in Cache Storage, so a second visit doesn't download it again.
|
| 22 |
- `pybot_web.py`: the glue: fixed random seeds as in the benchmark's eval server (so replies match the leaderboard run),
|
| 23 |
+
the trace via `sys.monitoring` (each function the winner runs, with its line range, and the lines of the winner's
|
| 24 |
+
own `respond()`), and the file and line that hold a reply's text.
|
| 25 |
+
- `pybot-<sha12>-<hash>.zip`: `bot/**.pyc` compiled for Pyodide's CPython 3.14 (loading skips compiling the source),
|
| 26 |
+
plus `norm.json` (each file's text, letters and digits only) for finding the file that holds a reply, and
|
| 27 |
+
`lines.json` (how many of those each line has) for turning that into a line number.
|
| 28 |
It is built from the same code as `bot/` in the GitHub repo.
|
| 29 |
+
- `tree.json`: PyBot's files and line counts for the treemap, and the GitHub repo and commit its links open. Links go
|
| 30 |
+
to exact lines (the reply's text, the winner's `respond()`, the first function the winner ran in a file), so `ref` is
|
| 31 |
+
a commit, not `main`: line numbers would drift as soon as `main` changes.
|
| 32 |
- `Dockerfile`: only serves the files above (`python -m http.server`). A static Space would redirect the large files to a
|
| 33 |
CDN without CORS headers, which blocks the worker's fetch of the bundle and the fonts.
|
| 34 |
|
|
|
|
| 37 |
```sh
|
| 38 |
git clone https://github.com/huggingface/pybot && (cd pybot && zip -qr ../bot-src.zip bot -i '*.py')
|
| 39 |
npm install pyodide@314.0.7 # the same version as worker.js: bytecode only loads in the Python that compiled it
|
| 40 |
+
node build/build.mjs bot-src.zip build/build_bundle.py pybot-<sha12>.zip # then add the first 8 hex of its sha256
|
| 41 |
```
|
| 42 |
|
| 43 |
+
Then regenerate `tree.json` (`[path, line count]` for every `bot/**.py`, and `ref` set to the GitHub commit you
|
| 44 |
+
cloned) and update `BUNDLE` in `worker.js` (a new name makes browsers download the new bundle). To test locally, serve this folder (`python -m http.server`) and open it.
|
build/build_bundle.py
CHANGED
|
@@ -2,9 +2,11 @@
|
|
| 2 |
|
| 3 |
In: /in/bot/**.py (the bot at one commit)
|
| 4 |
Out: /out/pybot.zip with
|
| 5 |
-
- bot/**.pyc sourceless bytecode for this Pyodide's CPython (imports skip compiling
|
| 6 |
co_filename kept as /pybot/bot/<path>.py so the trace still names the right files;
|
| 7 |
-
- norm.json every file's text, letters and digits only, for finding the file that holds a reply
|
|
|
|
|
|
|
| 8 |
"""
|
| 9 |
import json
|
| 10 |
import os
|
|
@@ -13,7 +15,8 @@ import re
|
|
| 13 |
import zipfile
|
| 14 |
|
| 15 |
SRC, OUT = "/in", "/out"
|
| 16 |
-
|
|
|
|
| 17 |
with zipfile.ZipFile(f"{OUT}/pybot.zip", "w", zipfile.ZIP_DEFLATED, compresslevel=9) as bundle:
|
| 18 |
for dirpath, _, names in sorted(os.walk(f"{SRC}/bot")):
|
| 19 |
for name in sorted(names):
|
|
@@ -25,6 +28,9 @@ with zipfile.ZipFile(f"{OUT}/pybot.zip", "w", zipfile.ZIP_DEFLATED, compressleve
|
|
| 25 |
invalidation_mode=py_compile.PycInvalidationMode.UNCHECKED_HASH)
|
| 26 |
bundle.write(pyc, rel + "c")
|
| 27 |
with open(path, encoding="utf-8", errors="replace") as handle:
|
| 28 |
-
|
|
|
|
|
|
|
| 29 |
bundle.writestr("norm.json", json.dumps(norm, separators=(",", ":")))
|
|
|
|
| 30 |
print(json.dumps({"files": len(norm), "bytes": os.path.getsize(f"{OUT}/pybot.zip")}))
|
|
|
|
| 2 |
|
| 3 |
In: /in/bot/**.py (the bot at one commit)
|
| 4 |
Out: /out/pybot.zip with
|
| 5 |
+
- bot/**.pyc sourceless bytecode for this Pyodide's CPython (imports skip compiling the source),
|
| 6 |
co_filename kept as /pybot/bot/<path>.py so the trace still names the right files;
|
| 7 |
+
- norm.json every file's text, letters and digits only, for finding the file that holds a reply;
|
| 8 |
+
- lines.json for every file, how many of those letters and digits each line has, for turning a match
|
| 9 |
+
in norm.json into a line number.
|
| 10 |
"""
|
| 11 |
import json
|
| 12 |
import os
|
|
|
|
| 15 |
import zipfile
|
| 16 |
|
| 17 |
SRC, OUT = "/in", "/out"
|
| 18 |
+
keep = lambda s: re.sub(r"[^a-z0-9]", "", s.lower())
|
| 19 |
+
norm, lines = {}, {}
|
| 20 |
with zipfile.ZipFile(f"{OUT}/pybot.zip", "w", zipfile.ZIP_DEFLATED, compresslevel=9) as bundle:
|
| 21 |
for dirpath, _, names in sorted(os.walk(f"{SRC}/bot")):
|
| 22 |
for name in sorted(names):
|
|
|
|
| 28 |
invalidation_mode=py_compile.PycInvalidationMode.UNCHECKED_HASH)
|
| 29 |
bundle.write(pyc, rel + "c")
|
| 30 |
with open(path, encoding="utf-8", errors="replace") as handle:
|
| 31 |
+
text = handle.read()
|
| 32 |
+
norm[rel] = keep(text)
|
| 33 |
+
lines[rel] = [len(keep(line)) for line in text.splitlines(keepends=True)]
|
| 34 |
bundle.writestr("norm.json", json.dumps(norm, separators=(",", ":")))
|
| 35 |
+
bundle.writestr("lines.json", json.dumps(lines, separators=(",", ":")))
|
| 36 |
print(json.dumps({"files": len(norm), "bytes": os.path.getsize(f"{OUT}/pybot.zip")}))
|
index.html
CHANGED
|
@@ -48,7 +48,8 @@
|
|
| 48 |
input:focus-visible, button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
|
| 49 |
#why { font:14px/1.5 var(--mono); color:var(--mute); min-height:63px; padding:10px 14px; border-bottom:1px solid var(--hair); }
|
| 50 |
.trace { overflow:hidden; }
|
| 51 |
-
#why b { color:var(--ink); }
|
|
|
|
| 52 |
#map { flex:1; min-height:0; width:100%; }
|
| 53 |
.legend { display:flex; flex-wrap:wrap; gap:6px 18px; font:13px var(--mono); color:var(--mute); padding:8px 14px 12px; border-top:1px solid var(--hair); }
|
| 54 |
.legend i { display:inline-block; width:16px; height:12px; vertical-align:-1px; margin-right:6px; border:1px solid var(--ink); }
|
|
@@ -151,7 +152,19 @@ function done() { q.disabled = send.disabled = false; q.focus({preventScroll:tru
|
|
| 151 |
|
| 152 |
// ---- the file map ----
|
| 153 |
let TREE = null, dirs, ids, labels, parents, values, last = null; // last: the last reply's trace
|
| 154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
function roleOf(id) {
|
| 156 |
if (!last || dirs.has(id)) return null;
|
| 157 |
const mod = (m) => `bot/modules/${m}.py`;
|
|
@@ -167,8 +180,12 @@ function draw() {
|
|
| 167 |
const colors = ids.map((id, i) => dirs.has(id) ? PAPER : !last ? OFF : {won: WIN, text: INK, used: USED, proposed: PAPER, off: OFF}[roles[i]]);
|
| 168 |
const widths = roles.map((r) => (r === "won" || r === "proposed" ? 3 : 1));
|
| 169 |
const lines = ids.map((id, i) => (dirs.has(id) ? INK : roles[i] === "won" || roles[i] === "proposed" || roles[i] === "text" ? INK : roles[i] === "used" ? PAPER : FAINT));
|
| 170 |
-
const hover = roles.map((r) =>
|
| 171 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
Plotly.react("map", [{type:"treemap", ids, labels, parents, values, branchvalues:"total", maxdepth:3,
|
| 173 |
marker:{colors, line:{color:lines, width:widths}}, customdata:hover,
|
| 174 |
pathbar:{visible:true, thickness:22, textfont:{family:MONO, size:12, color:INK}},
|
|
@@ -188,7 +205,13 @@ fetch("tree.json").then((r) => r.json()).then((tree) => {
|
|
| 188 |
parents = ids.map((id) => (id.includes("/") ? id.slice(0, id.lastIndexOf("/")) : ""));
|
| 189 |
values = [...dirs.values(), ...TREE.files.map(([, n]) => n)];
|
| 190 |
draw();
|
| 191 |
-
$("map").on("plotly_treemapclick", (ev) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
});
|
| 193 |
|
| 194 |
// ---- the chat ----
|
|
@@ -197,8 +220,12 @@ function explain(t) {
|
|
| 197 |
const ms = ` · ${t.ms < 1000 ? `${t.ms} ms` : `${(t.ms / 1000).toFixed(1)} s`}`;
|
| 198 |
if (!t.module) return "No module had a reply, so PyBot fell back to its default line." + ms;
|
| 199 |
const others = t.candidates.filter((m) => m !== t.module);
|
| 200 |
-
|
| 201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
}
|
| 203 |
function welcome(text) {
|
| 204 |
log.innerHTML = "";
|
|
|
|
| 48 |
input:focus-visible, button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
|
| 49 |
#why { font:14px/1.5 var(--mono); color:var(--mute); min-height:63px; padding:10px 14px; border-bottom:1px solid var(--hair); }
|
| 50 |
.trace { overflow:hidden; }
|
| 51 |
+
#why b, #why a { color:var(--ink); font-weight:700; }
|
| 52 |
+
#why a { text-decoration:underline; text-underline-offset:2px; }
|
| 53 |
#map { flex:1; min-height:0; width:100%; }
|
| 54 |
.legend { display:flex; flex-wrap:wrap; gap:6px 18px; font:13px var(--mono); color:var(--mute); padding:8px 14px 12px; border-top:1px solid var(--hair); }
|
| 55 |
.legend i { display:inline-block; width:16px; height:12px; vertical-align:-1px; margin-right:6px; border:1px solid var(--ink); }
|
|
|
|
| 152 |
|
| 153 |
// ---- the file map ----
|
| 154 |
let TREE = null, dirs, ids, labels, parents, values, last = null; // last: the last reply's trace
|
| 155 |
+
// A file on GitHub at the bot's commit, optionally at a line or a range of lines.
|
| 156 |
+
const url = (p, from, to) => `${TREE.url}/blob/${TREE.ref}/${p}` + (from ? `#L${from}` + (to && to !== from ? `-L${to}` : "") : "");
|
| 157 |
+
const fmt = (n) => n.toLocaleString("en-US");
|
| 158 |
+
const span = (from, to) => (to && to !== from ? `lines ${fmt(from)}–${fmt(to)}` : `line ${fmt(from)}`);
|
| 159 |
+
// Where a click on a file should land for the last reply: the reply's text, the winner's respond(), or the first
|
| 160 |
+
// function the winner ran in that file. [from, to, what] or null for the whole file.
|
| 161 |
+
function target(id) {
|
| 162 |
+
if (!last) return null;
|
| 163 |
+
if (id === last.source && last.source_line) return [last.source_line, last.source_line, "the reply's text"];
|
| 164 |
+
if (last.respond && id === last.respond[0] && id === `bot/modules/${last.module}.py`) return [last.respond[1], last.respond[2], "respond()"];
|
| 165 |
+
const first = (last.calls || {})[id]?.[0];
|
| 166 |
+
return first ? [first[0], first[1], `${first[2].split(".").pop()}()`] : null;
|
| 167 |
+
}
|
| 168 |
function roleOf(id) {
|
| 169 |
if (!last || dirs.has(id)) return null;
|
| 170 |
const mod = (m) => `bot/modules/${m}.py`;
|
|
|
|
| 180 |
const colors = ids.map((id, i) => dirs.has(id) ? PAPER : !last ? OFF : {won: WIN, text: INK, used: USED, proposed: PAPER, off: OFF}[roles[i]]);
|
| 181 |
const widths = roles.map((r) => (r === "won" || r === "proposed" ? 3 : 1));
|
| 182 |
const lines = ids.map((id, i) => (dirs.has(id) ? INK : roles[i] === "won" || roles[i] === "proposed" || roles[i] === "text" ? INK : roles[i] === "used" ? PAPER : FAINT));
|
| 183 |
+
const hover = roles.map((r, i) => {
|
| 184 |
+
const base = {won: "won: its reply was used", text: "holds the reply's text", used: "called by the winner",
|
| 185 |
+
proposed: "also proposed a reply", off: "not used for this reply"}[r] || "";
|
| 186 |
+
const t = r && r !== "off" && r !== "proposed" ? target(ids[i]) : null;
|
| 187 |
+
return t ? `${base}<br>click: ${t[2]}, ${span(t[0], t[1])}` : base;
|
| 188 |
+
});
|
| 189 |
Plotly.react("map", [{type:"treemap", ids, labels, parents, values, branchvalues:"total", maxdepth:3,
|
| 190 |
marker:{colors, line:{color:lines, width:widths}}, customdata:hover,
|
| 191 |
pathbar:{visible:true, thickness:22, textfont:{family:MONO, size:12, color:INK}},
|
|
|
|
| 205 |
parents = ids.map((id) => (id.includes("/") ? id.slice(0, id.lastIndexOf("/")) : ""));
|
| 206 |
values = [...dirs.values(), ...TREE.files.map(([, n]) => n)];
|
| 207 |
draw();
|
| 208 |
+
$("map").on("plotly_treemapclick", (ev) => {
|
| 209 |
+
const id = ev.points[0].id;
|
| 210 |
+
if (dirs.has(id)) return;
|
| 211 |
+
const t = target(id);
|
| 212 |
+
window.open(t ? url(id, t[0], t[1]) : url(id), "_blank", "noopener");
|
| 213 |
+
return false;
|
| 214 |
+
});
|
| 215 |
});
|
| 216 |
|
| 217 |
// ---- the chat ----
|
|
|
|
| 220 |
const ms = ` · ${t.ms < 1000 ? `${t.ms} ms` : `${(t.ms / 1000).toFixed(1)} s`}`;
|
| 221 |
if (!t.module) return "No module had a reply, so PyBot fell back to its default line." + ms;
|
| 222 |
const others = t.candidates.filter((m) => m !== t.module);
|
| 223 |
+
const link = (text, p, from, to) => `<a href="${url(p, from, to)}" target="_blank" rel="noopener">${text}</a>`;
|
| 224 |
+
const winner = t.respond ? link(t.module, t.respond[0], t.respond[1], t.respond[2]) : `<b>${t.module}</b>`;
|
| 225 |
+
const where = t.source && (t.source_line ? link(`${t.source.replace("bot/", "")}, line ${fmt(t.source_line)}`, t.source, t.source_line)
|
| 226 |
+
: link(t.source.replace("bot/", ""), t.source));
|
| 227 |
+
return `${winner} won${others.length ? ` over ${others.map((m) => `<b>${m}</b>`).join(", ")}` : " (the only module with a reply)"}`
|
| 228 |
+
+ ` · it called <b>${t.files.length}</b> files` + (where ? ` · the reply's text is in ${where}` : "") + ms;
|
| 229 |
}
|
| 230 |
function welcome(text) {
|
| 231 |
log.innerHTML = "";
|
pybot-24cbc0439e07.zip → pybot-24cbc0439e07-c4076a39.zip
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c4076a392910f6e2b27277d90198ab07ac869f09d75d6c100caefa52d0917bda
|
| 3 |
+
size 22154766
|
pybot_web.py
CHANGED
|
@@ -4,8 +4,9 @@ Ported from the PyBot Space's server (bot_runner.py's LOADER and traced(), app.p
|
|
| 4 |
- Random seeds are fixed the way the eval server fixes them, so replies match the benchmark run as
|
| 5 |
closely as a browser allows. The server forks a fresh worker per request; here `reset()` restores the
|
| 6 |
just-loaded random state and starts a new memory instead.
|
| 7 |
-
- For each reply: the module that won, the ones that also proposed a reply,
|
| 8 |
-
|
|
|
|
| 9 |
"""
|
| 10 |
import json
|
| 11 |
import os
|
|
@@ -21,8 +22,11 @@ _norm = lambda s: re.sub(r"[^a-z0-9]", "", s.lower())
|
|
| 21 |
_rt = None
|
| 22 |
_loaded_state = None
|
| 23 |
_memory = {}
|
| 24 |
-
_files = {}
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
def load():
|
|
@@ -45,18 +49,56 @@ def load():
|
|
| 45 |
_rt = rt
|
| 46 |
_loaded_state = random.getstate()
|
| 47 |
_watch_handlers()
|
| 48 |
-
return {"load_s": round(time.monotonic() - started, 2), "modules": len(rt._MODULES), "handlers": len(rt._HANDLERS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
def _watch_handlers():
|
| 52 |
-
"""Wrap every respond() so a turn records the bot files each handler called."""
|
| 53 |
mon, tool = sys.monitoring, 5
|
| 54 |
-
|
| 55 |
mon.use_tool_id(tool, "pybot-trace")
|
| 56 |
|
| 57 |
def start(code, offset):
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
return mon.DISABLE
|
| 61 |
|
| 62 |
mon.register_callback(tool, mon.events.PY_START, start)
|
|
@@ -70,9 +112,13 @@ def _watch_handlers():
|
|
| 70 |
return respond(text, mem)
|
| 71 |
finally:
|
| 72 |
mon.set_events(tool, 0)
|
| 73 |
-
_files[name] =
|
| 74 |
return run
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
_rt._HANDLERS = [(name, priority, watch(name, respond)) for name, priority, respond in _rt._HANDLERS]
|
| 77 |
|
| 78 |
|
|
@@ -84,7 +130,9 @@ def reset():
|
|
| 84 |
|
| 85 |
|
| 86 |
def turn(text):
|
| 87 |
-
"""One reply as JSON: {"reply", "module", "candidates", "files", "source", "ms"}.
|
|
|
|
|
|
|
| 88 |
text = " ".join(str(text).split())
|
| 89 |
_files.clear()
|
| 90 |
started = time.monotonic()
|
|
@@ -96,19 +144,24 @@ def turn(text):
|
|
| 96 |
reply = "Hello!"
|
| 97 |
ms = round((time.monotonic() - started) * 1000)
|
| 98 |
module = decision.get("module")
|
| 99 |
-
|
|
|
|
|
|
|
| 100 |
return json.dumps({"reply": reply, "module": module,
|
| 101 |
"candidates": [c["module"] for c in decision.get("candidates", [])],
|
| 102 |
-
"files": files, "
|
|
|
|
| 103 |
|
| 104 |
|
| 105 |
def answer_source(reply, used):
|
| 106 |
-
"""
|
| 107 |
-
None when the reply is composed, too short, or found in several files."""
|
| 108 |
-
global _sources
|
| 109 |
-
if _sources is None: #
|
| 110 |
with open(os.path.join(ROOT, "norm.json"), encoding="utf-8") as handle:
|
| 111 |
_sources = json.load(handle)
|
|
|
|
|
|
|
| 112 |
text = _norm(reply)
|
| 113 |
for n in (60, 40):
|
| 114 |
key = text[:n]
|
|
@@ -117,5 +170,15 @@ def answer_source(reply, used):
|
|
| 117 |
hits = [f for f, body in _sources.items() if key in body]
|
| 118 |
hits = hits if len(hits) == 1 else [f for f in hits if f in used]
|
| 119 |
if len(hits) == 1:
|
| 120 |
-
return hits[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
return None
|
|
|
|
| 4 |
- Random seeds are fixed the way the eval server fixes them, so replies match the benchmark run as
|
| 5 |
closely as a browser allows. The server forks a fresh worker per request; here `reset()` restores the
|
| 6 |
just-loaded random state and starts a new memory instead.
|
| 7 |
+
- For each reply: the module that won (and the lines of its respond()), the ones that also proposed a reply,
|
| 8 |
+
the bot files and functions the winner called with their line ranges (sys.monitoring, one PY_START event
|
| 9 |
+
per function), and the file and line holding the reply's text.
|
| 10 |
"""
|
| 11 |
import json
|
| 12 |
import os
|
|
|
|
| 22 |
_rt = None
|
| 23 |
_loaded_state = None
|
| 24 |
_memory = {}
|
| 25 |
+
_files = {} # handler name -> {file: [[first line, last line, function name], ...]} for the last turn
|
| 26 |
+
_responds = {} # handler name -> [file, first line, last line] of its respond()
|
| 27 |
+
_sources = None # file -> its text, letters and digits only (norm.json)
|
| 28 |
+
_lines = None # file -> letters and digits on each line (lines.json)
|
| 29 |
+
_MAX_CALLS = 40 # functions listed per file; the first one called is what a click opens
|
| 30 |
|
| 31 |
|
| 32 |
def load():
|
|
|
|
| 49 |
_rt = rt
|
| 50 |
_loaded_state = random.getstate()
|
| 51 |
_watch_handlers()
|
| 52 |
+
return {"load_s": round(time.monotonic() - started, 2), "modules": len(rt._MODULES), "handlers": len(rt._HANDLERS),
|
| 53 |
+
"responds_found": len(_responds)}
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
def _span(code):
|
| 57 |
+
"""[file, first line, last line] of a code object in the bot, or None."""
|
| 58 |
+
bot_dir = os.path.join(ROOT, "bot") + os.sep
|
| 59 |
+
if not code.co_filename.startswith(bot_dir):
|
| 60 |
+
return None
|
| 61 |
+
last = max((line for _, _, line in code.co_lines() if line), default=code.co_firstlineno)
|
| 62 |
+
return ["bot/" + code.co_filename[len(bot_dir):], code.co_firstlineno, last]
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
def _own_respond(name, respond):
|
| 66 |
+
"""[file, first, last] of the respond() written in bot/modules/<name>.py. Many handlers are wrapped by decorators
|
| 67 |
+
from other bot files, so look through __wrapped__ and closures (breadth first, a few levels) for it."""
|
| 68 |
+
want = f"bot/modules/{name}.py"
|
| 69 |
+
queue, seen = [respond], set()
|
| 70 |
+
while queue and len(seen) < 50:
|
| 71 |
+
fn = queue.pop(0)
|
| 72 |
+
if id(fn) in seen:
|
| 73 |
+
continue
|
| 74 |
+
seen.add(id(fn))
|
| 75 |
+
code = getattr(fn, "__code__", None)
|
| 76 |
+
span = _span(code) if code else None
|
| 77 |
+
if span and span[0] == want:
|
| 78 |
+
return span
|
| 79 |
+
queue += [x for x in [getattr(fn, "__wrapped__", None)] if callable(x)]
|
| 80 |
+
for cell in getattr(fn, "__closure__", None) or ():
|
| 81 |
+
try:
|
| 82 |
+
if callable(cell.cell_contents):
|
| 83 |
+
queue.append(cell.cell_contents)
|
| 84 |
+
except ValueError: # an empty cell
|
| 85 |
+
pass
|
| 86 |
+
return None
|
| 87 |
|
| 88 |
|
| 89 |
def _watch_handlers():
|
| 90 |
+
"""Wrap every respond() so a turn records the bot files and functions each handler called."""
|
| 91 |
mon, tool = sys.monitoring, 5
|
| 92 |
+
seen = {} # file -> [[first, last, name], ...] in the order the functions first ran
|
| 93 |
mon.use_tool_id(tool, "pybot-trace")
|
| 94 |
|
| 95 |
def start(code, offset):
|
| 96 |
+
span = _span(code)
|
| 97 |
+
if span:
|
| 98 |
+
calls = seen.setdefault(span[0], [])
|
| 99 |
+
# module-level code (a lazy import) marks the file as used but has no function to point at
|
| 100 |
+
if code.co_name != "<module>" and len(calls) < _MAX_CALLS:
|
| 101 |
+
calls.append([span[1], span[2], code.co_qualname])
|
| 102 |
return mon.DISABLE
|
| 103 |
|
| 104 |
mon.register_callback(tool, mon.events.PY_START, start)
|
|
|
|
| 112 |
return respond(text, mem)
|
| 113 |
finally:
|
| 114 |
mon.set_events(tool, 0)
|
| 115 |
+
_files[name] = {f: list(calls) for f, calls in seen.items()}
|
| 116 |
return run
|
| 117 |
|
| 118 |
+
for name, _, respond in _rt._HANDLERS:
|
| 119 |
+
span = _own_respond(name, respond)
|
| 120 |
+
if span:
|
| 121 |
+
_responds[name] = span
|
| 122 |
_rt._HANDLERS = [(name, priority, watch(name, respond)) for name, priority, respond in _rt._HANDLERS]
|
| 123 |
|
| 124 |
|
|
|
|
| 130 |
|
| 131 |
|
| 132 |
def turn(text):
|
| 133 |
+
"""One reply as JSON: {"reply", "module", "candidates", "files", "calls", "respond", "source", "source_line", "ms"}.
|
| 134 |
+
files: the bot files the winner called; calls: {file: [[first line, last line, function], ...]};
|
| 135 |
+
respond: [file, first line, last line] of the winner's respond(); source_line: 1-based."""
|
| 136 |
text = " ".join(str(text).split())
|
| 137 |
_files.clear()
|
| 138 |
started = time.monotonic()
|
|
|
|
| 144 |
reply = "Hello!"
|
| 145 |
ms = round((time.monotonic() - started) * 1000)
|
| 146 |
module = decision.get("module")
|
| 147 |
+
calls = _files.get(module, {}) if module else {}
|
| 148 |
+
files = sorted(calls)
|
| 149 |
+
source, source_line = answer_source(reply, files)
|
| 150 |
return json.dumps({"reply": reply, "module": module,
|
| 151 |
"candidates": [c["module"] for c in decision.get("candidates", [])],
|
| 152 |
+
"files": files, "calls": calls, "respond": _responds.get(module) if module else None,
|
| 153 |
+
"source": source, "source_line": source_line, "ms": ms})
|
| 154 |
|
| 155 |
|
| 156 |
def answer_source(reply, used):
|
| 157 |
+
"""(file, line) of the one file that holds the reply verbatim (its first 40+ letters/digits), preferring files the
|
| 158 |
+
winner called; (None, None) when the reply is composed, too short, or found in several files."""
|
| 159 |
+
global _sources, _lines
|
| 160 |
+
if _sources is None: # built by build_bundle.py
|
| 161 |
with open(os.path.join(ROOT, "norm.json"), encoding="utf-8") as handle:
|
| 162 |
_sources = json.load(handle)
|
| 163 |
+
with open(os.path.join(ROOT, "lines.json"), encoding="utf-8") as handle:
|
| 164 |
+
_lines = json.load(handle)
|
| 165 |
text = _norm(reply)
|
| 166 |
for n in (60, 40):
|
| 167 |
key = text[:n]
|
|
|
|
| 170 |
hits = [f for f, body in _sources.items() if key in body]
|
| 171 |
hits = hits if len(hits) == 1 else [f for f in hits if f in used]
|
| 172 |
if len(hits) == 1:
|
| 173 |
+
return hits[0], _line_of(hits[0], _sources[hits[0]].find(key))
|
| 174 |
+
return None, None
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
def _line_of(path, offset):
|
| 178 |
+
"""The 1-based line holding the offset-th letter/digit of a file."""
|
| 179 |
+
seen = 0
|
| 180 |
+
for number, count in enumerate(_lines.get(path, ()), 1):
|
| 181 |
+
seen += count
|
| 182 |
+
if offset < seen:
|
| 183 |
+
return number
|
| 184 |
return None
|
tree.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"url":"https://github.com/huggingface/pybot","ref":"main","files":[["bot/__init__.py",1],["bot/__main__.py",19],["bot/compose/__init__.py",523],["bot/compose/a_count_of_packets.py",100],["bot/compose/a_detail_dropped.py",381],["bot/compose/a_document_lives_with_an_office.py",241],["bot/compose/a_first_time.py",88],["bot/compose/a_number_the_bot_knows.py",233],["bot/compose/a_place_nobody_can_see.py",496],["bot/compose/a_thing_being_weighed.py",325],["bot/compose/a_thing_wants_doing.py",81],["bot/compose/a_trouble.py",237],["bot/compose/a_wait_about_a_body.py",338],["bot/compose/aboutness.py",153],["bot/compose/badnews.py",1354],["bot/compose/breakup.py",74],["bot/compose/check_with_you.py",112],["bot/compose/checking.py",1417],["bot/compose/childwords.py",163],["bot/compose/circumstance.py",156],["bot/compose/clause.py",111],["bot/compose/colour_on_the_body.py",269],["bot/compose/doubt.py",138],["bot/compose/draft.py",764],["bot/compose/facts.py",96],["bot/compose/fallback.py",16939],["bot/compose/fallback_chain.py",6851],["bot/compose/fallback_data.py",8736],["bot/compose/fallback_pools.py",817],["bot/compose/fallback_words.py",514],["bot/compose/find_a_place.py",352],["bot/compose/finding_out.py",1014],["bot/compose/findout.py",1227],["bot/compose/fit.py",7391],["bot/compose/for_the_day.py",66],["bot/compose/gap.py",684],["bot/compose/goodnews.py",1876],["bot/compose/griefplea.py",85],["bot/compose/habit.py",736],["bot/compose/handoff.py",149],["bot/compose/hands.py",258],["bot/compose/harm.py",340],["bot/compose/hedge.py",75],["bot/compose/how_it_went.py",325],["bot/compose/invitation.py",206],["bot/compose/is_it_worth_it.py",410],["bot/compose/judgement.py",41],["bot/compose/kept_nearby.py",204],["bot/compose/lead.py",590],["bot/compose/lead_in.py",211],["bot/compose/leaving.py",992],["bot/compose/limit.py",357],["bot/compose/liveask.py",93],["bot/compose/loss.py",5359],["bot/compose/missing_half.py",296],["bot/compose/morning_after.py",142],["bot/compose/moving.py",119],["bot/compose/nearby_one.py",274],["bot/compose/news_ask.py",66],["bot/compose/no_advice.py",249],["bot/compose/no_eyes.py",1110],["bot/compose/no_page.py",229],["bot/compose/not_knowing.py",657],["bot/compose/nottheirbest.py",117],["bot/compose/occasionplan.py",460],["bot/compose/onething.py",609],["bot/compose/only_they_know.py",577],["bot/compose/onmybehalf.py",264],["bot/compose/onscreen.py",575],["bot/compose/onsubject.py",892],["bot/compose/outlook.py",168],["bot/compose/own_ask.py",253],["bot/compose/own_facts.py",592],["bot/compose/pace.py",504],["bot/compose/place_facts.py",354],["bot/compose/plan_ask.py",178],["bot/compose/plans.py",212],["bot/compose/pleased.py",103],["bot/compose/postcode.py",392],["bot/compose/prices.py",300],["bot/compose/quantity.py",1332],["bot/compose/reaction.py",291],["bot/compose/reading.py",2263],["bot/compose/recall.py",112],["bot/compose/receiving_end.py",207],["bot/compose/remark.py",2475],["bot/compose/repair.py",418],["bot/compose/rotten_luck.py",719],["bot/compose/routes.py",632],["bot/compose/rule.py",224],["bot/compose/ruledout.py",707],["bot/compose/safety_doubt.py",167],["bot/compose/safetyask.py",215],["bot/compose/said_about_me.py",311],["bot/compose/saidby.py",238],["bot/compose/setting_off.py",241],["bot/compose/stepwords.py",99],["bot/compose/still.py",290],["bot/compose/stretches.py",432],["bot/compose/talktime.py",122],["bot/compose/talkto.py",224],["bot/compose/taste.py",619],["bot/compose/the_course_of_it.py",564],["bot/compose/the_rule_for_it.py",482],["bot/compose/the_shape_without_the_fact.py",638],["bot/compose/the_trouble_named.py",162],["bot/compose/the_turn_after.py",157],["bot/compose/their_day.py",436],["bot/compose/their_detail.py",193],["bot/compose/their_life.py",222],["bot/compose/theirperson.py",283],["bot/compose/thread_detail.py",234],["bot/compose/toknow.py",139],["bot/compose/tone_again.py",324],["bot/compose/trouble.py",1291],["bot/compose/unseen.py",208],["bot/compose/urgent.py",694],["bot/compose/verdict.py",6764],["bot/compose/waited_for.py",236],["bot/compose/ward.py",188],["bot/compose/what_decides_it.py",179],["bot/compose/what_i_do_know.py",836],["bot/compose/what_it_asks.py",102],["bot/compose/who.py",385],["bot/compose/who_to_see.py",307],["bot/compose/whole.py",57],["bot/compose/why.py",2202],["bot/compose/worn.py",226],["bot/knowledge/__init__.py",181],["bot/knowledge/a_plain_noise_word_on_a_machine.py",59],["bot/knowledge/affording.py",96],["bot/knowledge/animals.py",1020],["bot/knowledge/appointments.py",324],["bot/knowledge/babyfood.py",2333],["bot/knowledge/bake_faults.py",221],["bot/knowledge/bikes.py",1214],["bot/knowledge/body.py",5105],["bot/knowledge/body_energy.py",79],["bot/knowledge/build_jobs.py",186],["bot/knowledge/business.py",494],["bot/knowledge/cakes.py",298],["bot/knowledge/caring.py",296],["bot/knowledge/cars.py",4900],["bot/knowledge/child_work.py",233],["bot/knowledge/chilli.py",454],["bot/knowledge/cleaning.py",5502],["bot/knowledge/clothing.py",6036],["bot/knowledge/coats.py",157],["bot/knowledge/comeback.py",255],["bot/knowledge/complaints.py",1276],["bot/knowledge/conditions.py",203],["bot/knowledge/consumer.py",5730],["bot/knowledge/containers_frost.py",88],["bot/knowledge/cook_kit.py",792],["bot/knowledge/cooking.py",12887],["bot/knowledge/cooking_entries.py",12071],["bot/knowledge/cooking_fats.py",133],["bot/knowledge/cooking_gaps.py",2755],["bot/knowledge/cooking_more.py",2376],["bot/knowledge/cooking_tables.py",3282],["bot/knowledge/cooling.py",110],["bot/knowledge/costs.py",1930],["bot/knowledge/creative.py",213],["bot/knowledge/crisis_replies.py",2298],["bot/knowledge/dates.py",162],["bot/knowledge/decorating.py",337],["bot/knowledge/desk_setup.py",48],["bot/knowledge/devices.py",800],["bot/knowledge/differences.py",304],["bot/knowledge/dish_verdicts.py",437],["bot/knowledge/dishes.py",6325],["bot/knowledge/drinks.py",826],["bot/knowledge/eithers.py",520],["bot/knowledge/entertainment.py",10586],["bot/knowledge/everyday_lines.py",82],["bot/knowledge/explains.py",3423],["bot/knowledge/fabrics.py",179],["bot/knowledge/family.py",14013],["bot/knowledge/family_more.py",1270],["bot/knowledge/fears.py",285],["bot/knowledge/fitness.py",1831],["bot/knowledge/fitweek.py",298],["bot/knowledge/food_left_out.py",75],["bot/knowledge/freshness.py",1431],["bot/knowledge/friends.py",1300],["bot/knowledge/fruit.py",702],["bot/knowledge/fun.py",990],["bot/knowledge/garden.py",7109],["bot/knowledge/garden_tools.py",429],["bot/knowledge/geography.py",1957],["bot/knowledge/habits.py",1061],["bot/knowledge/health.py",11960],["bot/knowledge/history.py",2069],["bot/knowledge/home.py",9579],["bot/knowledge/home_craft.py",11846],["bot/knowledge/house_odds.py",508],["bot/knowledge/how_it_works.py",151],["bot/knowledge/icing.py",90],["bot/knowledge/idioms.py",465],["bot/knowledge/income_periods.py",306],["bot/knowledge/ingredient_swaps.py",63],["bot/knowledge/job_times.py",19],["bot/knowledge/joint_time.py",131],["bot/knowledge/joints.py",591],["bot/knowledge/keeping.py",2118],["bot/knowledge/keeping_cooked.py",115],["bot/knowledge/kept_animals.py",144],["bot/knowledge/kit_lists.py",212],["bot/knowledge/kitchen.py",146],["bot/knowledge/kitchen_odds.py",529],["bot/knowledge/kitchen_prep.py",433],["bot/knowledge/kits_and_claims.py",83],["bot/knowledge/land.py",47],["bot/knowledge/language.py",3995],["bot/knowledge/left_on.py",271],["bot/knowledge/lifeadmin.py",5087],["bot/knowledge/lookup.py",7989],["bot/knowledge/machine_door.py",90],["bot/knowledge/materials.py",711],["bot/knowledge/maths.py",6110],["bot/knowledge/meals.py",2794],["bot/knowledge/measures.py",636],["bot/knowledge/meat_in_a_card.py",72],["bot/knowledge/microwave_methods.py",80],["bot/knowledge/money.py",11643],["bot/knowledge/money_words.py",405],["bot/knowledge/music.py",411],["bot/knowledge/nature.py",957],["bot/knowledge/newborn.py",263],["bot/knowledge/no_kit.py",340],["bot/knowledge/notable.py",765],["bot/knowledge/nursing.py",54],["bot/knowledge/nutrition.py",3292],["bot/knowledge/occasions.py",269],["bot/knowledge/odours.py",283],["bot/knowledge/opinions.py",1694],["bot/knowledge/painting_faults.py",328],["bot/knowledge/panic_talk.py",211],["bot/knowledge/parking.py",45],["bot/knowledge/pasta.py",343],["bot/knowledge/pay.py",248],["bot/knowledge/pensions.py",119],["bot/knowledge/pets.py",12315],["bot/knowledge/pets_health.py",90],["bot/knowledge/pharmacy.py",414],["bot/knowledge/phone_use.py",132],["bot/knowledge/photography.py",199],["bot/knowledge/picking.py",446],["bot/knowledge/picks.py",164],["bot/knowledge/plans.py",3444],["bot/knowledge/power_heat.py",43],["bot/knowledge/pregnancy.py",1669],["bot/knowledge/prices.py",277],["bot/knowledge/procedures.py",241],["bot/knowledge/quantity.py",37],["bot/knowledge/rice.py",350],["bot/knowledge/routines.py",582],["bot/knowledge/rubbish.py",909],["bot/knowledge/sauces.py",310],["bot/knowledge/school_day.py",60],["bot/knowledge/school_days.py",75],["bot/knowledge/schoolmaths.py",217],["bot/knowledge/science.py",12703],["bot/knowledge/seasoning.py",277],["bot/knowledge/shopping.py",4488],["bot/knowledge/sleep.py",1137],["bot/knowledge/sleep_aids.py",206],["bot/knowledge/spice_heat.py",246],["bot/knowledge/sport.py",4750],["bot/knowledge/still_ok.py",1247],["bot/knowledge/study.py",4998],["bot/knowledge/swaps.py",1217],["bot/knowledge/takes.py",329],["bot/knowledge/technology.py",8525],["bot/knowledge/tenancy.py",108],["bot/knowledge/trades.py",40],["bot/knowledge/travel.py",12560],["bot/knowledge/travel_health.py",320],["bot/knowledge/units.py",3689],["bot/knowledge/vaccines.py",226],["bot/knowledge/vegetables.py",961],["bot/knowledge/warm_food.py",161],["bot/knowledge/water_out.py",188],["bot/knowledge/what_damages_what.py",392],["bot/knowledge/whenbuy.py",454],["bot/knowledge/wording.py",2979],["bot/knowledge/work.py",9201],["bot/memory/__init__.py",1339],["bot/memory/a_year_of_birth.py",122],["bot/memory/aboutthem.py",254],["bot/memory/ack.py",6917],["bot/memory/again.py",1326],["bot/memory/already.py",1141],["bot/memory/amounts.py",260],["bot/memory/another.py",512],["bot/memory/asked_about.py",155],["bot/memory/asleep.py",263],["bot/memory/back_again.py",260],["bot/memory/baking.py",107],["bot/memory/callback.py",240],["bot/memory/carried_on.py",344],["bot/memory/carry.py",783],["bot/memory/cause.py",721],["bot/memory/change.py",153],["bot/memory/choice.py",663],["bot/memory/company.py",407],["bot/memory/condition.py",364],["bot/memory/corrected.py",2101],["bot/memory/counts.py",1037],["bot/memory/deadline.py",103],["bot/memory/decided.py",744],["bot/memory/detail.py",1793],["bot/memory/doing_it.py",175],["bot/memory/doubt.py",155],["bot/memory/dream.py",216],["bot/memory/earlier.py",596],["bot/memory/enough.py",866],["bot/memory/facts.py",11301],["bot/memory/favourite.py",519],["bot/memory/filler.py",90],["bot/memory/goals.py",154],["bot/memory/groupages.py",242],["bot/memory/guest.py",312],["bot/memory/healing.py",341],["bot/memory/history.py",697],["bot/memory/holds.py",114],["bot/memory/hope.py",144],["bot/memory/hours.py",150],["bot/memory/household.py",411],["bot/memory/kidcount.py",131],["bot/memory/kinds.py",293],["bot/memory/limit.py",916],["bot/memory/limits.py",300],["bot/memory/lineback.py",496],["bot/memory/matters.py",308],["bot/memory/meant.py",845],["bot/memory/measure.py",260],["bot/memory/more.py",220],["bot/memory/named.py",2850],["bot/memory/narrow.py",2899],["bot/memory/newborn.py",90],["bot/memory/not_a_trip.py",216],["bot/memory/not_this.py",251],["bot/memory/obstacle.py",747],["bot/memory/onset.py",378],["bot/memory/opening.py",241],["bot/memory/outfit.py",346],["bot/memory/outgoings.py",690],["bot/memory/paragraph.py",105],["bot/memory/passing_the_time.py",313],["bot/memory/pending.py",172],["bot/memory/people.py",249],["bot/memory/pile.py",124],["bot/memory/places.py",249],["bot/memory/plan.py",468],["bot/memory/plans.py",450],["bot/memory/portions.py",470],["bot/memory/prefer.py",190],["bot/memory/price.py",684],["bot/memory/purse.py",173],["bot/memory/quotes.py",105],["bot/memory/rates.py",366],["bot/memory/recall.py",725],["bot/memory/reject.py",718],["bot/memory/relations.py",1972],["bot/memory/remedy.py",184],["bot/memory/reminded.py",224],["bot/memory/rename.py",108],["bot/memory/repair.py",1183],["bot/memory/repeat.py",6120],["bot/memory/resize.py",379],["bot/memory/returned.py",251],["bot/memory/returns.py",293],["bot/memory/saving.py",2228],["bot/memory/setback.py",318],["bot/memory/size.py",232],["bot/memory/spent.py",776],["bot/memory/spoken.py",137],["bot/memory/stands.py",537],["bot/memory/store_lines.py",1075],["bot/memory/store_replies.py",13236],["bot/memory/stuck.py",503],["bot/memory/surname.py",321],["bot/memory/swap.py",784],["bot/memory/taking.py",409],["bot/memory/taste.py",509],["bot/memory/the_verdict.py",495],["bot/memory/the_years.py",213],["bot/memory/their_feeling.py",200],["bot/memory/thread.py",1918],["bot/memory/times.py",223],["bot/memory/told.py",1570],["bot/memory/too_late.py",174],["bot/memory/topics.py",8522],["bot/memory/tried.py",1922],["bot/memory/trips.py",1835],["bot/memory/warmth.py",554],["bot/memory/whathurts.py",163],["bot/memory/when.py",2256],["bot/memory/whereabout.py",140],["bot/memory/whose_body.py",76],["bot/memory/will_it_work.py",142],["bot/memory/workplace.py",198],["bot/memory/years_in.py",309],["bot/modules/__init__.py",1],["bot/modules/a_cake_between_its_layers.py",104],["bot/modules/a_check_with_you.py",19],["bot/modules/a_count_of_packets.py",34],["bot/modules/a_count_said.py",40],["bot/modules/a_day_somebody_else_keeps.py",121],["bot/modules/a_debt_said_flat.py",223],["bot/modules/a_fact_asked_again.py",194],["bot/modules/a_figure_beside_the_state.py",138],["bot/modules/a_figure_of_a_dish.py",59],["bot/modules/a_first_time.py",15],["bot/modules/a_habit_is_raised.py",42],["bot/modules/a_job_that_is_not_a_diy_job.py",200],["bot/modules/a_letter_about_money.py",196],["bot/modules/a_limit_over_the_answer.py",359],["bot/modules/a_measure_asked_again.py",37],["bot/modules/a_number_the_bot_knows.py",31],["bot/modules/a_plan_the_thread_holds.py",39],["bot/modules/a_question_about_somebody.py",126],["bot/modules/a_return_brings_back_the_advice.py",228],["bot/modules/a_shock_at_a_bill.py",414],["bot/modules/a_thing_being_weighed.py",52],["bot/modules/a_thing_wants_doing.py",48],["bot/modules/a_will_it_work.py",38],["bot/modules/aboutachild.py",39],["bot/modules/after_a_lead_in.py",28],["bot/modules/already.py",26],["bot/modules/an_age_ahead.py",34],["bot/modules/answers.py",12268],["bot/modules/arbiter.py",5532],["bot/modules/attribute_said_again.py",905],["bot/modules/bulky.py",153],["bot/modules/callback_about.py",39],["bot/modules/carers_turn.py",651],["bot/modules/chasing_a_body.py",609],["bot/modules/chat.py",16737],["bot/modules/chat_replies.py",1105],["bot/modules/colour_on_the_body.py",27],["bot/modules/confusing.py",90],["bot/modules/detail_question.py",20],["bot/modules/done_ask.py",240],["bot/modules/doubt.py",43],["bot/modules/dreams.py",278],["bot/modules/familyask.py",283],["bot/modules/favourites.py",161],["bot/modules/figure_asked_again.py",46],["bot/modules/first_line_open.py",42],["bot/modules/greeting.py",1280],["bot/modules/grief.py",925],["bot/modules/group_ages.py",62],["bot/modules/hardpast.py",202],["bot/modules/household.py",47],["bot/modules/how_long_a_stay.py",205],["bot/modules/intent.py",43],["bot/modules/invitation.py",48],["bot/modules/judge_ask.py",131],["bot/modules/keeping.py",178],["bot/modules/kid_tally.py",28],["bot/modules/live_source.py",294],["bot/modules/live_times.py",265],["bot/modules/loss.py",155],["bot/modules/memory_store.py",6419],["bot/modules/memory_tables.py",483],["bot/modules/my_work.py",26],["bot/modules/name_taken_back.py",107],["bot/modules/near_me.py",25],["bot/modules/night.py",40],["bot/modules/no_advice.py",65],["bot/modules/nudge.py",56],["bot/modules/on_record.py",62],["bot/modules/onsubject.py",52],["bot/modules/pace.py",45],["bot/modules/particles.py",47],["bot/modules/recap.py",150],["bot/modules/receiving_end.py",23],["bot/modules/record_due.py",171],["bot/modules/ruled_out.py",42],["bot/modules/safety.py",12018],["bot/modules/safety_cards.py",2527],["bot/modules/safety_phrases.py",1324],["bot/modules/safety_tables.py",7807],["bot/modules/said_back.py",28],["bot/modules/said_fact_back.py",172],["bot/modules/saving_followup.py",305],["bot/modules/since_it_began.py",37],["bot/modules/steps.py",23],["bot/modules/taking_asked_again.py",45],["bot/modules/talkto.py",159],["bot/modules/the_detail_the_thread_adds.py",30],["bot/modules/the_kind_one_line_up.py",56],["bot/modules/the_month_they_have.py",33],["bot/modules/the_shape_of_the_answer.py",130],["bot/modules/the_trouble_it_has.py",27],["bot/modules/the_trouble_named.py",30],["bot/modules/the_wait_about_a_body.py",94],["bot/modules/their_life.py",450],["bot/modules/their_pastime.py",358],["bot/modules/their_taste.py",330],["bot/modules/theirperson.py",31],["bot/modules/thing_i_did_with.py",194],["bot/modules/trip_date_said_again.py",158],["bot/modules/understand.py",28],["bot/modules/urgent.py",30],["bot/modules/ward.py",20],["bot/modules/what_decides_it.py",30],["bot/modules/what_they_said.py",216],["bot/modules/where_it_answers.py",163],["bot/modules/who_to_see.py",40],["bot/modules/words.py",197],["bot/modules/years_in.py",46],["bot/runtime.py",120],["bot/understanding/__init__.py",2379],["bot/understanding/attempts.py",204],["bot/understanding/body.py",671],["bot/understanding/breeds.py",171],["bot/understanding/car_glass.py",79],["bot/understanding/cars.py",144],["bot/understanding/confusion.py",159],["bot/understanding/kinds.py",7294],["bot/understanding/lexicon.py",2012],["bot/understanding/normalize.py",7093],["bot/understanding/references.py",486],["bot/understanding/senses.py",220],["bot/understanding/topics.py",4114]]}
|
|
|
|
| 1 |
+
{"url":"https://github.com/huggingface/pybot","ref":"7d63c7fbebb44c7e466e5c8b5c1f341ab767929e","files":[["bot/__init__.py",1],["bot/__main__.py",19],["bot/compose/__init__.py",523],["bot/compose/a_count_of_packets.py",100],["bot/compose/a_detail_dropped.py",381],["bot/compose/a_document_lives_with_an_office.py",241],["bot/compose/a_first_time.py",88],["bot/compose/a_number_the_bot_knows.py",233],["bot/compose/a_place_nobody_can_see.py",496],["bot/compose/a_thing_being_weighed.py",325],["bot/compose/a_thing_wants_doing.py",81],["bot/compose/a_trouble.py",237],["bot/compose/a_wait_about_a_body.py",338],["bot/compose/aboutness.py",153],["bot/compose/badnews.py",1354],["bot/compose/breakup.py",74],["bot/compose/check_with_you.py",112],["bot/compose/checking.py",1417],["bot/compose/childwords.py",163],["bot/compose/circumstance.py",156],["bot/compose/clause.py",111],["bot/compose/colour_on_the_body.py",269],["bot/compose/doubt.py",138],["bot/compose/draft.py",764],["bot/compose/facts.py",96],["bot/compose/fallback.py",16939],["bot/compose/fallback_chain.py",6851],["bot/compose/fallback_data.py",8736],["bot/compose/fallback_pools.py",817],["bot/compose/fallback_words.py",514],["bot/compose/find_a_place.py",352],["bot/compose/finding_out.py",1014],["bot/compose/findout.py",1227],["bot/compose/fit.py",7391],["bot/compose/for_the_day.py",66],["bot/compose/gap.py",684],["bot/compose/goodnews.py",1876],["bot/compose/griefplea.py",85],["bot/compose/habit.py",736],["bot/compose/handoff.py",149],["bot/compose/hands.py",258],["bot/compose/harm.py",340],["bot/compose/hedge.py",75],["bot/compose/how_it_went.py",325],["bot/compose/invitation.py",206],["bot/compose/is_it_worth_it.py",410],["bot/compose/judgement.py",41],["bot/compose/kept_nearby.py",204],["bot/compose/lead.py",590],["bot/compose/lead_in.py",211],["bot/compose/leaving.py",992],["bot/compose/limit.py",357],["bot/compose/liveask.py",93],["bot/compose/loss.py",5359],["bot/compose/missing_half.py",296],["bot/compose/morning_after.py",142],["bot/compose/moving.py",119],["bot/compose/nearby_one.py",274],["bot/compose/news_ask.py",66],["bot/compose/no_advice.py",249],["bot/compose/no_eyes.py",1110],["bot/compose/no_page.py",229],["bot/compose/not_knowing.py",657],["bot/compose/nottheirbest.py",117],["bot/compose/occasionplan.py",460],["bot/compose/onething.py",609],["bot/compose/only_they_know.py",577],["bot/compose/onmybehalf.py",264],["bot/compose/onscreen.py",575],["bot/compose/onsubject.py",892],["bot/compose/outlook.py",168],["bot/compose/own_ask.py",253],["bot/compose/own_facts.py",592],["bot/compose/pace.py",504],["bot/compose/place_facts.py",354],["bot/compose/plan_ask.py",178],["bot/compose/plans.py",212],["bot/compose/pleased.py",103],["bot/compose/postcode.py",392],["bot/compose/prices.py",300],["bot/compose/quantity.py",1332],["bot/compose/reaction.py",291],["bot/compose/reading.py",2263],["bot/compose/recall.py",112],["bot/compose/receiving_end.py",207],["bot/compose/remark.py",2475],["bot/compose/repair.py",418],["bot/compose/rotten_luck.py",719],["bot/compose/routes.py",632],["bot/compose/rule.py",224],["bot/compose/ruledout.py",707],["bot/compose/safety_doubt.py",167],["bot/compose/safetyask.py",215],["bot/compose/said_about_me.py",311],["bot/compose/saidby.py",238],["bot/compose/setting_off.py",241],["bot/compose/stepwords.py",99],["bot/compose/still.py",290],["bot/compose/stretches.py",432],["bot/compose/talktime.py",122],["bot/compose/talkto.py",224],["bot/compose/taste.py",619],["bot/compose/the_course_of_it.py",564],["bot/compose/the_rule_for_it.py",482],["bot/compose/the_shape_without_the_fact.py",638],["bot/compose/the_trouble_named.py",162],["bot/compose/the_turn_after.py",157],["bot/compose/their_day.py",436],["bot/compose/their_detail.py",193],["bot/compose/their_life.py",222],["bot/compose/theirperson.py",283],["bot/compose/thread_detail.py",234],["bot/compose/toknow.py",139],["bot/compose/tone_again.py",324],["bot/compose/trouble.py",1291],["bot/compose/unseen.py",208],["bot/compose/urgent.py",694],["bot/compose/verdict.py",6764],["bot/compose/waited_for.py",236],["bot/compose/ward.py",188],["bot/compose/what_decides_it.py",179],["bot/compose/what_i_do_know.py",836],["bot/compose/what_it_asks.py",102],["bot/compose/who.py",385],["bot/compose/who_to_see.py",307],["bot/compose/whole.py",57],["bot/compose/why.py",2202],["bot/compose/worn.py",226],["bot/knowledge/__init__.py",181],["bot/knowledge/a_plain_noise_word_on_a_machine.py",59],["bot/knowledge/affording.py",96],["bot/knowledge/animals.py",1020],["bot/knowledge/appointments.py",324],["bot/knowledge/babyfood.py",2333],["bot/knowledge/bake_faults.py",221],["bot/knowledge/bikes.py",1214],["bot/knowledge/body.py",5105],["bot/knowledge/body_energy.py",79],["bot/knowledge/build_jobs.py",186],["bot/knowledge/business.py",494],["bot/knowledge/cakes.py",298],["bot/knowledge/caring.py",296],["bot/knowledge/cars.py",4900],["bot/knowledge/child_work.py",233],["bot/knowledge/chilli.py",454],["bot/knowledge/cleaning.py",5502],["bot/knowledge/clothing.py",6036],["bot/knowledge/coats.py",157],["bot/knowledge/comeback.py",255],["bot/knowledge/complaints.py",1276],["bot/knowledge/conditions.py",203],["bot/knowledge/consumer.py",5730],["bot/knowledge/containers_frost.py",88],["bot/knowledge/cook_kit.py",792],["bot/knowledge/cooking.py",12887],["bot/knowledge/cooking_entries.py",12071],["bot/knowledge/cooking_fats.py",133],["bot/knowledge/cooking_gaps.py",2755],["bot/knowledge/cooking_more.py",2376],["bot/knowledge/cooking_tables.py",3282],["bot/knowledge/cooling.py",110],["bot/knowledge/costs.py",1930],["bot/knowledge/creative.py",213],["bot/knowledge/crisis_replies.py",2298],["bot/knowledge/dates.py",162],["bot/knowledge/decorating.py",337],["bot/knowledge/desk_setup.py",48],["bot/knowledge/devices.py",800],["bot/knowledge/differences.py",304],["bot/knowledge/dish_verdicts.py",437],["bot/knowledge/dishes.py",6325],["bot/knowledge/drinks.py",826],["bot/knowledge/eithers.py",520],["bot/knowledge/entertainment.py",10586],["bot/knowledge/everyday_lines.py",82],["bot/knowledge/explains.py",3423],["bot/knowledge/fabrics.py",179],["bot/knowledge/family.py",14013],["bot/knowledge/family_more.py",1270],["bot/knowledge/fears.py",285],["bot/knowledge/fitness.py",1831],["bot/knowledge/fitweek.py",298],["bot/knowledge/food_left_out.py",75],["bot/knowledge/freshness.py",1431],["bot/knowledge/friends.py",1300],["bot/knowledge/fruit.py",702],["bot/knowledge/fun.py",990],["bot/knowledge/garden.py",7109],["bot/knowledge/garden_tools.py",429],["bot/knowledge/geography.py",1957],["bot/knowledge/habits.py",1061],["bot/knowledge/health.py",11960],["bot/knowledge/history.py",2069],["bot/knowledge/home.py",9579],["bot/knowledge/home_craft.py",11846],["bot/knowledge/house_odds.py",508],["bot/knowledge/how_it_works.py",151],["bot/knowledge/icing.py",90],["bot/knowledge/idioms.py",465],["bot/knowledge/income_periods.py",306],["bot/knowledge/ingredient_swaps.py",63],["bot/knowledge/job_times.py",19],["bot/knowledge/joint_time.py",131],["bot/knowledge/joints.py",591],["bot/knowledge/keeping.py",2118],["bot/knowledge/keeping_cooked.py",115],["bot/knowledge/kept_animals.py",144],["bot/knowledge/kit_lists.py",212],["bot/knowledge/kitchen.py",146],["bot/knowledge/kitchen_odds.py",529],["bot/knowledge/kitchen_prep.py",433],["bot/knowledge/kits_and_claims.py",83],["bot/knowledge/land.py",47],["bot/knowledge/language.py",3995],["bot/knowledge/left_on.py",271],["bot/knowledge/lifeadmin.py",5087],["bot/knowledge/lookup.py",7989],["bot/knowledge/machine_door.py",90],["bot/knowledge/materials.py",711],["bot/knowledge/maths.py",6110],["bot/knowledge/meals.py",2794],["bot/knowledge/measures.py",636],["bot/knowledge/meat_in_a_card.py",72],["bot/knowledge/microwave_methods.py",80],["bot/knowledge/money.py",11643],["bot/knowledge/money_words.py",405],["bot/knowledge/music.py",411],["bot/knowledge/nature.py",957],["bot/knowledge/newborn.py",263],["bot/knowledge/no_kit.py",340],["bot/knowledge/notable.py",765],["bot/knowledge/nursing.py",54],["bot/knowledge/nutrition.py",3292],["bot/knowledge/occasions.py",269],["bot/knowledge/odours.py",283],["bot/knowledge/opinions.py",1694],["bot/knowledge/painting_faults.py",328],["bot/knowledge/panic_talk.py",211],["bot/knowledge/parking.py",45],["bot/knowledge/pasta.py",343],["bot/knowledge/pay.py",248],["bot/knowledge/pensions.py",119],["bot/knowledge/pets.py",12315],["bot/knowledge/pets_health.py",90],["bot/knowledge/pharmacy.py",414],["bot/knowledge/phone_use.py",132],["bot/knowledge/photography.py",199],["bot/knowledge/picking.py",446],["bot/knowledge/picks.py",164],["bot/knowledge/plans.py",3444],["bot/knowledge/power_heat.py",43],["bot/knowledge/pregnancy.py",1669],["bot/knowledge/prices.py",277],["bot/knowledge/procedures.py",241],["bot/knowledge/quantity.py",37],["bot/knowledge/rice.py",350],["bot/knowledge/routines.py",582],["bot/knowledge/rubbish.py",909],["bot/knowledge/sauces.py",310],["bot/knowledge/school_day.py",60],["bot/knowledge/school_days.py",75],["bot/knowledge/schoolmaths.py",217],["bot/knowledge/science.py",12703],["bot/knowledge/seasoning.py",277],["bot/knowledge/shopping.py",4488],["bot/knowledge/sleep.py",1137],["bot/knowledge/sleep_aids.py",206],["bot/knowledge/spice_heat.py",246],["bot/knowledge/sport.py",4750],["bot/knowledge/still_ok.py",1247],["bot/knowledge/study.py",4998],["bot/knowledge/swaps.py",1217],["bot/knowledge/takes.py",329],["bot/knowledge/technology.py",8525],["bot/knowledge/tenancy.py",108],["bot/knowledge/trades.py",40],["bot/knowledge/travel.py",12560],["bot/knowledge/travel_health.py",320],["bot/knowledge/units.py",3689],["bot/knowledge/vaccines.py",226],["bot/knowledge/vegetables.py",961],["bot/knowledge/warm_food.py",161],["bot/knowledge/water_out.py",188],["bot/knowledge/what_damages_what.py",392],["bot/knowledge/whenbuy.py",454],["bot/knowledge/wording.py",2979],["bot/knowledge/work.py",9201],["bot/memory/__init__.py",1339],["bot/memory/a_year_of_birth.py",122],["bot/memory/aboutthem.py",254],["bot/memory/ack.py",6917],["bot/memory/again.py",1326],["bot/memory/already.py",1141],["bot/memory/amounts.py",260],["bot/memory/another.py",512],["bot/memory/asked_about.py",155],["bot/memory/asleep.py",263],["bot/memory/back_again.py",260],["bot/memory/baking.py",107],["bot/memory/callback.py",240],["bot/memory/carried_on.py",344],["bot/memory/carry.py",783],["bot/memory/cause.py",721],["bot/memory/change.py",153],["bot/memory/choice.py",663],["bot/memory/company.py",407],["bot/memory/condition.py",364],["bot/memory/corrected.py",2101],["bot/memory/counts.py",1037],["bot/memory/deadline.py",103],["bot/memory/decided.py",744],["bot/memory/detail.py",1793],["bot/memory/doing_it.py",175],["bot/memory/doubt.py",155],["bot/memory/dream.py",216],["bot/memory/earlier.py",596],["bot/memory/enough.py",866],["bot/memory/facts.py",11301],["bot/memory/favourite.py",519],["bot/memory/filler.py",90],["bot/memory/goals.py",154],["bot/memory/groupages.py",242],["bot/memory/guest.py",312],["bot/memory/healing.py",341],["bot/memory/history.py",697],["bot/memory/holds.py",114],["bot/memory/hope.py",144],["bot/memory/hours.py",150],["bot/memory/household.py",411],["bot/memory/kidcount.py",131],["bot/memory/kinds.py",293],["bot/memory/limit.py",916],["bot/memory/limits.py",300],["bot/memory/lineback.py",496],["bot/memory/matters.py",308],["bot/memory/meant.py",845],["bot/memory/measure.py",260],["bot/memory/more.py",220],["bot/memory/named.py",2850],["bot/memory/narrow.py",2899],["bot/memory/newborn.py",90],["bot/memory/not_a_trip.py",216],["bot/memory/not_this.py",251],["bot/memory/obstacle.py",747],["bot/memory/onset.py",378],["bot/memory/opening.py",241],["bot/memory/outfit.py",346],["bot/memory/outgoings.py",690],["bot/memory/paragraph.py",105],["bot/memory/passing_the_time.py",313],["bot/memory/pending.py",172],["bot/memory/people.py",249],["bot/memory/pile.py",124],["bot/memory/places.py",249],["bot/memory/plan.py",468],["bot/memory/plans.py",450],["bot/memory/portions.py",470],["bot/memory/prefer.py",190],["bot/memory/price.py",684],["bot/memory/purse.py",173],["bot/memory/quotes.py",105],["bot/memory/rates.py",366],["bot/memory/recall.py",725],["bot/memory/reject.py",718],["bot/memory/relations.py",1972],["bot/memory/remedy.py",184],["bot/memory/reminded.py",224],["bot/memory/rename.py",108],["bot/memory/repair.py",1183],["bot/memory/repeat.py",6120],["bot/memory/resize.py",379],["bot/memory/returned.py",251],["bot/memory/returns.py",293],["bot/memory/saving.py",2228],["bot/memory/setback.py",318],["bot/memory/size.py",232],["bot/memory/spent.py",776],["bot/memory/spoken.py",137],["bot/memory/stands.py",537],["bot/memory/store_lines.py",1075],["bot/memory/store_replies.py",13236],["bot/memory/stuck.py",503],["bot/memory/surname.py",321],["bot/memory/swap.py",784],["bot/memory/taking.py",409],["bot/memory/taste.py",509],["bot/memory/the_verdict.py",495],["bot/memory/the_years.py",213],["bot/memory/their_feeling.py",200],["bot/memory/thread.py",1918],["bot/memory/times.py",223],["bot/memory/told.py",1570],["bot/memory/too_late.py",174],["bot/memory/topics.py",8522],["bot/memory/tried.py",1922],["bot/memory/trips.py",1835],["bot/memory/warmth.py",554],["bot/memory/whathurts.py",163],["bot/memory/when.py",2256],["bot/memory/whereabout.py",140],["bot/memory/whose_body.py",76],["bot/memory/will_it_work.py",142],["bot/memory/workplace.py",198],["bot/memory/years_in.py",309],["bot/modules/__init__.py",1],["bot/modules/a_cake_between_its_layers.py",104],["bot/modules/a_check_with_you.py",19],["bot/modules/a_count_of_packets.py",34],["bot/modules/a_count_said.py",40],["bot/modules/a_day_somebody_else_keeps.py",121],["bot/modules/a_debt_said_flat.py",223],["bot/modules/a_fact_asked_again.py",194],["bot/modules/a_figure_beside_the_state.py",138],["bot/modules/a_figure_of_a_dish.py",59],["bot/modules/a_first_time.py",15],["bot/modules/a_habit_is_raised.py",42],["bot/modules/a_job_that_is_not_a_diy_job.py",200],["bot/modules/a_letter_about_money.py",196],["bot/modules/a_limit_over_the_answer.py",359],["bot/modules/a_measure_asked_again.py",37],["bot/modules/a_number_the_bot_knows.py",31],["bot/modules/a_plan_the_thread_holds.py",39],["bot/modules/a_question_about_somebody.py",126],["bot/modules/a_return_brings_back_the_advice.py",228],["bot/modules/a_shock_at_a_bill.py",414],["bot/modules/a_thing_being_weighed.py",52],["bot/modules/a_thing_wants_doing.py",48],["bot/modules/a_will_it_work.py",38],["bot/modules/aboutachild.py",39],["bot/modules/after_a_lead_in.py",28],["bot/modules/already.py",26],["bot/modules/an_age_ahead.py",34],["bot/modules/answers.py",12268],["bot/modules/arbiter.py",5532],["bot/modules/attribute_said_again.py",905],["bot/modules/bulky.py",153],["bot/modules/callback_about.py",39],["bot/modules/carers_turn.py",651],["bot/modules/chasing_a_body.py",609],["bot/modules/chat.py",16737],["bot/modules/chat_replies.py",1105],["bot/modules/colour_on_the_body.py",27],["bot/modules/confusing.py",90],["bot/modules/detail_question.py",20],["bot/modules/done_ask.py",240],["bot/modules/doubt.py",43],["bot/modules/dreams.py",278],["bot/modules/familyask.py",283],["bot/modules/favourites.py",161],["bot/modules/figure_asked_again.py",46],["bot/modules/first_line_open.py",42],["bot/modules/greeting.py",1280],["bot/modules/grief.py",925],["bot/modules/group_ages.py",62],["bot/modules/hardpast.py",202],["bot/modules/household.py",47],["bot/modules/how_long_a_stay.py",205],["bot/modules/intent.py",43],["bot/modules/invitation.py",48],["bot/modules/judge_ask.py",131],["bot/modules/keeping.py",178],["bot/modules/kid_tally.py",28],["bot/modules/live_source.py",294],["bot/modules/live_times.py",265],["bot/modules/loss.py",155],["bot/modules/memory_store.py",6419],["bot/modules/memory_tables.py",483],["bot/modules/my_work.py",26],["bot/modules/name_taken_back.py",107],["bot/modules/near_me.py",25],["bot/modules/night.py",40],["bot/modules/no_advice.py",65],["bot/modules/nudge.py",56],["bot/modules/on_record.py",62],["bot/modules/onsubject.py",52],["bot/modules/pace.py",45],["bot/modules/particles.py",47],["bot/modules/recap.py",150],["bot/modules/receiving_end.py",23],["bot/modules/record_due.py",171],["bot/modules/ruled_out.py",42],["bot/modules/safety.py",12018],["bot/modules/safety_cards.py",2527],["bot/modules/safety_phrases.py",1324],["bot/modules/safety_tables.py",7807],["bot/modules/said_back.py",28],["bot/modules/said_fact_back.py",172],["bot/modules/saving_followup.py",305],["bot/modules/since_it_began.py",37],["bot/modules/steps.py",23],["bot/modules/taking_asked_again.py",45],["bot/modules/talkto.py",159],["bot/modules/the_detail_the_thread_adds.py",30],["bot/modules/the_kind_one_line_up.py",56],["bot/modules/the_month_they_have.py",33],["bot/modules/the_shape_of_the_answer.py",130],["bot/modules/the_trouble_it_has.py",27],["bot/modules/the_trouble_named.py",30],["bot/modules/the_wait_about_a_body.py",94],["bot/modules/their_life.py",450],["bot/modules/their_pastime.py",358],["bot/modules/their_taste.py",330],["bot/modules/theirperson.py",31],["bot/modules/thing_i_did_with.py",194],["bot/modules/trip_date_said_again.py",158],["bot/modules/understand.py",28],["bot/modules/urgent.py",30],["bot/modules/ward.py",20],["bot/modules/what_decides_it.py",30],["bot/modules/what_they_said.py",216],["bot/modules/where_it_answers.py",163],["bot/modules/who_to_see.py",40],["bot/modules/words.py",197],["bot/modules/years_in.py",46],["bot/runtime.py",120],["bot/understanding/__init__.py",2379],["bot/understanding/attempts.py",204],["bot/understanding/body.py",671],["bot/understanding/breeds.py",171],["bot/understanding/car_glass.py",79],["bot/understanding/cars.py",144],["bot/understanding/confusion.py",159],["bot/understanding/kinds.py",7294],["bot/understanding/lexicon.py",2012],["bot/understanding/normalize.py",7093],["bot/understanding/references.py",486],["bot/understanding/senses.py",220],["bot/understanding/topics.py",4114]]}
|
worker.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
import { loadPyodide } from "https://cdn.jsdelivr.net/pyodide/v314.0.7/full/pyodide.mjs";
|
| 6 |
|
| 7 |
const PYODIDE = "https://cdn.jsdelivr.net/pyodide/v314.0.7/full/";
|
| 8 |
-
const BUNDLE = "pybot-24cbc0439e07.zip"; // bot/**.pyc compiled for this Pyodide's Python, plus norm.json
|
| 9 |
const CACHE = "pybot-bundles-v1";
|
| 10 |
|
| 11 |
const post = (msg) => self.postMessage(msg);
|
|
|
|
| 5 |
import { loadPyodide } from "https://cdn.jsdelivr.net/pyodide/v314.0.7/full/pyodide.mjs";
|
| 6 |
|
| 7 |
const PYODIDE = "https://cdn.jsdelivr.net/pyodide/v314.0.7/full/";
|
| 8 |
+
const BUNDLE = "pybot-24cbc0439e07-c4076a39.zip"; // bot/**.pyc compiled for this Pyodide's Python, plus norm.json and lines.json; renamed on every rebuild so browsers don't reuse a cached copy
|
| 9 |
const CACHE = "pybot-bundles-v1";
|
| 10 |
|
| 11 |
const post = (msg) => self.postMessage(msg);
|