Skip to content

Commit

Permalink
skip token counting to speed up
Browse files Browse the repository at this point in the history
  • Loading branch information
ahau-square committed Oct 25, 2024
1 parent bd5bc7c commit 941c710
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/exchange/src/exchange/moderators/summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ContextSummarizer(ContextTruncate):
def rewrite(self, exchange: type["exchange.exchange.Exchange"]) -> None: # noqa: F821
"""Summarize the context history up to the last few messages in the exchange"""

self._update_system_prompt_token_count(exchange)
# self._update_system_prompt_token_count(exchange)

# TODO: use an offset for summarization
if exchange.checkpoint_data.total_token_count < self.max_tokens:
Expand Down
2 changes: 1 addition & 1 deletion packages/exchange/src/exchange/moderators/truncate.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(

def rewrite(self, exchange: Exchange) -> None:
"""Truncate the exchange messages with a FIFO strategy."""
self._update_system_prompt_token_count(exchange)
# self._update_system_prompt_token_count(exchange)

if exchange.checkpoint_data.total_token_count < self.max_tokens:
return
Expand Down

0 comments on commit 941c710

Please sign in to comment.