instructor_ex
instructor_ex copied to clipboard
Add callbacks for debugging
This PR would add two new params to chat_completion
, namely inspect_request?
and inspect_response?
which has the effect of calling IO.inspect
on the request, just before sending it to the LLM, or on the response before processing it.
I needed this for debugging, so I think others might find it useful.
@thmsmlr How does this sit with you? An alternative might be to pass in a callback, in stead of setting a flag, and then the user can log / inspect or do whatever they want in the callback. Any thought?