The question was about conversation history.
Time was really tight in the interview, only 45 minutes, and I needed to quickly write 3 parts. It was a very full-stack, hands-on interview.
It is best to quickly sort out how the classes in the several APIs relate to each other right at the start. The problem is not hard, but if you are not familiar with the code, you need to spend a few minutes reading it carefully and working out the relationships.
Part 1: keep using next_cursor to fetch the next page, until there are no more conversations.
Part 2: parse out the token_count in order to compact the conversation.
Discussion
Loading comments…