Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create. If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:
Bug description A clear and concise description of what the bug is about.
I am utilizing Azure OpenAI and encountered a null pointer exception, attributable to the first response choice being an empty array.
While they are distinct platforms, I believe they ought to be interoperable. Environment Please provide as many details as possible: Spring AI version, Java version, which vector store you use if any, etc
Steps to reproduce Steps to reproduce the issue. use azure openai api . create a stream req .
data: {"id":"","object":"","created":0,"model":"","prompt_filter_results":[{"prompt_index":0,"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}],"choices":[]}
Expected behavior A clear and concise description of what you expected to happen.
The null pointer exception is no longer being thrown.
Minimal Complete Reproducible example
Please provide a failing test or a minimal complete verifiable example that reproduces the issue.
Bug reports that are reproducible will take priority in resolution over reports that are not reproducible.
Comment From: lgxisbb
I have created a pull request to mitigate this issue. https://github.com/spring-projects/spring-ai/pull/466