-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: add support for removing thinking tags from input text in BeanOutputConverter #4667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…utputConverter Signed-off-by: liugddx <liugddx@gmail.com>
Signed-off-by: liugddx <liugddx@gmail.com>
Thanks @liugddx for your contribution on this issue! Just a heads-up: there’s already an open PR (#3927) addressing the same topic. I tested the changes proposed here, but unfortunately, they didn’t work as expected for the qwen3:14b model running locally on my Ollama instance. Could you take a look at this comment, which suggests a slightly different approach? It would be great to find a solution that works for both qwen3 and nova models. |
…abilities Signed-off-by: liugddx <liugddx@gmail.com>
…abilities Signed-off-by: liugddx <liugddx@gmail.com>
Thank you for your reply. I have already made it compatible with Qwen. If possible, please give it another try. |
...ng-ai-model/src/main/java/org/springframework/ai/converter/CompositeResponseTextCleaner.java
Outdated
Show resolved
Hide resolved
spring-ai-model/src/main/java/org/springframework/ai/converter/BeanOutputConverter.java
Show resolved
Hide resolved
spring-ai-model/src/main/java/org/springframework/ai/converter/ThinkingTagCleaner.java
Outdated
Show resolved
Hide resolved
I have performed new tests with your recent modifications and it works well. Well done! I have added a few review comments. As a contributor myself, I think it would be good to check with a member of this project to ensure it aligns with the project’s long-term goals. Let me know if you’d like to discuss any of my comments! |
…rmance - Update @SInCE to 1.1.0 as suggested by nicolaskrier - Add fast-path optimization in ThinkingTagCleaner for non-thinking models - Enhance documentation explaining why ThinkingTagCleaner is safe to use by default - Clarify performance characteristics in JavaDoc Addresses review comments from nicolaskrier in PR spring-projects#4667 Signed-off-by: liugddx <liugddx@gmail.com>
…rter Signed-off-by: liugddx <liugddx@gmail.com>
Close #4650
Thank you for taking time to contribute this pull request!
You might have already read the contributor guide, but as a reminder, please make sure to:
git commit -s
) per the DCOmain
branch and squash your commitsFor more details, please check the contributor guide.
Thank you upfront!