Issue (or wrong usage) with OpenAiChatCompletionBase #11107
Replies: 1 comment 1 reply
-
Hi @Icewater1337, this looks like a bug -- I created an issue #11208 to track this fix (track along there for further progress). Thanks for bringing this up. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey. I have a kernel with an AzureChatCompletionService using the Python library.
now what I noticed is this, that when the OpenAI api returns an error, the ChatCompletion response has choices = None, and the error is in the 'model_extra' dict.
semantic-kernel/python/semantic_kernel/connectors/ai/open_ai/services/open_ai_chat_completion_base.py
Line 88 in 1322314
However on
semantic-kernel/python/semantic_kernel/connectors/ai/open_ai/services/open_ai_chat_completion_base.py
Line 91 in 1322314
we can see, that it tries to iterate over response.choices nevertheless, which always gives a cant iterate over None exception and the execution fails, without ever returning the API error.
Is this intended? am I using it wrong somehow?
My package versions:
semantic-kernel==1.24.1
openai==1.68.0
Model that I call:
"gpt-4o-2024-05-13"
and api version
"2024-10-21"
I am hesitant to open an Issue yet, because I am not sure if i miss something.
Beta Was this translation helpful? Give feedback.
All reactions