Loading topic
compact folds old messages into a summary and how build_request sends that summary with recent messages. A summary is a model's rewrite of your conversation, and it is lossy.5 min readcompact, build_request, and rolling summaries. It also assumes you can write basic Python tests. Here you will build a small test harness that checks whether specific facts are still present after a conversation has been compacted.5 min readestimate_tokens, truncate_history, compact, and build_request from those chapters.6 min read