Skip to content

make responseMessage in AzureOpenAiChatModel.buildGeneration null-safe #2789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

berjanjonker
Copy link
Contributor

Fixes #2691

Signed-off-by: Berjan Jonker <[email protected]>
@@ -106,6 +107,26 @@ void testMessageHistory() {
assertThat(response.getResult().getOutput().getText()).containsAnyOf("Blackbeard");
}

@Test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test passes without the fix to the ChatModel, so I'm not sure what to make of it. Perhaps this is an intermittent error in what the model returns?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments in #2691 (comment) as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained in #2691 this PR fixes a NPE when Asynchronous Filter is enabled for your model. As it fixes the streaming output, I don't know for sure if the content filtering works as expected with this option enabled.

@markpollack
Copy link
Member

markpollack commented Apr 30, 2025

Fantastic, thanks so much for the investigation and the PR, it is now merged. merged in af0303f

@markpollack markpollack added this to the 1.0.0-M8 milestone Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nullpointer when using Azure Open AI and streaming
2 participants