instructor
instructor copied to clipboard
Give ability to change retry prompt and model/provider
Is your feature request related to a problem? Please describe. For complex queries mistral-intruct/others on ollama dont work and multiple retries still dont give a parseble soln.
Describe the solution you'd like Allow n retries on the same model else give a Callaback where in i can swicth the model/provider. ie from mistral/ollama to gpt4/Azure and prompt if needed.
Describe alternatives you've considered None - other than custom
Additional context Add any other context or screenshots about the feature request here.
do you have a proposal for what that looks like?
Would this work? (no need to change Instructor)
try:
call_model1()
except Exception:
try:
call_model2()
except Exception:
call_model3()
Allow n retries on the same model
This is already possible with max_retries
I am very interested in being able to edit the 'retry prompt' as mentioned here
Hmm @Mr-Ruben I think that retries with multiple models should be handled by the user itself. The main philosophy of instructor is to provide a wrapper over the main client APIs so I think this isn't something we should support.