Limitation in jupyter cells left to make tests in a lesson?

Error i get:

ImportError: cannot import name 'AsyncOpenAI' from 'openai' (/usr/local/lib/python3.9/site-packages/openai/

Hi in the last cell of the notebook of the course, Isabel tell us to make some tests and changes to understand better the lesson.

So im trying to use async call to OpenAi api, because its more effective… but seems that notebooks are also limited:

Demonstrates how to use the `ChatInterface` to create a chatbot using
OpenAI's with async/await.

import panel as pn
from openai import AsyncOpenAI


async def callback(contents: str, user: str, instance:
    response = await
        messages=[{"role": "user", "content": contents}],
    message = ""
    async for chunk in response:
        part = chunk.choices[0].delta.content
        if part is not None:
            message += part
            yield message

aclient = AsyncOpenAI()
chat_interface =, callback_user="ChatGPT")
    "Send a message to get a reply from ChatGPT!", user="System", respond=False

Original font; OpenAI - Panel Chat Examples

Im also trying to imporve the Chat interface.