The community member is asking how to check the current available context size, memory used, and max tokens used at runtime, so they can reset the variables and chat engine before reaching the limit and encountering an error. The comments suggest using the llama_index library to check the total available context length for the OpenAI model, and adding an instrumentation module to track the remaining tokens.
@Logan M can I get to know current available context size and memory used and max tokens used at runtime so that when it approaches the limit, I can reset the variables and the chat engine so that it doesn’t reach the limit and break with error