We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When will there be support for asynchronous usage?
The text was updated successfully, but these errors were encountered:
hey @bballboy8 why do you need acreate support?
i've seen people make async calls and just await the openai response inside the function, so i'm not sure i understand the use-case
Sorry, something went wrong.
So for something like this, it would make more sense to have an async call within the async function:
async def _call_gpt(prompt: str, **kwargs: Any) -> Dict: """Call GPT api with backoff.""" openai.ChatCompletion.acreate = reliableGPT( openai.ChatCompletion.acreate, user_email="charlie@reclip.app" ) params = {**DEFAULT_GPT_PARAMS, **kwargs} return await openai.ChatCompletion.acreate( model=settings.OPENAI_GPT_MODEL, messages=[dict(role="user", content=prompt)], request_timeout=15, **params, )
No branches or pull requests
When will there be support for asynchronous usage?
The text was updated successfully, but these errors were encountered: