instructor_ex icon indicating copy to clipboard operation
instructor_ex copied to clipboard

Add callbacks for debugging

Open petrus-jvrensburg opened this issue 10 months ago • 4 comments

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?

petrus-jvrensburg avatar Apr 15 '24 07:04 petrus-jvrensburg