Package org.springframework.ai.converter
Interface ResponseTextCleaner
- All Known Implementing Classes:
CompositeResponseTextCleaner,MarkdownCodeBlockCleaner,ThinkingTagCleaner,WhitespaceCleaner
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy interface for cleaning LLM response text before parsing. Different
implementations can handle various response formats and patterns from different AI
models.
- Since:
- 1.1.0
- Author:
- liugddx
-
Method Summary
-
Method Details
-
clean
Clean the given text by removing unwanted patterns, tags, or formatting.- Parameters:
text- the raw text from LLM response- Returns:
- the cleaned text ready for parsing
-