promptulate
promptulate copied to clipboard
Add retry for LLMFactory or BaseLLM
🚀 Feature Request
Add the retry mechanism to increase the robustness of the system because LLM output is unstable and sometimes not output in the specified format if formatted.
import promptulate as pne
model = pne.LLMFactory.build(model_name="gpt-4-turbo", model_config={...}, max_retry=5)
model("hello")
The model must run five times before it finally throws an exception.