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.

@FunctionalInterface public interface ResponseTextCleaner
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

    Modifier and Type
    Method
    Description
    clean(String text)
    Clean the given text by removing unwanted patterns, tags, or formatting.
  • Method Details

    • clean

      String clean(String text)
      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