AOSSIE-Org / AOSSIE-Org/DocPilot
fix: GeminiService has unnecessary hardcoded 3-second delay in generatePrescription()
- Linguagem predominante
- Dart
- Estrelas
- 18
- Forks
- 24
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
## Description
In `lib/features/transcription/data/gemini_service.dart`, the `generatePrescription()` method has an arbitrary `Future.delayed(const Duration(seconds: 3))` before making the API call:
```dart
Future generatePrescription(String transcription) async {
await Future.delayed(const Duration(seconds: 3)); // <-- WHY?
return await _chatbotService.getGeminiResponse(
"Generate a prescription based on the conversation in this transcription: $transcription",
);
}
```
This adds 3 seconds of unnecessary wait time for every prescription generation. The summary generation method does NOT have this delay, so it appears unintentional.
## Impact
- Users wait 3 extra seconds for every prescription
- On slow networks, combined with API latency, this makes the experience noticeably sluggish
## Expected Fix
Remove the `Future.delayed` call. If rate limiting was the intent, it should be handled properly with retry logic or documented.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.