[ ] Do we make the Block.tokenizer_model nullable / Optional[str], or str with a default imported from constants.py?
For example, if the field is nullable, in the Pydantic validator that throws an error if the token count is higher than the limit, we can just use constants.DEFAULT_TOKENIZER_MODEL if self.tokenizer_model is None
Or (if we set defaults), self.tokenizer_model will be constants.DEFAULT_TOKENIZER_MODEL
Seems to me like the key difference is if we make the field nullable / have the default lazily inferred, then we can change the default for all existing blocks with new package versions?
[ ] Or do we put tokenizer_model inside of metadata_?
TODOs for later PR:
[ ] Initialize the tokenizer_model in the Memory class to be drawn from agent.llm_config.model
[ ] Make sure that when the agent.llm_config.model is changed, the memory.tokenizer_model is changed too
2000 tokens is a good starting point? (~8k chars)
Pending design decision:
Block.tokenizer_model
nullable /Optional[str]
, orstr
with a default imported fromconstants.py
?constants.DEFAULT_TOKENIZER_MODEL
ifself.tokenizer_model is None
self.tokenizer_model
will beconstants.DEFAULT_TOKENIZER_MODEL
tokenizer_model
inside ofmetadata_
?TODOs for later PR:
tokenizer_model
in theMemory
class to be drawn fromagent.llm_config.model
agent.llm_config.model
is changed, thememory.tokenizer_model
is changed too