Maybe below code is the replacement i have not tried yet though but found on github
from openai import AsyncOpenAI
client = AsyncOpenAI()
response = await client.chat.completions.create(
model="gpt-4",
messages=messages,
tools=functions,
temperature=0.0,
tool_choice=None
)