ScoreBasedContextCreator
- token_counter (BaseTokenCounter): Token counter instance used to compute the combined token count of the returned messages.
- token_limit (int): Retained for API compatibility. No longer used to filter records.
init
token_counter
token_limit
set_cached_token_count
- token_count (int): The total token count (prompt + completion) from LLM response usage.
- message_count (int): The number of messages including the assistant response that will be added to memory.
clear_cache
_estimate_message_tokens
- message: The OpenAI message to estimate.