Remove thinking chains from text content. Args: text (str): Input text that may contain thinking chains. Returns: str: Text with thinking chains removed. Example: "A B C" -> "AC"
(text)
| 60 | |
| 61 | |
| 62 | def remove_thinking(text): |
| 63 | """ |
| 64 | Remove thinking chains from text content. |
| 65 | |
| 66 | Args: |
| 67 | text (str): Input text that may contain thinking chains. |
| 68 | |
| 69 | Returns: |
| 70 | str: Text with thinking chains removed. |
| 71 | |
| 72 | Example: |
| 73 | "A<think>B</think>C" -> "AC" |
| 74 | """ |
| 75 | |
| 76 | return re.sub(r'<think>.*?</think>', '', text, flags=re.DOTALL) |
| 77 | |
| 78 | class LLM_Wrapper: |
| 79 | @staticmethod |
no outgoing calls
no test coverage detected