ChatGPTSwiftUI icon indicating copy to clipboard operation
ChatGPTSwiftUI copied to clipboard

Provide error also in sendMessage completion instead of throwing it

Open sgoehler opened this issue 1 year ago • 0 comments

Hey, first of, thanks for making this API possible! I have a request, as I'm using your API with an ObjC wrapper (it's too Swifty to use it directly, unfortunately).

The issue is that the method sendMessage throws the error, which is almost impossible to wrap properly. It would be much more convenient to handle the result in a completion closure with both optional result and error provided. Do you think this can be made possible?

sgoehler avatar Mar 21 '23 16:03 sgoehler