Open jkomoros opened 1 year ago
One thing to consider: since the data structure is roughly set, perhaps the class needs to be controller-style -- it takes library as argument and knows how to operate on it.
completion_model
to the library format, because technically the token_count of chunks is specific to the completion_model being usedtruncate(count=, count_type)
that truncates a library down to a given context length. Basically get_context
.Library.chunk()
return a Chunk
object.
Currently it's a particularly-shaped data structure that is passed to a number of different functions.
That means the structure of the data has to be known by a number of different scripts, making it hard to change.
It also means that if we want to do something clever with the format, like allow chunks to reference a shared
info_id
, we need to teach everything that deals with chunks how to do that.