Shubangi Greetings & Welcome to Microsoft Q&A forum!
I have installed and tried with both latest version and 0.28 version but unable to import openai and it is showing ModuleNotFoundError: No module named 'openai' even after restarting kernal, compute
Which documentation are you following? Make sure you are using the same kernel where you have installed Azure OpenAI.
The module installed in the Python environment associated with the notebook's kernel. Each kernel in Azure ML Studio has its own isolated Python environment, which means that the packages you install in one kernel will not be available in another kernel.