Sync vs async client methods
Spot the mismatch between the client type and awaiting.
Codepython
from openai import OpenAI
client = OpenAI()
async def ask():
response = await client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hi"}],
)
return responseWhat is the bug when awaiting this call?