In this video, you ran Mei’s whole practice session through the partner, one call per message, and watched it forget her name one message after she gave it. Then you sent the earlier turns with each call, and the partner used them.
Key Points
- A practice session is a conversation. Mei’s session has two messages. First, she introduces herself by name. Then she orders a green tea and asks the partner to write her name on the cup.
- One call per message is the natural first attempt. It follows how a chat window feels. The script loops over Mei’s messages and prints each one. It calls
streamAnswer()with that message as the input, then writes the reply as it arrives and keeps a copy as before. To keep the loop short, it leaves out thetryandcatchfrom the last video. - The partner forgot Mei’s name. The first reply greeted her by name. The second reply asked what her name was, so it could write it on the cup. Nothing crashed and both calls finished, so a member would only notice that the partner forgot her. Your run’s words will differ.
- Each request carries everything the model sees. The first request carried the partner’s instructions and Mei’s first message, with her name in it. The second carried the same instructions and her second message, without her name. The model generates each reply only from the text in that one request and has no record of earlier calls.
- A chat window seems to remember because the app sends the earlier turns again with every message.
- Send the earlier turns every time. In a first rough form, the turns go into one
historystring. Before each call, the member’s message is added to it with aMember:label, and the input is the whole history.
The loop already collects the reply as it prints. After the loop, a reply that finished is added with a Partner: label.
The second call’s input held Mei’s first message, the partner’s reply, and her new message, and the second reply wrote Mei on the cup. - Only a finished reply is saved. A reply cut off at the limit stays out of the history, so the next call never builds on half an answer. - This history is rough. It’s one string, and only the labels mark who said what.