feat: fix new summarizer code and add more tests (#6461)

This commit is contained in:
Sarah Wooders
2025-11-30 00:49:38 -08:00
committed by Caren Thomas
parent 86023db9b1
commit 91e3dd8b3e
25 changed files with 728 additions and 358 deletions

View File

@@ -58,11 +58,11 @@ def load_grammar_file(grammar):
return grammar_str
# TODO: support tokenizers/tokenizer apis available in local models
def count_tokens(s: str, model: str = "gpt-4") -> int:
from letta.utils import count_tokens
return count_tokens(s, model)
## TODO: support tokenizers/tokenizer apis available in local models
# def count_tokens(s: str, model: str = "gpt-4") -> int:
# from letta.utils import count_tokens
#
# return count_tokens(s, model)
def num_tokens_from_functions(functions: List[dict], model: str = "gpt-4"):