track num_exhausted_context_windows

This commit is contained in:
Paul Gauthier 2023-06-29 15:32:45 -07:00
parent 995fdc3415
commit b11a6fa7ee
2 changed files with 8 additions and 0 deletions

View file

@ -44,6 +44,7 @@ class Coder:
repo_map = None
functions = None
total_cost = 0.0
num_exhausted_context_windows = 0
@classmethod
def create(
@ -447,6 +448,7 @@ class Coder:
exhausted = True
if exhausted:
self.num_exhausted_context_windows += 1
self.io.tool_error("The chat session is larger than the context window!\n")
self.commands.cmd_tokens("")
self.io.tool_error("\nTo reduce token usage:")