4 ms·
do { resp = callAI(input); } while (!isOutputSane(resp) && attempts++ < MAX_RETRY)
by cratermoon 2y ago
do {
resp = callAI(input);
} while (!isOutputSane(resp) && attempts++ < MAX_RETRY)
- javierluraschi 2y agoThat's perfectly fine as long as that algorithm has lower running time that writing code from scratch
- cratermoon 2y agoThe runtime of `isOutputSane` is unbounded