spring-ai
spring-ai copied to clipboard
LastMaxTokenSizeContentPurger Logic backwards
trafficstars
I don't see any document references to it and there are no tests so I'm not 100% but looking at LastMaxTokenSizeContentPurger it appears to return all content that will not fit vs the content that does fit
Shouldn't L61 be newList.addAll(datum.subList(0, index)); ?
https://github.com/spring-projects/spring-ai/blob/ff52859b2d56029dce8f18d47b4fecb9cc8720c4/spring-ai-client-chat/src/main/java/org/springframework/ai/chat/client/advisor/LastMaxTokenSizeContentPurger.java#L61C24-L61C31