Welcome to Portkey Forum

Updated 2 weeks ago

Handling Retries: Native or Code-Driven Approach?

is there a way to natively trigger a retry if this happens randomly or should i just have a retry mechanism in the code itself?
V
k
4 comments
This one would require Guardrail πŸ˜„ - a simple retry only works on cases when there's an error code.
You could put up a regex guardrail that looks for this specific phrase in the outputs and then retries the request if it is detected
Gotcha! too late to implement that right now, so gonna call it a night, but will bug you guys with more questions tomorrow! Going live on prod with yet another prompt on friday!
Add a reply
Sign up and join the conversation on Discord