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 @@ -88,6 +88,7 @@ Methods:
88
88
Types:
89
89
90
90
- <code ><a href =" ./src/resources/images.ts " >Image</a ></code >
91
+ - <code ><a href =" ./src/resources/images.ts " >ImageModel</a ></code >
91
92
- <code ><a href =" ./src/resources/images.ts " >ImagesResponse</a ></code >
92
93
93
94
Methods:
@@ -98,6 +99,10 @@ Methods:
98
99
99
100
# Audio
100
101
102
+ Types:
103
+
104
+ - <code ><a href =" ./src/resources/audio/audio.ts " >AudioModel</a ></code >
105
+
101
106
## Transcriptions
102
107
103
108
Types:
@@ -120,6 +125,10 @@ Methods:
120
125
121
126
## Speech
122
127
128
+ Types:
129
+
130
+ - <code ><a href =" ./src/resources/audio/speech.ts " >SpeechModel</a ></code >
131
+
123
132
Methods:
124
133
125
134
- <code title =" post /audio/speech " >client.audio.speech.<a href =" ./src/resources/audio/speech.ts " >create</a >({ ...params }) -> Response</code >
@@ -129,6 +138,7 @@ Methods:
129
138
Types:
130
139
131
140
- <code ><a href =" ./src/resources/moderations.ts " >Moderation</a ></code >
141
+ - <code ><a href =" ./src/resources/moderations.ts " >ModerationModel</a ></code >
132
142
- <code ><a href =" ./src/resources/moderations.ts " >ModerationCreateResponse</a ></code >
133
143
134
144
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 @@ -9,6 +9,7 @@ import { sleep } from '../../../../core';
9
9
import { RunSubmitToolOutputsParamsStream } from '../../../../lib/AssistantStream' ;
10
10
import * as RunsAPI from './runs' ;
11
11
import * as AssistantsAPI from '../../assistants' ;
12
+ import * as ChatAPI from '../../../chat/chat' ;
12
13
import * as MessagesAPI from '../messages' ;
13
14
import * as ThreadsAPI from '../threads' ;
14
15
import * as StepsAPI from './steps' ;
@@ -668,31 +669,7 @@ export interface RunCreateParamsBase {
668
669
* model associated with the assistant. If not, the model associated with the
669
670
* assistant will be used.
670
671
*/
671
- model ?:
672
- | ( string & { } )
673
- | 'gpt-4o'
674
- | 'gpt-4o-2024-05-13'
675
- | 'gpt-4o-mini'
676
- | 'gpt-4o-mini-2024-07-18'
677
- | 'gpt-4-turbo'
678
- | 'gpt-4-turbo-2024-04-09'
679
- | 'gpt-4-0125-preview'
680
- | 'gpt-4-turbo-preview'
681
- | 'gpt-4-1106-preview'
682
- | 'gpt-4-vision-preview'
683
- | 'gpt-4'
684
- | 'gpt-4-0314'
685
- | 'gpt-4-0613'
686
- | 'gpt-4-32k'
687
- | 'gpt-4-32k-0314'
688
- | 'gpt-4-32k-0613'
689
- | 'gpt-3.5-turbo'
690
- | 'gpt-3.5-turbo-16k'
691
- | 'gpt-3.5-turbo-0613'
692
- | 'gpt-3.5-turbo-1106'
693
- | 'gpt-3.5-turbo-0125'
694
- | 'gpt-3.5-turbo-16k-0613'
695
- | null ;
672
+ model ?: ( string & { } ) | ChatAPI . ChatModel | null ;
696
673
697
674
/**
698
675
* Whether to enable
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { APIPromise } from '../../../core';
7
7
import * as Core from '../../../core' ;
8
8
import * as ThreadsAPI from './threads' ;
9
9
import * as AssistantsAPI from '../assistants' ;
10
+ import * as ChatAPI from '../../chat/chat' ;
10
11
import * as MessagesAPI from './messages' ;
11
12
import * as RunsAPI from './runs/runs' ;
12
13
import { Stream } from '../../../streaming' ;
@@ -545,31 +546,7 @@ export interface ThreadCreateAndRunParamsBase {
545
546
* model associated with the assistant. If not, the model associated with the
546
547
* assistant will be used.
547
548
*/
548
- model ?:
549
- | ( string & { } )
550
- | 'gpt-4o'
551
- | 'gpt-4o-2024-05-13'
552
- | 'gpt-4o-mini'
553
- | 'gpt-4o-mini-2024-07-18'
554
- | 'gpt-4-turbo'
555
- | 'gpt-4-turbo-2024-04-09'
556
- | 'gpt-4-0125-preview'
557
- | 'gpt-4-turbo-preview'
558
- | 'gpt-4-1106-preview'
559
- | 'gpt-4-vision-preview'
560
- | 'gpt-4'
561
- | 'gpt-4-0314'
562
- | 'gpt-4-0613'
563
- | 'gpt-4-32k'
564
- | 'gpt-4-32k-0314'
565
- | 'gpt-4-32k-0613'
566
- | 'gpt-3.5-turbo'
567
- | 'gpt-3.5-turbo-16k'
568
- | 'gpt-3.5-turbo-0613'
569
- | 'gpt-3.5-turbo-1106'
570
- | 'gpt-3.5-turbo-0125'
571
- | 'gpt-3.5-turbo-16k-0613'
572
- | null ;
549
+ model ?: ( string & { } ) | ChatAPI . ChatModel | null ;
573
550
574
551
/**
575
552
* Whether to enable
You can’t perform that action at this time.
0 commit comments