File tree Expand file tree Collapse file tree 13 files changed +53
-85
lines changed Expand file tree Collapse file tree 13 files changed +53
-85
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ Methods:
87
87
Types:
88
88
89
89
- <code ><a href =" ./src/resources/images.ts " >Image</a ></code >
90
+ - <code ><a href =" ./src/resources/images.ts " >ImageModel</a ></code >
90
91
- <code ><a href =" ./src/resources/images.ts " >ImagesResponse</a ></code >
91
92
92
93
Methods:
@@ -97,6 +98,10 @@ Methods:
97
98
98
99
# Audio
99
100
101
+ Types:
102
+
103
+ - <code ><a href =" ./src/resources/audio/audio.ts " >AudioModel</a ></code >
104
+
100
105
## Transcriptions
101
106
102
107
Types:
@@ -119,6 +124,10 @@ Methods:
119
124
120
125
## Speech
121
126
127
+ Types:
128
+
129
+ - <code ><a href =" ./src/resources/audio/speech.ts " >SpeechModel</a ></code >
130
+
122
131
Methods:
123
132
124
133
- <code title =" post /audio/speech " >client.audio.speech.<a href =" ./src/resources/audio/speech.ts " >create</a >({ ...params }) -> Response</code >
@@ -128,6 +137,7 @@ Methods:
128
137
Types:
129
138
130
139
- <code ><a href =" ./src/resources/moderations.ts " >Moderation</a ></code >
140
+ - <code ><a href =" ./src/resources/moderations.ts " >ModerationModel</a ></code >
131
141
- <code ><a href =" ./src/resources/moderations.ts " >ModerationCreateResponse</a ></code >
132
142
133
143
Methods:
Original file line number Diff line number Diff line change @@ -282,15 +282,18 @@ export namespace OpenAI {
282
282
283
283
export import Images = API . Images ;
284
284
export import Image = API . Image ;
285
+ export import ImageModel = API . ImageModel ;
285
286
export import ImagesResponse = API . ImagesResponse ;
286
287
export import ImageCreateVariationParams = API . ImageCreateVariationParams ;
287
288
export import ImageEditParams = API . ImageEditParams ;
288
289
export import ImageGenerateParams = API . ImageGenerateParams ;
289
290
290
291
export import Audio = API . Audio ;
292
+ export import AudioModel = API . AudioModel ;
291
293
292
294
export import Moderations = API . Moderations ;
293
295
export import Moderation = API . Moderation ;
296
+ export import ModerationModel = API . ModerationModel ;
294
297
export import ModerationCreateResponse = API . ModerationCreateResponse ;
295
298
export import ModerationCreateParams = API . ModerationCreateParams ;
296
299
Original file line number Diff line number Diff line change 1
1
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
3
3
import { APIResource } from '../../resource' ;
4
+ import * as AudioAPI from './audio' ;
4
5
import * as SpeechAPI from './speech' ;
5
6
import * as TranscriptionsAPI from './transcriptions' ;
6
7
import * as TranslationsAPI from './translations' ;
@@ -11,13 +12,17 @@ export class Audio extends APIResource {
11
12
speech : SpeechAPI . Speech = new SpeechAPI . Speech ( this . _client ) ;
12
13
}
13
14
15
+ export type AudioModel = 'whisper-1' ;
16
+
14
17
export namespace Audio {
18
+ export import AudioModel = AudioAPI . AudioModel ;
15
19
export import Transcriptions = TranscriptionsAPI . Transcriptions ;
16
20
export import Transcription = TranscriptionsAPI . Transcription ;
17
21
export import TranscriptionCreateParams = TranscriptionsAPI . TranscriptionCreateParams ;
18
22
export import Translations = TranslationsAPI . Translations ;
19
23
export import Translation = TranslationsAPI . Translation ;
20
24
export import TranslationCreateParams = TranslationsAPI . TranslationCreateParams ;
21
25
export import Speech = SpeechAPI . Speech ;
26
+ export import SpeechModel = SpeechAPI . SpeechModel ;
22
27
export import SpeechCreateParams = SpeechAPI . SpeechCreateParams ;
23
28
}
Original file line number Diff line number Diff line change 1
1
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
3
- export { Audio } from './audio' ;
4
- export { SpeechCreateParams , Speech } from './speech' ;
3
+ export { AudioModel , Audio } from './audio' ;
4
+ export { SpeechModel , SpeechCreateParams , Speech } from './speech' ;
5
5
export { Transcription , TranscriptionCreateParams , Transcriptions } from './transcriptions' ;
6
6
export { Translation , TranslationCreateParams , Translations } from './translations' ;
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ export class Speech extends APIResource {
14
14
}
15
15
}
16
16
17
+ export type SpeechModel = 'tts-1' | 'tts-1-hd' ;
18
+
17
19
export interface SpeechCreateParams {
18
20
/**
19
21
* The text to generate audio for. The maximum length is 4096 characters.
@@ -24,7 +26,7 @@ export interface SpeechCreateParams {
24
26
* One of the available [TTS models](https://platform.openai.com/docs/models/tts):
25
27
* `tts-1` or `tts-1-hd`
26
28
*/
27
- model : ( string & { } ) | 'tts-1' | 'tts-1-hd' ;
29
+ model : ( string & { } ) | SpeechModel ;
28
30
29
31
/**
30
32
* The voice to use when generating the audio. Supported voices are `alloy`,
@@ -48,5 +50,6 @@ export interface SpeechCreateParams {
48
50
}
49
51
50
52
export namespace Speech {
53
+ export import SpeechModel = SpeechAPI . SpeechModel ;
51
54
export import SpeechCreateParams = SpeechAPI . SpeechCreateParams ;
52
55
}
Original file line number Diff line number Diff line change 3
3
import { APIResource } from '../../resource' ;
4
4
import * as Core from '../../core' ;
5
5
import * as TranscriptionsAPI from './transcriptions' ;
6
+ import * as AudioAPI from './audio' ;
6
7
7
8
export class Transcriptions extends APIResource {
8
9
/**
@@ -35,7 +36,7 @@ export interface TranscriptionCreateParams {
35
36
* ID of the model to use. Only `whisper-1` (which is powered by our open source
36
37
* Whisper V2 model) is currently available.
37
38
*/
38
- model : ( string & { } ) | 'whisper-1' ;
39
+ model : ( string & { } ) | AudioAPI . AudioModel ;
39
40
40
41
/**
41
42
* The language of the input audio. Supplying the input language in
Original file line number Diff line number Diff line change 3
3
import { APIResource } from '../../resource' ;
4
4
import * as Core from '../../core' ;
5
5
import * as TranslationsAPI from './translations' ;
6
+ import * as AudioAPI from './audio' ;
6
7
7
8
export class Translations extends APIResource {
8
9
/**
@@ -28,7 +29,7 @@ export interface TranslationCreateParams {
28
29
* ID of the model to use. Only `whisper-1` (which is powered by our open source
29
30
* Whisper V2 model) is currently available.
30
31
*/
31
- model : ( string & { } ) | 'whisper-1' ;
32
+ model : ( string & { } ) | AudioAPI . AudioModel ;
32
33
33
34
/**
34
35
* An optional text to guide the model's style or continue a previous audio
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { isRequestOptions } from '../../core';
5
5
import * as Core from '../../core' ;
6
6
import * as AssistantsAPI from './assistants' ;
7
7
import * as Shared from '../shared' ;
8
+ import * as ChatAPI from '../chat/chat' ;
8
9
import * as MessagesAPI from './threads/messages' ;
9
10
import * as ThreadsAPI from './threads/threads' ;
10
11
import * as RunsAPI from './threads/runs/runs' ;
@@ -1053,30 +1054,7 @@ export interface AssistantCreateParams {
1053
1054
* [Model overview](https://platform.openai.com/docs/models/overview) for
1054
1055
* descriptions of them.
1055
1056
*/
1056
- model :
1057
- | ( string & { } )
1058
- | 'gpt-4o'
1059
- | 'gpt-4o-2024-05-13'
1060
- | 'gpt-4o-mini'
1061
- | 'gpt-4o-mini-2024-07-18'
1062
- | 'gpt-4-turbo'
1063
- | 'gpt-4-turbo-2024-04-09'
1064
- | 'gpt-4-0125-preview'
1065
- | 'gpt-4-turbo-preview'
1066
- | 'gpt-4-1106-preview'
1067
- | 'gpt-4-vision-preview'
1068
- | 'gpt-4'
1069
- | 'gpt-4-0314'
1070
- | 'gpt-4-0613'
1071
- | 'gpt-4-32k'
1072
- | 'gpt-4-32k-0314'
1073
- | 'gpt-4-32k-0613'
1074
- | 'gpt-3.5-turbo'
1075
- | 'gpt-3.5-turbo-16k'
1076
- | 'gpt-3.5-turbo-0613'
1077
- | 'gpt-3.5-turbo-1106'
1078
- | 'gpt-3.5-turbo-0125'
1079
- | 'gpt-3.5-turbo-16k-0613' ;
1057
+ model : ( string & { } ) | ChatAPI . ChatModel ;
1080
1058
1081
1059
/**
1082
1060
* The description of the assistant. The maximum length is 512 characters.
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { APIPromise } from '../../../../core';
6
6
import * as Core from '../../../../core' ;
7
7
import * as RunsAPI from './runs' ;
8
8
import * as AssistantsAPI from '../../assistants' ;
9
+ import * as ChatAPI from '../../../chat/chat' ;
9
10
import * as MessagesAPI from '../messages' ;
10
11
import * as ThreadsAPI from '../threads' ;
11
12
import * as StepsAPI from './steps' ;
@@ -542,31 +543,7 @@ export interface RunCreateParamsBase {
542
543
* model associated with the assistant. If not, the model associated with the
543
544
* assistant will be used.
544
545
*/
545
- model ?:
546
- | ( string & { } )
547
- | 'gpt-4o'
548
- | 'gpt-4o-2024-05-13'
549
- | 'gpt-4o-mini'
550
- | 'gpt-4o-mini-2024-07-18'
551
- | 'gpt-4-turbo'
552
- | 'gpt-4-turbo-2024-04-09'
553
- | 'gpt-4-0125-preview'
554
- | 'gpt-4-turbo-preview'
555
- | 'gpt-4-1106-preview'
556
- | 'gpt-4-vision-preview'
557
- | 'gpt-4'
558
- | 'gpt-4-0314'
559
- | 'gpt-4-0613'
560
- | 'gpt-4-32k'
561
- | 'gpt-4-32k-0314'
562
- | 'gpt-4-32k-0613'
563
- | 'gpt-3.5-turbo'
564
- | 'gpt-3.5-turbo-16k'
565
- | 'gpt-3.5-turbo-0613'
566
- | 'gpt-3.5-turbo-1106'
567
- | 'gpt-3.5-turbo-0125'
568
- | 'gpt-3.5-turbo-16k-0613'
569
- | null ;
546
+ model ?: ( string & { } ) | ChatAPI . ChatModel | null ;
570
547
571
548
/**
572
549
* Whether to enable
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { APIPromise } from '../../../core';
6
6
import * as Core from '../../../core' ;
7
7
import * as ThreadsAPI from './threads' ;
8
8
import * as AssistantsAPI from '../assistants' ;
9
+ import * as ChatAPI from '../../chat/chat' ;
9
10
import * as MessagesAPI from './messages' ;
10
11
import * as RunsAPI from './runs/runs' ;
11
12
import { Stream } from '../../../streaming' ;
@@ -521,31 +522,7 @@ export interface ThreadCreateAndRunParamsBase {
521
522
* model associated with the assistant. If not, the model associated with the
522
523
* assistant will be used.
523
524
*/
524
- model ?:
525
- | ( string & { } )
526
- | 'gpt-4o'
527
- | 'gpt-4o-2024-05-13'
528
- | 'gpt-4o-mini'
529
- | 'gpt-4o-mini-2024-07-18'
530
- | 'gpt-4-turbo'
531
- | 'gpt-4-turbo-2024-04-09'
532
- | 'gpt-4-0125-preview'
533
- | 'gpt-4-turbo-preview'
534
- | 'gpt-4-1106-preview'
535
- | 'gpt-4-vision-preview'
536
- | 'gpt-4'
537
- | 'gpt-4-0314'
538
- | 'gpt-4-0613'
539
- | 'gpt-4-32k'
540
- | 'gpt-4-32k-0314'
541
- | 'gpt-4-32k-0613'
542
- | 'gpt-3.5-turbo'
543
- | 'gpt-3.5-turbo-16k'
544
- | 'gpt-3.5-turbo-0613'
545
- | 'gpt-3.5-turbo-1106'
546
- | 'gpt-3.5-turbo-0125'
547
- | 'gpt-3.5-turbo-16k-0613'
548
- | null ;
525
+ model ?: ( string & { } ) | ChatAPI . ChatModel | null ;
549
526
550
527
/**
551
528
* Whether to enable
You can’t perform that action at this time.
0 commit comments