Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Fabric - cant import AzureOpenAI

when you try to run the sample code in a fabric pyspark(python) notebook you might instantly hit the following issue   ImportError: cannot import name 'AzureOpenAI' from 'openai' (/home/trusted-ser...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi. I must have chose the wrong type of post. I was not Posting a question but a solution.

    I followed the instructions from the github repo and ran into Thais issue. That's why I thought I'd post the solution for others to benefit.

  • Anonymous's avatar
    Anonymous
    2 years ago

    here is the inline code needed at the top of your script

     

    %pip install openai==1.12.0