I am writing a discord bot that uses the ChatGPT API, how do I write the ChatCompletion() function asynchronously? Right now it blocks the rest of the code from executing when a prompt takes a while to execute.
The function is currently an async function that gets awaited when ran, but the actual API call to the ChatCompletion.create() method is blocking.
Any assistance would be greatly appreciated, and I can share my code offline to a member of the support staff.