You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using vim-ai together with the Azure OpenAI service, which is almost compatible with the official OpenAI API but does have its quirks. I'm using a self-made proxy service in between, which is supposed to handle the differences and allow applications that aren't "Azure aware" to use pure OpenAI paths and mechanisms transparently with the Azure models.
Since updating the proxy to use the latest Azure API version, vim-ai stopped working correctly. It throws IndexErrors as the response from the API contains an empty 'choices' array, but vim-ai always assumes that there is at least one item in there. Here's an example response (via debug logging):
I managed to get it working correctly again with the simple patch below. Sorry for not making a proper PR for this, but I really don't have the time right now (to really think through the change or do proper testing for example) so I decided to create a quick issue instead.
I'm using vim-ai together with the Azure OpenAI service, which is almost compatible with the official OpenAI API but does have its quirks. I'm using a self-made proxy service in between, which is supposed to handle the differences and allow applications that aren't "Azure aware" to use pure OpenAI paths and mechanisms transparently with the Azure models.
Since updating the proxy to use the latest Azure API version, vim-ai stopped working correctly. It throws IndexErrors as the response from the API contains an empty 'choices' array, but vim-ai always assumes that there is at least one item in there. Here's an example response (via debug logging):
I managed to get it working correctly again with the simple patch below. Sorry for not making a proper PR for this, but I really don't have the time right now (to really think through the change or do proper testing for example) so I decided to create a quick issue instead.
The text was updated successfully, but these errors were encountered: