ai_response_cleaner 1.0.0
ai_response_cleaner: ^1.0.0 copied to clipboard
A lightweight Dart package to strip Markdown formatting and return clean text from raw AI model responses.
example/ai_response_cleaner_example.dart
import 'package:ai_response_cleaner/ai_response_cleaner.dart';
void main() {
const rawAiResponse = '''
<thinking>
The user is asking for a greeting in bold.
</thinking>
# Hello!
Here is your response in **bold** and *italic*:
Check out [Flutter](https://flutter.dev) for building great apps!
''';
final cleanText = AiResponseCleaner.clean(rawAiResponse);
print(cleanText);
}