valentinegb / openai

An unofficial Rust library for the OpenAI API.
https://crates.io/crates/openai/
MIT License
61 stars 18 forks source link

fix(error): make error type public #42

Closed ashleygwilliams closed 1 year ago

ashleygwilliams commented 1 year ago

hey! thanks for this cool project, i really appreciate the approach. was working on adding error handling to the chat example w/thiserror and found that the error type wasn't public. would be very helpful if it was :)

happy to contribute the error handling in the example as well if you'd like, just let me know

valentinegb commented 1 year ago

Whoops- sorry about that! Thanks for your pull request :)

valentinegb commented 1 year ago

You may update any of the examples if you would like, but as I explain in #38, the generate-from-schema branch is likely the future of this library, and it does have quite a few differences from the perspective of a developer using the library than the main branch (it might even have better error handling than the main branch-). I would hate for your time and effort to go to waste, but I suppose that's subjective, so I will happily allow you to make a pull request for that.