memory = ChatMemoryBuffer.from_defaults(token_limit=5000)
would be the manual way to configure itfrom llama_index.core.memory import ChatMemoryBuffer memory = ChatMemoryBuffer.from_defaults(token_limit=8000) chat_engine = index.as_chat_engine(..., memory=memory)