Forum Discussion
Fabric - cant import AzureOpenAI
- Anonymous2 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.
- Anonymous2 years ago
here is the inline code needed at the top of your script
%pip install openai==1.12.0
The github page has all you need. the sample uses environment variables. not that simple in fabric. so if you want to get started fast, try putting the parameters into the code directly.
instructions on getting started and getting your API Key here:
Hack-Together-Fabric-AI/AI_access.md at main · microsoft/Hack-Together-Fabric-AI · GitHub
sample code to talk to the api here
and to make your life easier: here a snippet that worked for me. just replace the api key
Thanks a lot. This was helpful.