Closed willbakst closed 2 weeks ago
Changes from #607 make this better through type/lint errors, but I still think a value error would be useful here.
Upon further thought, I think the type/lint errors are sufficient here, and adding additional value errors would be unnecessary overhead for no additional value, so I'm closing this issue.
Description
The error message when using the incorrect client with sync vs. async calls is currently unhelpful. See #513
We should add better error messages that throw a
ValueError
in the event that the function is sync and using an async client and vice versa.For example, for OpenAI this would happen as an else block check here
We should add this for all providers.