diff --git a/sdk/openai/azure-ai-openai/src/samples/java/com/azure/ai/openai/usage/GetChatCompletionsStreamAsyncSample.java b/sdk/openai/azure-ai-openai/src/samples/java/com/azure/ai/openai/usage/GetChatCompletionsStreamAsyncSample.java index 39e14ce98499..c2a7fd64a1fc 100644 --- a/sdk/openai/azure-ai-openai/src/samples/java/com/azure/ai/openai/usage/GetChatCompletionsStreamAsyncSample.java +++ b/sdk/openai/azure-ai-openai/src/samples/java/com/azure/ai/openai/usage/GetChatCompletionsStreamAsyncSample.java @@ -68,7 +68,7 @@ public static void main(String[] args) throws InterruptedException { */ if (CoreUtils.isNullOrEmpty(chatCompletions.getChoices())) { - return null; + return ""; } ChatResponseMessage delta = chatCompletions.getChoices().get(0).getDelta();