remove max_input_size property from assistants #362
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The abstract
Assistant.max_input_size
property was a left over from the prototype implementation we started from. The idea behind it was for to be able to automatically fill the context window, such that it is maxed out with the sources and the user prompt.However, this makes quite a few assumptions, that held for our prototype, but are no longer true for Ragna:
Chroma
andLanceDB
have a parameter to pull a specific number of tokensragna/ragna/source_storages/_chroma.py
Line 80 in 4a667f9
ragna/ragna/source_storages/_lancedb.py
Line 94 in 4a667f9
but our demo source storage does not
ragna/ragna/source_storages/_demo.py
Lines 39 to 41 in 4a667f9
Since this parameter is not part of the core protocol, we cannot make any assumptions on whether it is present or not. This holds especially for user defined source storages.
Meaning,
Assistant.max_input_size
is not only unused, actually using it requires a major effort in designing a proper interface. And with all that uncertainty I'd rather not force users to implement this property.Note that this is only mildly BC breaking. Users that had defined this property on their custom assistants are untouched by this change. It just stays unused. Only if you access this property on our builtin assistants, you will have a breakage.