-
Notifications
You must be signed in to change notification settings - Fork 305
FAQ
sigoden edited this page Aug 1, 2024
·
3 revisions
Sessions require context memory. However, The chat API is stateless. Therefore, each request needs to include the chat history. Chat history grows rapidly with the conversation, leading to a rapid increase in data transmitted to the API server.
This presents two problems:
- The amount of data the LLM needs to process for each request keeps increasing, resulting in longer response times and increased costs.
- The data volume may exceed the LLM's processing capacity, leading to errors.
AICHat's strategy is to automatically compress the chat history when the number of tokens in the chat history exceeds a certain value (compress_threshold
).