Key capabilities of Instructor
StructuredOutput::create()
method to send a prompt and extract the data into the target object. The responseModel
parameter specifies the model to use for extraction.
LeadReport
model is passed as the $responseModel
, and $maxRetries
is set to 2. It means that if the extracted data does not match the model, Instructor will re-ask the model 2 times before giving up.