← Lesson
The Smallest Prod-Shaped Stack
Joeven
Run
Reset
Python loads on first run
def god_worker(goal, db, mail, stripe): priv = ["db", "mail", "stripe", "model"] return {"answer": "5-7 days", "privileges": priv} def split_call(goal, tools, job): obs = tools["search_kb"](goal) return {"answer": obs["text"], "privileges": ["model"], "tenant": job["tenant"]} print("GOD", god_worker("refunds?", {}, {}, {})) print("SPLIT", split_call("refunds?", {"search_kb": lambda q: {"text": "5-7 days"}}, {"tenant": "acme"})) print("god has the union of keys; split does not")
Run to execute this in your browser. Nothing is sent to a server.