Open hello-z opened 1 year ago
The code on github is out of sync with that in pypi, but It seems that async is not used when calling the openai.ChatCompletion.create function, as follows:
# doctran/transformers/transformers.py completion = self.config.openai.ChatCompletion.create(**function_call.dict()) arguments = completion.choices[0].message["function_call"]["arguments"]
Maybe it should?
# doctran/transformers/transformers.py completion = await self.config.openai.ChatCompletion.acreate(**function_call.dict()) arguments = completion.choices[0].message["function_call"]["arguments"]
The code on github is out of sync with that in pypi, but It seems that async is not used when calling the openai.ChatCompletion.create function, as follows:
Maybe it should?