File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
articles/ai-foundry/model-inference/includes Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ author: santiagxf
36
36
import com.azure.ai.inference.EmbeddingsClientBuilder ;
37
37
import com.azure.ai.inference.models.EmbeddingsResult ;
38
38
import com.azure.ai.inference.models.EmbeddingItem ;
39
+ import com.azure.ai.inference.ChatCompletionsClient ;
40
+ import com.azure.ai.inference.ChatCompletionsClientBuilder ;
39
41
import com.azure.core.credential.AzureKeyCredential ;
40
42
import com.azure.core.util.Configuration ;
41
43
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ chatMessages.add(ChatRequestUserMessage.fromContentItems(contentItems));
78
78
ChatCompletionsOptions options = new ChatCompletionsOptions (chatMessages);
79
79
options. setModel(" phi-4-multimodal-instruct" )
80
80
81
- ChatCompletions completions = client. complete(options);
81
+ ChatCompletions response = client. complete(options);
82
82
```
83
83
84
84
The response is as follows, where you can see the model's usage statistics:
@@ -111,7 +111,10 @@ List<ChatRequestMessage> chatMessages = new ArrayList<>();
111
111
chatMessages. add(new ChatRequestSystemMessage (" You are an AI assistant that helps people find information." ));
112
112
chatMessages. add(ChatRequestUserMessage . fromContentItems(contentItems));
113
113
114
- ChatCompletions completions = client. complete(new ChatCompletionsOptions (chatMessages));
114
+ ChatCompletionsOptions options = new ChatCompletionsOptions (chatMessages);
115
+ options. setModel(" phi-4-multimodal-instruct" )
116
+
117
+ ChatCompletions response = client. complete(options);
115
118
```
116
119
117
120
## Use chat completions with audio
You can’t perform that action at this time.
0 commit comments