Where did you hear about us?
1 of 6
Working memory

One question at a time.

A workspace opened for one question: memories by number, a few more steps, and a person to ask.

Opening a work

open_work opens a work for one question. The first 20 memories come numbered [01] to [20], later calls refer to them by number, and no memory comes twice. Every work call answers with where the work stands (state: seeking, asked, kept or closed), the steps left, and only the memories this call added; with none added, none: true. rooms looks in the rooms of the last three days instead of all of long-term, and max_images (0 to 5) is how many photos each look of the work brings up.

w = mem.open_work("Where did we eat in Busan?", "jimin")
for m in w["memories"]:
    print(m["n"], m["content"])                                        # [01] .. [20]
mem.work_search(w["work_id"], "the seafood place by the beach", "jimin")  # a step
mem.work_around(w["work_id"], 3, "jimin", from_=-2, to=2)             # a step, around [03]
mem.work_deeper(w["work_id"], "jimin")                                  # the next 20
mem.close_work(w["work_id"], "jimin", answer_id=w["memories"][2]["id"])
const w = await mem.openWork("Where did we eat in Busan?", "jimin");
for (const m of w.memories ?? []) console.log(m.n, m.content);          // [01] .. [20]
await mem.workSearch(w.work_id, "the seafood place by the beach", "jimin");  // a step
await mem.workAround(w.work_id, 3, "jimin", { from: -2, to: 2 });        // a step, around [03]
await mem.workDeeper(w.work_id, "jimin");                                 // the next 20
await mem.closeWork(w.work_id, "jimin", { answerId: w.memories?.[2]?.id });
let w = mem.open_work("Where did we eat in Busan?", "jimin", &LookOpts::default()).await?;
let id = w["work_id"].as_str().unwrap_or_default().to_string();
mem.work_search(&id, "the seafood place by the beach", "jimin", &LookOpts::default()).await?;  // a step
mem.work_around(&id, 3, "jimin", &WorkAroundOpts {
    from: Some(-2), to: Some(2), ..Default::default()
}).await?;                                                              // a step, around [03]
mem.work_deeper(&id, "jimin").await?;                                   // the next 20
mem.close_work(&id, "jimin", w["memories"][2]["id"].as_str()).await?;

Steps

A work has five steps.

  • work_search a step: searches again with a question of your own. New memories are numbered after the ones the work holds.
  • work_around a step: what was said around memory [n], leaving out every piece the work already has.
  • work_deeper the same question further down: the next 20. Not a step; three times at most.

Asking the person

With the steps spent, or when you are unsure, work_ask marks the work as waiting on the person. Ask them in your own words and pass the reply to work_confirm. Yes keeps the work five more turns with five steps again, its state then kept; no sends it seeking again with five steps, without giving the same memories twice.

Closing

close_work closes the work; give the memory that answered as answer_id. When the answer took several steps, how it was reached is kept three days, and why shows it. Storing the answer with work_id on add or add_turn closes the work too. work_state shows the open works and the record of recent ones.