diff --git a/lib/ai/service/ai_service.dart b/lib/ai/service/ai_service.dart index cffd55c..c002107 100644 --- a/lib/ai/service/ai_service.dart +++ b/lib/ai/service/ai_service.dart @@ -419,7 +419,9 @@ class AiService with FirebaseMixin, ToolsMixin { final content = Content.text(stuffedPrompt); final response = await model.generateContent([content]); - return response.text ?? ''; + return response.text != null && response.text!.isNotEmpty + ? response.strippedText() + : ''; } Future translate(