From 566b0ffbabcfaa798eaff5624fe81bb2845b29b6 Mon Sep 17 00:00:00 2001 From: Shawn Fang Date: Wed, 10 Jul 2024 16:05:43 -0700 Subject: [PATCH] fix sample and make it runnable --- .../ai/openai/usage/GetChatCompletionsStreamAsyncSample.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();