/
com.azure.ai.openai.OpenAIAsyncClient.yml
531 lines (531 loc) · 76.3 KB
/
com.azure.ai.openai.OpenAIAsyncClient.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
### YamlMime:JavaType
uid: "com.azure.ai.openai.OpenAIAsyncClient"
fullName: "com.azure.ai.openai.OpenAIAsyncClient"
name: "OpenAIAsyncClient"
nameWithType: "OpenAIAsyncClient"
summary: "Initializes a new instance of the asynchronous Open<wbr>AIClient type."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public final class **OpenAIAsyncClient**"
methods:
- uid: "com.azure.ai.openai.OpenAIAsyncClient.generateSpeechFromText(java.lang.String,com.azure.ai.openai.models.SpeechGenerationOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.generateSpeechFromText(String deploymentOrModelName, SpeechGenerationOptions speechGenerationOptions)"
name: "generateSpeechFromText(String deploymentOrModelName, SpeechGenerationOptions speechGenerationOptions)"
nameWithType: "OpenAIAsyncClient.generateSpeechFromText(String deploymentOrModelName, SpeechGenerationOptions speechGenerationOptions)"
summary: "Generates text-to-speech audio from the input text."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "A representation of the request options that control the behavior of a\n text-to-speech operation."
name: "speechGenerationOptions"
type: "<xref href=\"com.azure.ai.openai.models.SpeechGenerationOptions?alt=com.azure.ai.openai.models.SpeechGenerationOptions&text=SpeechGenerationOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<BinaryData> generateSpeechFromText(String deploymentOrModelName, SpeechGenerationOptions speechGenerationOptions)"
desc: "Generates text-to-speech audio from the input text."
returns:
description: "the response body on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.generateSpeechFromTextWithResponse(java.lang.String,com.azure.core.util.BinaryData,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.generateSpeechFromTextWithResponse(String deploymentOrModelName, BinaryData speechGenerationOptions, RequestOptions requestOptions)"
name: "generateSpeechFromTextWithResponse(String deploymentOrModelName, BinaryData speechGenerationOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.generateSpeechFromTextWithResponse(String deploymentOrModelName, BinaryData speechGenerationOptions, RequestOptions requestOptions)"
summary: "Generates text-to-speech audio from the input text."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "A representation of the request options that control the behavior of a\n text-to-speech operation."
name: "speechGenerationOptions"
type: "<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<BinaryData>> generateSpeechFromTextWithResponse(String deploymentOrModelName, BinaryData speechGenerationOptions, RequestOptions requestOptions)"
desc: "Generates text-to-speech audio from the input text.\n\n**Request Body Schema**\n\n```java\n{\n input: String (Required)\n voice: String(alloy/echo/fable/onyx/nova/shimmer) (Required)\n response_format: String(mp3/opus/aac/flac) (Optional)\n speed: Double (Optional)\n }\n```\n\n**Response Body Schema**\n\n```java\nBinaryData\n```"
returns:
description: "the response body along with <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscription(java.lang.String,java.lang.String,com.azure.ai.openai.models.AudioTranscriptionOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscription(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions)"
name: "getAudioTranscription(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranscription(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions)"
summary: "Gets transcribed text and associated metadata from provided spoken audio file data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The file name that is represented in the <code>file</code> field of <xref uid=\"com.azure.ai.openai.models.AudioTranscriptionOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranscriptionOptions\"></xref>"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio transcription request."
name: "audioTranscriptionOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranscriptionOptions?alt=com.azure.ai.openai.models.AudioTranscriptionOptions&text=AudioTranscriptionOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<AudioTranscription> getAudioTranscription(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions)"
desc: "Gets transcribed text and associated metadata from provided spoken audio file data. Audio will be transcribed in the written language corresponding to the language it was spoken in."
returns:
description: "<xref uid=\"com.azure.ai.openai.models.AudioTranscription\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranscription\"></xref> transcribed text and associated metadata from provided spoken audio data on\n successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.ai.openai.models.AudioTranscription?alt=com.azure.ai.openai.models.AudioTranscription&text=AudioTranscription\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscriptionAsPlainText(java.lang.String,com.azure.ai.openai.models.AudioTranscriptionOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscriptionAsPlainText(String deploymentOrModelName, AudioTranscriptionOptions audioTranscriptionOptions)"
name: "getAudioTranscriptionAsPlainText(String deploymentOrModelName, AudioTranscriptionOptions audioTranscriptionOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranscriptionAsPlainText(String deploymentOrModelName, AudioTranscriptionOptions audioTranscriptionOptions)"
summary: "Gets transcribed text and associated metadata from provided spoken audio data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio transcription request."
name: "audioTranscriptionOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranscriptionOptions?alt=com.azure.ai.openai.models.AudioTranscriptionOptions&text=AudioTranscriptionOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<String> getAudioTranscriptionAsPlainText(String deploymentOrModelName, AudioTranscriptionOptions audioTranscriptionOptions)"
desc: "Gets transcribed text and associated metadata from provided spoken audio data. Audio will be transcribed in the written language corresponding to the language it was spoken in."
returns:
description: "transcribed text and associated metadata from provided spoken audio data on successful completion of\n <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscriptionText(java.lang.String,java.lang.String,com.azure.ai.openai.models.AudioTranscriptionOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscriptionText(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions)"
name: "getAudioTranscriptionText(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranscriptionText(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions)"
summary: "Gets transcribed text and associated metadata from provided spoken audio file data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The file name that is represented in the <code>file</code> field of <xref uid=\"com.azure.ai.openai.models.AudioTranscriptionOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranscriptionOptions\"></xref>"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio transcription request."
name: "audioTranscriptionOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranscriptionOptions?alt=com.azure.ai.openai.models.AudioTranscriptionOptions&text=AudioTranscriptionOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<String> getAudioTranscriptionText(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions)"
desc: "Gets transcribed text and associated metadata from provided spoken audio file data. Audio will be transcribed in the written language corresponding to the language it was spoken in."
returns:
description: "transcribed text and associated metadata from provided spoken audio data on successful completion of\n <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscriptionTextWithResponse(java.lang.String,java.lang.String,com.azure.ai.openai.models.AudioTranscriptionOptions,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscriptionTextWithResponse(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions, RequestOptions requestOptions)"
name: "getAudioTranscriptionTextWithResponse(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranscriptionTextWithResponse(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions, RequestOptions requestOptions)"
summary: "Gets transcribed text and associated metadata from provided spoken audio file data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The file name that is represented in the <code>file</code> field of <xref uid=\"com.azure.ai.openai.models.AudioTranscriptionOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranscriptionOptions\"></xref>"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio transcription request."
name: "audioTranscriptionOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranscriptionOptions?alt=com.azure.ai.openai.models.AudioTranscriptionOptions&text=AudioTranscriptionOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<String>> getAudioTranscriptionTextWithResponse(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions, RequestOptions requestOptions)"
desc: "Gets transcribed text and associated metadata from provided spoken audio file data. Audio will be transcribed in the written language corresponding to the language it was spoken in."
returns:
description: "transcribed text and associated metadata from provided spoken audio file data along with <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>\n on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscriptionWithResponse(java.lang.String,java.lang.String,com.azure.ai.openai.models.AudioTranscriptionOptions,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranscriptionWithResponse(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions, RequestOptions requestOptions)"
name: "getAudioTranscriptionWithResponse(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranscriptionWithResponse(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions, RequestOptions requestOptions)"
summary: "Gets transcribed text and associated metadata from provided spoken audio file data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The file name that is represented in the <code>file</code> field of <xref uid=\"com.azure.ai.openai.models.AudioTranscriptionOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranscriptionOptions\"></xref>"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio transcription request."
name: "audioTranscriptionOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranscriptionOptions?alt=com.azure.ai.openai.models.AudioTranscriptionOptions&text=AudioTranscriptionOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<AudioTranscription>> getAudioTranscriptionWithResponse(String deploymentOrModelName, String fileName, AudioTranscriptionOptions audioTranscriptionOptions, RequestOptions requestOptions)"
desc: "Gets transcribed text and associated metadata from provided spoken audio file data. Audio will be transcribed in the written language corresponding to the language it was spoken in."
returns:
description: "<xref uid=\"com.azure.ai.openai.models.AudioTranscription\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranscription\"></xref> transcribed text and associated metadata from provided spoken audio data on\n successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.ai.openai.models.AudioTranscription?alt=com.azure.ai.openai.models.AudioTranscription&text=AudioTranscription\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslation(java.lang.String,java.lang.String,com.azure.ai.openai.models.AudioTranslationOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslation(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions)"
name: "getAudioTranslation(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranslation(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions)"
summary: "Gets English language transcribed text and associated metadata from provided spoken audio file data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The file name that is represented in the <code>file</code> field of <xref uid=\"com.azure.ai.openai.models.AudioTranslationOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranslationOptions\"></xref>"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio translation request."
name: "audioTranslationOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranslationOptions?alt=com.azure.ai.openai.models.AudioTranslationOptions&text=AudioTranslationOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<AudioTranslation> getAudioTranslation(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions)"
desc: "Gets English language transcribed text and associated metadata from provided spoken audio file data."
returns:
description: "<xref uid=\"com.azure.ai.openai.models.AudioTranslation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranslation\"></xref> english language transcribed text and associated metadata from provided spoken\n audio file data on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.ai.openai.models.AudioTranslation?alt=com.azure.ai.openai.models.AudioTranslation&text=AudioTranslation\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslationAsPlainText(java.lang.String,com.azure.ai.openai.models.AudioTranslationOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslationAsPlainText(String deploymentOrModelName, AudioTranslationOptions audioTranslationOptions)"
name: "getAudioTranslationAsPlainText(String deploymentOrModelName, AudioTranslationOptions audioTranslationOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranslationAsPlainText(String deploymentOrModelName, AudioTranslationOptions audioTranslationOptions)"
summary: "Gets English language transcribed text and associated metadata from provided spoken audio data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio translation request."
name: "audioTranslationOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranslationOptions?alt=com.azure.ai.openai.models.AudioTranslationOptions&text=AudioTranslationOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<String> getAudioTranslationAsPlainText(String deploymentOrModelName, AudioTranslationOptions audioTranslationOptions)"
desc: "Gets English language transcribed text and associated metadata from provided spoken audio data."
returns:
description: "english language transcribed text and associated metadata from provided spoken audio data on successful\n completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslationText(java.lang.String,java.lang.String,com.azure.ai.openai.models.AudioTranslationOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslationText(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions)"
name: "getAudioTranslationText(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranslationText(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions)"
summary: "Gets English language transcribed text and associated metadata from provided spoken audio file data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The file name that is represented in the <code>file</code> field of <xref uid=\"com.azure.ai.openai.models.AudioTranslationOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranslationOptions\"></xref>."
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio translation request."
name: "audioTranslationOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranslationOptions?alt=com.azure.ai.openai.models.AudioTranslationOptions&text=AudioTranslationOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<String> getAudioTranslationText(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions)"
desc: "Gets English language transcribed text and associated metadata from provided spoken audio file data."
returns:
description: "english language transcribed text and associated metadata from provided spoken audio file data on\n successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslationTextWithResponse(java.lang.String,java.lang.String,com.azure.ai.openai.models.AudioTranslationOptions,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslationTextWithResponse(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions, RequestOptions requestOptions)"
name: "getAudioTranslationTextWithResponse(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranslationTextWithResponse(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions, RequestOptions requestOptions)"
summary: "Gets English language transcribed text and associated metadata from provided spoken audio file data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The file name that is represented in the <code>file</code> field of <xref uid=\"com.azure.ai.openai.models.AudioTranslationOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranslationOptions\"></xref>."
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio translation request."
name: "audioTranslationOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranslationOptions?alt=com.azure.ai.openai.models.AudioTranslationOptions&text=AudioTranslationOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<String>> getAudioTranslationTextWithResponse(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions, RequestOptions requestOptions)"
desc: "Gets English language transcribed text and associated metadata from provided spoken audio file data."
returns:
description: "english language transcribed text and associated metadata from provided spoken audio file data on\n successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslationWithResponse(java.lang.String,java.lang.String,com.azure.ai.openai.models.AudioTranslationOptions,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getAudioTranslationWithResponse(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions, RequestOptions requestOptions)"
name: "getAudioTranslationWithResponse(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getAudioTranslationWithResponse(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions, RequestOptions requestOptions)"
summary: "Gets English language transcribed text and associated metadata from provided spoken audio file data."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The file name that is represented in the <code>file</code> field of <xref uid=\"com.azure.ai.openai.models.AudioTranslationOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranslationOptions\"></xref>"
name: "fileName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an audio translation request."
name: "audioTranslationOptions"
type: "<xref href=\"com.azure.ai.openai.models.AudioTranslationOptions?alt=com.azure.ai.openai.models.AudioTranslationOptions&text=AudioTranslationOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<AudioTranslation>> getAudioTranslationWithResponse(String deploymentOrModelName, String fileName, AudioTranslationOptions audioTranslationOptions, RequestOptions requestOptions)"
desc: "Gets English language transcribed text and associated metadata from provided spoken audio file data."
returns:
description: "<xref uid=\"com.azure.ai.openai.models.AudioTranslation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AudioTranslation\"></xref> english language transcribed text and associated metadata from provided spoken\n audio file data along with <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.ai.openai.models.AudioTranslation?alt=com.azure.ai.openai.models.AudioTranslation&text=AudioTranslation\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletions(java.lang.String,com.azure.ai.openai.models.ChatCompletionsOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletions(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions)"
name: "getChatCompletions(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions)"
nameWithType: "OpenAIAsyncClient.getChatCompletions(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions)"
summary: "Gets chat completions for the provided chat messages."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for a chat completions request.\n Completions support a wide variety of tasks and generate text that continues from or \"completes\"\n provided prompt data."
name: "chatCompletionsOptions"
type: "<xref href=\"com.azure.ai.openai.models.ChatCompletionsOptions?alt=com.azure.ai.openai.models.ChatCompletionsOptions&text=ChatCompletionsOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<ChatCompletions> getChatCompletions(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions)"
desc: "Gets chat completions for the provided chat messages. Completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data."
returns:
description: "chat completions for the provided chat messages.\n Completions support a wide variety of tasks and generate text that continues from or \"completes\"\n provided prompt data on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.ai.openai.models.ChatCompletions?alt=com.azure.ai.openai.models.ChatCompletions&text=ChatCompletions\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletionsStream(java.lang.String,com.azure.ai.openai.models.ChatCompletionsOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletionsStream(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions)"
name: "getChatCompletionsStream(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions)"
nameWithType: "OpenAIAsyncClient.getChatCompletionsStream(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions)"
summary: "Gets chat completions for the provided chat messages."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for a chat completions request. Completions support a\n wide variety of tasks and generate text that continues from or \"completes\" provided prompt data."
name: "chatCompletionsOptions"
type: "<xref href=\"com.azure.ai.openai.models.ChatCompletionsOptions?alt=com.azure.ai.openai.models.ChatCompletionsOptions&text=ChatCompletionsOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Flux<ChatCompletions> getChatCompletionsStream(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions)"
desc: "Gets chat completions for the provided chat messages. Chat completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data."
returns:
description: "chat completions stream for the provided chat messages. Completions support a wide variety of tasks and\n generate text that continues from or \"completes\" provided prompt data."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html\">Flux</a><<xref href=\"com.azure.ai.openai.models.ChatCompletions?alt=com.azure.ai.openai.models.ChatCompletions&text=ChatCompletions\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletionsStreamWithResponse(java.lang.String,com.azure.ai.openai.models.ChatCompletionsOptions,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletionsStreamWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions)"
name: "getChatCompletionsStreamWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getChatCompletionsStreamWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions)"
summary: "Gets chat completions for the provided chat messages."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for a chat completions request. Completions support a\n wide variety of tasks and generate text that continues from or \"completes\" provided prompt data."
name: "chatCompletionsOptions"
type: "<xref href=\"com.azure.ai.openai.models.ChatCompletionsOptions?alt=com.azure.ai.openai.models.ChatCompletionsOptions&text=ChatCompletionsOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Flux<Response<ChatCompletions>> getChatCompletionsStreamWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions)"
desc: "Gets chat completions for the provided chat messages. Chat completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data.\n\n**Code Samples**\n\n```java\nopenAIAsyncClient.getChatCompletionsStreamWithResponse(deploymentOrModelId, new ChatCompletionsOptions(chatMessages),\n new RequestOptions().setHeader(\"my-header\", \"my-header-value\"))\n .subscribe(\n response -> System.out.print(response.getValue().getId()),\n error -> System.err.println(\"There was an error getting chat completions.\" + error),\n () -> System.out.println(\"Completed called getChatCompletionsStreamWithResponse.\"));\n```"
returns:
description: "chat completions stream for the provided chat messages. Completions support a wide variety of tasks and\n generate text that continues from or \"completes\" provided prompt data."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html\">Flux</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.ai.openai.models.ChatCompletions?alt=com.azure.ai.openai.models.ChatCompletions&text=ChatCompletions\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletionsWithResponse(java.lang.String,com.azure.ai.openai.models.ChatCompletionsOptions,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletionsWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions)"
name: "getChatCompletionsWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getChatCompletionsWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions)"
summary: "Gets chat completions for the provided chat messages."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for a chat completions request. Completions support a\n wide variety of tasks and generate text that continues from or \"completes\" provided prompt data."
name: "chatCompletionsOptions"
type: "<xref href=\"com.azure.ai.openai.models.ChatCompletionsOptions?alt=com.azure.ai.openai.models.ChatCompletionsOptions&text=ChatCompletionsOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<ChatCompletions>> getChatCompletionsWithResponse(String deploymentOrModelName, ChatCompletionsOptions chatCompletionsOptions, RequestOptions requestOptions)"
desc: "Gets chat completions for the provided chat messages. Completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data.\n\n**Request Body Schema**\n\n```java\n{\n messages (Required): [\n (Required){\n role: String(system/assistant/user) (Required)\n content: String (Optional)\n }\n ]\n max_tokens: Integer (Optional)\n temperature: Double (Optional)\n top_p: Double (Optional)\n logit_bias (Optional): {\n String: int (Optional)\n }\n user: String (Optional)\n n: Integer (Optional)\n stop (Optional): [\n String (Optional)\n ]\n presence_penalty: Double (Optional)\n frequency_penalty: Double (Optional)\n stream: Boolean (Optional)\n model: String (Optional)\n }\n```\n\n**Response Body Schema**\n\n```java\n{\n id: String (Required)\n created: int (Required)\n choices (Required): [\n (Required){\n message (Optional): {\n role: String(system/assistant/user) (Required)\n content: String (Optional)\n }\n index: int (Required)\n finish_reason: String(stopped/tokenLimitReached/contentFiltered) (Required)\n delta (Optional): {\n role: String(system/assistant/user) (Optional)\n content: String (Optional)\n }\n }\n ]\n usage (Required): {\n completion_tokens: int (Required)\n prompt_tokens: int (Required)\n total_tokens: int (Required)\n }\n }\n```"
returns:
description: "chat completions for the provided chat messages. Completions support a wide variety of tasks and generate\n text that continues from or \"completes\" provided prompt data along with <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> on successful\n completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.ai.openai.models.ChatCompletions?alt=com.azure.ai.openai.models.ChatCompletions&text=ChatCompletions\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletionsWithResponse(java.lang.String,com.azure.core.util.BinaryData,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getChatCompletionsWithResponse(String deploymentOrModelName, BinaryData chatCompletionsOptions, RequestOptions requestOptions)"
name: "getChatCompletionsWithResponse(String deploymentOrModelName, BinaryData chatCompletionsOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getChatCompletionsWithResponse(String deploymentOrModelName, BinaryData chatCompletionsOptions, RequestOptions requestOptions)"
summary: "Gets chat completions for the provided chat messages."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for a chat completions request. Completions support a\n wide variety of tasks and generate text that continues from or \"completes\" provided prompt data."
name: "chatCompletionsOptions"
type: "<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<BinaryData>> getChatCompletionsWithResponse(String deploymentOrModelName, BinaryData chatCompletionsOptions, RequestOptions requestOptions)"
desc: "Gets chat completions for the provided chat messages. Completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data.\n\n**Request Body Schema**\n\n```java\n{\n messages (Required): [\n (Required){\n role: String(system/assistant/user) (Required)\n content: String (Optional)\n }\n ]\n max_tokens: Integer (Optional)\n temperature: Double (Optional)\n top_p: Double (Optional)\n logit_bias (Optional): {\n String: int (Optional)\n }\n user: String (Optional)\n n: Integer (Optional)\n stop (Optional): [\n String (Optional)\n ]\n presence_penalty: Double (Optional)\n frequency_penalty: Double (Optional)\n stream: Boolean (Optional)\n model: String (Optional)\n }\n```\n\n**Response Body Schema**\n\n```java\n{\n id: String (Required)\n created: int (Required)\n choices (Required): [\n (Required){\n message (Optional): {\n role: String(system/assistant/user) (Required)\n content: String (Optional)\n }\n index: int (Required)\n finish_reason: String(stopped/tokenLimitReached/contentFiltered) (Required)\n delta (Optional): {\n role: String(system/assistant/user) (Optional)\n content: String (Optional)\n }\n }\n ]\n usage (Required): {\n completion_tokens: int (Required)\n prompt_tokens: int (Required)\n total_tokens: int (Required)\n }\n }\n```"
returns:
description: "chat completions for the provided chat messages. Completions support a wide variety of tasks and generate\n text that continues from or \"completes\" provided prompt data along with <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> on successful\n completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getCompletions(java.lang.String,com.azure.ai.openai.models.CompletionsOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getCompletions(String deploymentOrModelName, CompletionsOptions completionsOptions)"
name: "getCompletions(String deploymentOrModelName, CompletionsOptions completionsOptions)"
nameWithType: "OpenAIAsyncClient.getCompletions(String deploymentOrModelName, CompletionsOptions completionsOptions)"
summary: "Gets completions for the provided input prompts."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for a completions request.\n Completions support a wide variety of tasks and generate text that continues from or \"completes\"\n provided prompt data."
name: "completionsOptions"
type: "<xref href=\"com.azure.ai.openai.models.CompletionsOptions?alt=com.azure.ai.openai.models.CompletionsOptions&text=CompletionsOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Completions> getCompletions(String deploymentOrModelName, CompletionsOptions completionsOptions)"
desc: "Gets completions for the provided input prompts. Completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data."
returns:
description: "completions for the provided input prompts.\n Completions support a wide variety of tasks and generate text that continues from or \"completes\"\n provided prompt data on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.ai.openai.models.Completions?alt=com.azure.ai.openai.models.Completions&text=Completions\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getCompletions(java.lang.String,java.lang.String)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getCompletions(String deploymentOrModelName, String prompt)"
name: "getCompletions(String deploymentOrModelName, String prompt)"
nameWithType: "OpenAIAsyncClient.getCompletions(String deploymentOrModelName, String prompt)"
summary: "Gets completions for the provided input prompt."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The prompt to generate completion text from."
name: "prompt"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public Mono<Completions> getCompletions(String deploymentOrModelName, String prompt)"
desc: "Gets completions for the provided input prompt. Completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data."
returns:
description: "completions for the provided input prompts. Completions support a wide variety of tasks and generate text\n that continues from or \"completes\" provided prompt data on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.ai.openai.models.Completions?alt=com.azure.ai.openai.models.Completions&text=Completions\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getCompletionsStream(java.lang.String,com.azure.ai.openai.models.CompletionsOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getCompletionsStream(String deploymentOrModelName, CompletionsOptions completionsOptions)"
name: "getCompletionsStream(String deploymentOrModelName, CompletionsOptions completionsOptions)"
nameWithType: "OpenAIAsyncClient.getCompletionsStream(String deploymentOrModelName, CompletionsOptions completionsOptions)"
summary: "Gets completions as a stream for the provided input prompts."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for a completions request. Completions support a wide\n variety of tasks and generate text that continues from or \"completes\" provided prompt data."
name: "completionsOptions"
type: "<xref href=\"com.azure.ai.openai.models.CompletionsOptions?alt=com.azure.ai.openai.models.CompletionsOptions&text=CompletionsOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Flux<Completions> getCompletionsStream(String deploymentOrModelName, CompletionsOptions completionsOptions)"
desc: "Gets completions as a stream for the provided input prompts. Completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data.\n\n**Code Samples**\n\n```java\nopenAIAsyncClient\n .getChatCompletionsStream(deploymentOrModelId, new ChatCompletionsOptions(chatMessages))\n .subscribe(\n chatCompletions -> System.out.print(chatCompletions.getId()),\n error -> System.err.println(\"There was an error getting chat completions.\" + error),\n () -> System.out.println(\"Completed called getChatCompletionsStream.\"));\n```"
returns:
description: "a <xref uid=\"reactor.core.publisher.Flux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Flux\"></xref> of completions for the provided input prompts. Completions support a wide variety of tasks\n and generate text that continues from or \"completes\" provided prompt data."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html\">Flux</a><<xref href=\"com.azure.ai.openai.models.Completions?alt=com.azure.ai.openai.models.Completions&text=Completions\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getCompletionsWithResponse(java.lang.String,com.azure.ai.openai.models.CompletionsOptions,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getCompletionsWithResponse(String deploymentOrModelName, CompletionsOptions completionsOptions, RequestOptions requestOptions)"
name: "getCompletionsWithResponse(String deploymentOrModelName, CompletionsOptions completionsOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getCompletionsWithResponse(String deploymentOrModelName, CompletionsOptions completionsOptions, RequestOptions requestOptions)"
summary: "Gets completions for the provided input prompts."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for a completions request. Completions support a wide\n variety of tasks and generate text that continues from or \"completes\" provided prompt data."
name: "completionsOptions"
type: "<xref href=\"com.azure.ai.openai.models.CompletionsOptions?alt=com.azure.ai.openai.models.CompletionsOptions&text=CompletionsOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<Completions>> getCompletionsWithResponse(String deploymentOrModelName, CompletionsOptions completionsOptions, RequestOptions requestOptions)"
desc: "Gets completions for the provided input prompts. Completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data.\n\n**Request Body Schema**\n\n```java\n{\n prompt (Required): [\n String (Required)\n ]\n max_tokens: Integer (Optional)\n temperature: Double (Optional)\n top_p: Double (Optional)\n logit_bias (Optional): {\n String: int (Optional)\n }\n user: String (Optional)\n n: Integer (Optional)\n logprobs: Integer (Optional)\n echo: Boolean (Optional)\n stop (Optional): [\n String (Optional)\n ]\n presence_penalty: Double (Optional)\n frequency_penalty: Double (Optional)\n best_of: Integer (Optional)\n stream: Boolean (Optional)\n model: String (Optional)\n }\n```\n\n**Response Body Schema**\n\n```java\n{\n id: String (Required)\n created: int (Required)\n choices (Required): [\n (Required){\n text: String (Required)\n index: int (Required)\n logprobs (Required): {\n tokens (Required): [\n String (Required)\n ]\n token_logprobs (Required): [\n double (Required)\n ]\n top_logprobs (Required): [\n (Required){\n String: double (Required)\n }\n ]\n text_offset (Required): [\n int (Required)\n ]\n }\n finish_reason: String(stopped/tokenLimitReached/contentFiltered) (Required)\n }\n ]\n usage (Required): {\n completion_tokens: int (Required)\n prompt_tokens: int (Required)\n total_tokens: int (Required)\n }\n }\n```"
returns:
description: "completions for the provided input prompts. Completions support a wide variety of tasks and generate text\n that continues from or \"completes\" provided prompt data along with <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> on successful completion\n of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.ai.openai.models.Completions?alt=com.azure.ai.openai.models.Completions&text=Completions\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getCompletionsWithResponse(java.lang.String,com.azure.core.util.BinaryData,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getCompletionsWithResponse(String deploymentOrModelName, BinaryData completionsOptions, RequestOptions requestOptions)"
name: "getCompletionsWithResponse(String deploymentOrModelName, BinaryData completionsOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getCompletionsWithResponse(String deploymentOrModelName, BinaryData completionsOptions, RequestOptions requestOptions)"
summary: "Gets completions for the provided input prompts."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for a completions request. Completions support a wide\n variety of tasks and generate text that continues from or \"completes\" provided prompt data."
name: "completionsOptions"
type: "<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<BinaryData>> getCompletionsWithResponse(String deploymentOrModelName, BinaryData completionsOptions, RequestOptions requestOptions)"
desc: "Gets completions for the provided input prompts. Completions support a wide variety of tasks and generate text that continues from or \"completes\" provided prompt data.\n\n**Request Body Schema**\n\n```java\n{\n prompt (Required): [\n String (Required)\n ]\n max_tokens: Integer (Optional)\n temperature: Double (Optional)\n top_p: Double (Optional)\n logit_bias (Optional): {\n String: int (Optional)\n }\n user: String (Optional)\n n: Integer (Optional)\n logprobs: Integer (Optional)\n echo: Boolean (Optional)\n stop (Optional): [\n String (Optional)\n ]\n presence_penalty: Double (Optional)\n frequency_penalty: Double (Optional)\n best_of: Integer (Optional)\n stream: Boolean (Optional)\n model: String (Optional)\n }\n```\n\n**Response Body Schema**\n\n```java\n{\n id: String (Required)\n created: int (Required)\n choices (Required): [\n (Required){\n text: String (Required)\n index: int (Required)\n logprobs (Required): {\n tokens (Required): [\n String (Required)\n ]\n token_logprobs (Required): [\n double (Required)\n ]\n top_logprobs (Required): [\n (Required){\n String: double (Required)\n }\n ]\n text_offset (Required): [\n int (Required)\n ]\n }\n finish_reason: String(stopped/tokenLimitReached/contentFiltered) (Required)\n }\n ]\n usage (Required): {\n completion_tokens: int (Required)\n prompt_tokens: int (Required)\n total_tokens: int (Required)\n }\n }\n```"
returns:
description: "completions for the provided input prompts. Completions support a wide variety of tasks and generate text\n that continues from or \"completes\" provided prompt data along with <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> on successful completion\n of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getEmbeddings(java.lang.String,com.azure.ai.openai.models.EmbeddingsOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getEmbeddings(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions)"
name: "getEmbeddings(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions)"
nameWithType: "OpenAIAsyncClient.getEmbeddings(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions)"
summary: "Return the embeddings for a given prompt."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an embeddings request.\n Embeddings measure the relatedness of text strings and are commonly used for search, clustering,\n recommendations, and other similar scenarios."
name: "embeddingsOptions"
type: "<xref href=\"com.azure.ai.openai.models.EmbeddingsOptions?alt=com.azure.ai.openai.models.EmbeddingsOptions&text=EmbeddingsOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Embeddings> getEmbeddings(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions)"
desc: "Return the embeddings for a given prompt."
returns:
description: "representation of the response data from an embeddings request.\n Embeddings measure the relatedness of text strings and are commonly used for search, clustering,\n recommendations, and other similar scenarios on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.ai.openai.models.Embeddings?alt=com.azure.ai.openai.models.Embeddings&text=Embeddings\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getEmbeddingsWithResponse(java.lang.String,com.azure.ai.openai.models.EmbeddingsOptions,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getEmbeddingsWithResponse(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions, RequestOptions requestOptions)"
name: "getEmbeddingsWithResponse(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getEmbeddingsWithResponse(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions, RequestOptions requestOptions)"
summary: "Return the embeddings for a given prompt."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an embeddings request. Embeddings measure the\n relatedness of text strings and are commonly used for search, clustering, recommendations, and other similar\n scenarios."
name: "embeddingsOptions"
type: "<xref href=\"com.azure.ai.openai.models.EmbeddingsOptions?alt=com.azure.ai.openai.models.EmbeddingsOptions&text=EmbeddingsOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<Embeddings>> getEmbeddingsWithResponse(String deploymentOrModelName, EmbeddingsOptions embeddingsOptions, RequestOptions requestOptions)"
desc: "Return the embeddings for a given prompt.\n\n**Request Body Schema**\n\n```java\n{\n user: String (Optional)\n model: String (Optional)\n input (Required): [\n String (Required)\n ]\n }\n```\n\n**Response Body Schema**\n\n```java\n{\n data (Required): [\n (Required){\n embedding (Required): [\n double (Required)\n ]\n index: int (Required)\n }\n ]\n usage (Required): {\n prompt_tokens: int (Required)\n total_tokens: int (Required)\n }\n }\n```"
returns:
description: "representation of the response data from an embeddings request. Embeddings measure the relatedness of\n text strings and are commonly used for search, clustering, recommendations, and other similar scenarios along\n with <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.ai.openai.models.Embeddings?alt=com.azure.ai.openai.models.Embeddings&text=Embeddings\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getEmbeddingsWithResponse(java.lang.String,com.azure.core.util.BinaryData,com.azure.core.http.rest.RequestOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getEmbeddingsWithResponse(String deploymentOrModelName, BinaryData embeddingsOptions, RequestOptions requestOptions)"
name: "getEmbeddingsWithResponse(String deploymentOrModelName, BinaryData embeddingsOptions, RequestOptions requestOptions)"
nameWithType: "OpenAIAsyncClient.getEmbeddingsWithResponse(String deploymentOrModelName, BinaryData embeddingsOptions, RequestOptions requestOptions)"
summary: "Return the embeddings for a given prompt."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The configuration information for an embeddings request. Embeddings measure the\n relatedness of text strings and are commonly used for search, clustering, recommendations, and other similar\n scenarios."
name: "embeddingsOptions"
type: "<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />"
- description: "The options to configure the HTTP request before HTTP client sends it."
name: "requestOptions"
type: "<xref href=\"com.azure.core.http.rest.RequestOptions?alt=com.azure.core.http.rest.RequestOptions&text=RequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Response<BinaryData>> getEmbeddingsWithResponse(String deploymentOrModelName, BinaryData embeddingsOptions, RequestOptions requestOptions)"
desc: "Return the embeddings for a given prompt.\n\n**Request Body Schema**\n\n```java\n{\n user: String (Optional)\n model: String (Optional)\n input (Required): [\n String (Required)\n ]\n }\n```\n\n**Response Body Schema**\n\n```java\n{\n data (Required): [\n (Required){\n embedding (Required): [\n double (Required)\n ]\n index: int (Required)\n }\n ]\n usage (Required): {\n prompt_tokens: int (Required)\n total_tokens: int (Required)\n }\n }\n```"
returns:
description: "representation of the response data from an embeddings request. Embeddings measure the relatedness of\n text strings and are commonly used for search, clustering, recommendations, and other similar scenarios along\n with <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />>>"
- uid: "com.azure.ai.openai.OpenAIAsyncClient.getImageGenerations(java.lang.String,com.azure.ai.openai.models.ImageGenerationOptions)"
fullName: "com.azure.ai.openai.OpenAIAsyncClient.getImageGenerations(String deploymentOrModelName, ImageGenerationOptions imageGenerationOptions)"
name: "getImageGenerations(String deploymentOrModelName, ImageGenerationOptions imageGenerationOptions)"
nameWithType: "OpenAIAsyncClient.getImageGenerations(String deploymentOrModelName, ImageGenerationOptions imageGenerationOptions)"
summary: "Creates an image given a prompt."
parameters:
- description: "Specifies either the model deployment name (when using Azure OpenAI) or model name\n (when using non-Azure OpenAI) to use for this request."
name: "deploymentOrModelName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Represents the request data used to generate images."
name: "imageGenerationOptions"
type: "<xref href=\"com.azure.ai.openai.models.ImageGenerationOptions?alt=com.azure.ai.openai.models.ImageGenerationOptions&text=ImageGenerationOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<ImageGenerations> getImageGenerations(String deploymentOrModelName, ImageGenerationOptions imageGenerationOptions)"
desc: "Creates an image given a prompt."
returns:
description: "the result of a successful image generation operation on successful completion of <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.ai.openai.models.ImageGenerations?alt=com.azure.ai.openai.models.ImageGenerations&text=ImageGenerations\" data-throw-if-not-resolved=\"False\" />>"
type: "class"
desc: "Initializes a new instance of the asynchronous OpenAIClient type."
metadata: {}
package: "com.azure.ai.openai"
artifact: com.azure:azure-ai-openai:1.0.0-beta.8