Skip to content

LastMaxTokenSizeContentPurger Logic backwards #2894

@jasonparallel

Description

@jasonparallel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions