Work with Azure's OpenAI API
If I try to run the demo using Azure's OpenAI API I get the following result:
VBox(children=(IntProgress(value=0, description='Progress:'), HTML(value='<br>'), HBox(children=(Button(description='👎', style=ButtonStyle()), Button(description='👍', style=ButtonStyle()))), HTML(value="Must provide an 'engine' or 'deployment_id' parameter to create a <class 'openai.api_resources.chat_completion.ChatCompletion'>"), Label(value='ThumbTest: 96c78037')))
This is the error:
"Must provide an 'engine' or 'deployment_id' parameter to create a <class 'openai.api_resources.chat_completion.ChatCompletion'>"
There is currently no way to pass deployment_id down to the constructor. It looks like thumb uses langchain which has a different classes for OpenAI and Azure's OpenAI. OpenAI's Python SDK uses the same class for both services. That class constructor can get most of what it needs from the the environment variables, but the deployment_id must be passed in place of the model argument that OpenAI uses.
Here is an example of the differences between OpenAI and Azure's version of OpenAI. How to switch between OpenAI and Azure OpenAI endpoints with Python
I see there is a TODO for adding non-openai chat models and I wanted to raise this issue to point out that Azure's API is technically the same chat model but with a slightly different interface.