save model to ChatSummary

This commit is contained in:
JV 2023-08-15 20:28:30 +12:00 committed by Joshua Vial
parent 8fca0f27ee
commit 1fc2abe3d0

View file

@ -12,6 +12,7 @@ class ChatSummary:
def __init__(self, model=models.GPT35.name, max_tokens=1024):
self.tokenizer = tiktoken.encoding_for_model(model)
self.max_tokens = max_tokens
self.model = model
def too_big(self, messages):
sized = self.tokenize(messages)