Skip to content

Commit 68ac889

Browse files
committedAug 13, 2023
v4.0.0-beta.11
1 parent 05ff44f commit 68ac889

16 files changed

+410
-49
lines changed
 

‎api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Types:
44

55
- <code><a href="./src/resources/completions.ts">Completion</a></code>
66
- <code><a href="./src/resources/completions.ts">CompletionChoice</a></code>
7+
- <code><a href="./src/resources/completions.ts">CompletionUsage</a></code>
78

89
Methods:
910

@@ -38,11 +39,12 @@ Methods:
3839

3940
Types:
4041

42+
- <code><a href="./src/resources/embeddings.ts">CreateEmbeddingResponse</a></code>
4143
- <code><a href="./src/resources/embeddings.ts">Embedding</a></code>
4244

4345
Methods:
4446

45-
- <code title="post /embeddings">client.embeddings.<a href="./src/resources/embeddings.ts">create</a>({ ...params }) -> Embedding</code>
47+
- <code title="post /embeddings">client.embeddings.<a href="./src/resources/embeddings.ts">create</a>({ ...params }) -> CreateEmbeddingResponse</code>
4648

4749
# Files
4850

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openai",
3-
"version": "4.0.0-beta.10",
3+
"version": "4.0.0-beta.11",
44
"description": "Client library for the OpenAI API",
55
"author": "OpenAI <support@openai.com>",
66
"types": "dist/index.d.ts",

‎src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ export namespace OpenAI {
192192
export import Completions = API.Completions;
193193
export import Completion = API.Completion;
194194
export import CompletionChoice = API.CompletionChoice;
195+
export import CompletionUsage = API.CompletionUsage;
195196
export import CompletionCreateParams = API.CompletionCreateParams;
196197
export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
197198
export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;
@@ -203,6 +204,7 @@ export namespace OpenAI {
203204
export import EditCreateParams = API.EditCreateParams;
204205

205206
export import Embeddings = API.Embeddings;
207+
export import CreateEmbeddingResponse = API.CreateEmbeddingResponse;
206208
export import Embedding = API.Embedding;
207209
export import EmbeddingCreateParams = API.EmbeddingCreateParams;
208210

‎src/resources/audio/transcriptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface Transcription {
2121
export interface TranscriptionCreateParams {
2222
/**
2323
* The audio file object (not file name) to transcribe, in one of these formats:
24-
* mp3, mp4, mpeg, mpga, m4a, wav, or webm.
24+
* flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
2525
*/
2626
file: Uploadable;
2727

‎src/resources/audio/translations.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export interface Translation {
2020

2121
export interface TranslationCreateParams {
2222
/**
23-
* The audio file object (not file name) translate, in one of these formats: mp3,
24-
* mp4, mpeg, mpga, m4a, wav, or webm.
23+
* The audio file object (not file name) translate, in one of these formats: flac,
24+
* mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
2525
*/
2626
file: Uploadable;
2727

‎src/resources/chat/completions.ts

+75-9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import * as Core from 'openai/core';
44
import { APIPromise } from 'openai/core';
55
import { APIResource } from 'openai/resource';
6+
import * as Completions_ from 'openai/resources/completions';
67
import * as API from './index';
78
import { Stream } from 'openai/streaming';
89

@@ -25,60 +26,122 @@ export class Completions extends APIResource {
2526
}
2627
}
2728

29+
/**
30+
* Represents a chat completion response returned by model, based on the provided
31+
* input.
32+
*/
2833
export interface ChatCompletion {
34+
/**
35+
* A unique identifier for the chat completion.
36+
*/
2937
id: string;
3038

39+
/**
40+
* A list of chat completion choices. Can be more than one if `n` is greater
41+
* than 1.
42+
*/
3143
choices: Array<ChatCompletion.Choice>;
3244

45+
/**
46+
* A unix timestamp of when the chat completion was created.
47+
*/
3348
created: number;
3449

50+
/**
51+
* The model used for the chat completion.
52+
*/
3553
model: string;
3654

55+
/**
56+
* The object type, which is always `chat.completion`.
57+
*/
3758
object: string;
3859

39-
usage?: ChatCompletion.Usage;
60+
/**
61+
* Usage statistics for the completion request.
62+
*/
63+
usage?: Completions_.CompletionUsage;
4064
}
4165

4266
export namespace ChatCompletion {
4367
export interface Choice {
68+
/**
69+
* The reason the model stopped generating tokens. This will be `stop` if the model
70+
* hit a natural stop point or a provided stop sequence, `length` if the maximum
71+
* number of tokens specified in the request was reached, or `function_call` if the
72+
* model called a function.
73+
*/
4474
finish_reason: 'stop' | 'length' | 'function_call';
4575

76+
/**
77+
* The index of the choice in the list of choices.
78+
*/
4679
index: number;
4780

81+
/**
82+
* A chat completion message generated by the model.
83+
*/
4884
message: ChatCompletionMessage;
4985
}
50-
51-
export interface Usage {
52-
completion_tokens: number;
53-
54-
prompt_tokens: number;
55-
56-
total_tokens: number;
57-
}
5886
}
5987

88+
/**
89+
* Represents a streamed chunk of a chat completion response returned by model,
90+
* based on the provided input.
91+
*/
6092
export interface ChatCompletionChunk {
93+
/**
94+
* A unique identifier for the chat completion chunk.
95+
*/
6196
id: string;
6297

98+
/**
99+
* A list of chat completion choices. Can be more than one if `n` is greater
100+
* than 1.
101+
*/
63102
choices: Array<ChatCompletionChunk.Choice>;
64103

104+
/**
105+
* A unix timestamp of when the chat completion chunk was created.
106+
*/
65107
created: number;
66108

109+
/**
110+
* The model to generate the completion.
111+
*/
67112
model: string;
68113

114+
/**
115+
* The object type, which is always `chat.completion.chunk`.
116+
*/
69117
object: string;
70118
}
71119

72120
export namespace ChatCompletionChunk {
73121
export interface Choice {
122+
/**
123+
* A chat completion delta generated by streamed model responses.
124+
*/
74125
delta: Choice.Delta;
75126

127+
/**
128+
* The reason the model stopped generating tokens. This will be `stop` if the model
129+
* hit a natural stop point or a provided stop sequence, `length` if the maximum
130+
* number of tokens specified in the request was reached, or `function_call` if the
131+
* model called a function.
132+
*/
76133
finish_reason: 'stop' | 'length' | 'function_call' | null;
77134

135+
/**
136+
* The index of the choice in the list of choices.
137+
*/
78138
index: number;
79139
}
80140

81141
export namespace Choice {
142+
/**
143+
* A chat completion delta generated by streamed model responses.
144+
*/
82145
export interface Delta {
83146
/**
84147
* The contents of the chunk message.
@@ -120,6 +183,9 @@ export namespace ChatCompletionChunk {
120183
}
121184
}
122185

186+
/**
187+
* A chat completion message generated by the model.
188+
*/
123189
export interface ChatCompletionMessage {
124190
/**
125191
* The contents of the message.

‎src/resources/completions.ts

+49-11
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,48 @@ export class Completions extends APIResource {
2525
}
2626
}
2727

28+
/**
29+
* Represents a completion response from the API. Note: both the streamed and
30+
* non-streamed response objects share the same shape (unlike the chat endpoint).
31+
*/
2832
export interface Completion {
33+
/**
34+
* A unique identifier for the completion.
35+
*/
2936
id: string;
3037

38+
/**
39+
* The list of completion choices the model generated for the input prompt.
40+
*/
3141
choices: Array<CompletionChoice>;
3242

43+
/**
44+
* The Unix timestamp of when the completion was created.
45+
*/
3346
created: number;
3447

48+
/**
49+
* The model used for completion.
50+
*/
3551
model: string;
3652

53+
/**
54+
* The object type, which is always "text_completion"
55+
*/
3756
object: string;
3857

39-
usage?: Completion.Usage;
40-
}
41-
42-
export namespace Completion {
43-
export interface Usage {
44-
completion_tokens: number;
45-
46-
prompt_tokens: number;
47-
48-
total_tokens: number;
49-
}
58+
/**
59+
* Usage statistics for the completion request.
60+
*/
61+
usage?: CompletionUsage;
5062
}
5163

5264
export interface CompletionChoice {
65+
/**
66+
* The reason the model stopped generating tokens. This will be `stop` if the model
67+
* hit a natural stop point or a provided stop sequence, or `length` if the maximum
68+
* number of tokens specified in the request was reached.
69+
*/
5370
finish_reason: 'stop' | 'length';
5471

5572
index: number;
@@ -71,6 +88,26 @@ export namespace CompletionChoice {
7188
}
7289
}
7390

91+
/**
92+
* Usage statistics for the completion request.
93+
*/
94+
export interface CompletionUsage {
95+
/**
96+
* Number of tokens in the generated completion.
97+
*/
98+
completion_tokens: number;
99+
100+
/**
101+
* Number of tokens in the prompt.
102+
*/
103+
prompt_tokens: number;
104+
105+
/**
106+
* Total number of tokens used in the request (prompt + completion).
107+
*/
108+
total_tokens: number;
109+
}
110+
74111
export interface CompletionCreateParams {
75112
/**
76113
* ID of the model to use. You can use the
@@ -258,6 +295,7 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParams
258295
export namespace Completions {
259296
export import Completion = API.Completion;
260297
export import CompletionChoice = API.CompletionChoice;
298+
export import CompletionUsage = API.CompletionUsage;
261299
export import CompletionCreateParams = API.CompletionCreateParams;
262300
export import CompletionCreateParamsNonStreaming = API.CompletionCreateParamsNonStreaming;
263301
export import CompletionCreateParamsStreaming = API.CompletionCreateParamsStreaming;

‎src/resources/edits.ts

+25-9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import * as Core from 'openai/core';
44
import { APIResource } from 'openai/resource';
5+
import * as Completions from 'openai/resources/completions';
56
import * as API from './index';
67

78
export class Edits extends APIResource {
@@ -18,31 +19,46 @@ export class Edits extends APIResource {
1819
}
1920

2021
export interface Edit {
22+
/**
23+
* A list of edit choices. Can be more than one if `n` is greater than 1.
24+
*/
2125
choices: Array<Edit.Choice>;
2226

27+
/**
28+
* A unix timestamp of when the edit was created.
29+
*/
2330
created: number;
2431

32+
/**
33+
* The object type, which is always `edit`.
34+
*/
2535
object: string;
2636

27-
usage: Edit.Usage;
37+
/**
38+
* Usage statistics for the completion request.
39+
*/
40+
usage: Completions.CompletionUsage;
2841
}
2942

3043
export namespace Edit {
3144
export interface Choice {
45+
/**
46+
* The reason the model stopped generating tokens. This will be `stop` if the model
47+
* hit a natural stop point or a provided stop sequence, or `length` if the maximum
48+
* number of tokens specified in the request was reached.
49+
*/
3250
finish_reason: 'stop' | 'length';
3351

52+
/**
53+
* The index of the choice in the list of choices.
54+
*/
3455
index: number;
3556

57+
/**
58+
* The edited result.
59+
*/
3660
text: string;
3761
}
38-
39-
export interface Usage {
40-
completion_tokens: number;
41-
42-
prompt_tokens: number;
43-
44-
total_tokens: number;
45-
}
4662
}
4763

4864
export interface EditCreateParams {

‎src/resources/embeddings.ts

+51-13
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,74 @@ export class Embeddings extends APIResource {
88
/**
99
* Creates an embedding vector representing the input text.
1010
*/
11-
create(body: EmbeddingCreateParams, options?: Core.RequestOptions): Core.APIPromise<Embedding> {
11+
create(
12+
body: EmbeddingCreateParams,
13+
options?: Core.RequestOptions,
14+
): Core.APIPromise<CreateEmbeddingResponse> {
1215
return this.post('/embeddings', { body, ...options });
1316
}
1417
}
1518

16-
export interface Embedding {
17-
data: Array<Embedding.Data>;
19+
export interface CreateEmbeddingResponse {
20+
/**
21+
* The list of embeddings generated by the model.
22+
*/
23+
data: Array<Embedding>;
1824

25+
/**
26+
* The name of the model used to generate the embedding.
27+
*/
1928
model: string;
2029

30+
/**
31+
* The object type, which is always "embedding".
32+
*/
2133
object: string;
2234

23-
usage: Embedding.Usage;
35+
/**
36+
* The usage information for the request.
37+
*/
38+
usage: CreateEmbeddingResponse.Usage;
2439
}
2540

26-
export namespace Embedding {
27-
export interface Data {
28-
embedding: Array<number>;
29-
30-
index: number;
31-
32-
object: string;
33-
}
34-
41+
export namespace CreateEmbeddingResponse {
42+
/**
43+
* The usage information for the request.
44+
*/
3545
export interface Usage {
46+
/**
47+
* The number of tokens used by the prompt.
48+
*/
3649
prompt_tokens: number;
3750

51+
/**
52+
* The total number of tokens used by the request.
53+
*/
3854
total_tokens: number;
3955
}
4056
}
4157

58+
/**
59+
* Represents an embedding vector returned by embedding endpoint.
60+
*/
61+
export interface Embedding {
62+
/**
63+
* The embedding vector, which is a list of floats. The length of vector depends on
64+
* the model as listed in the [embedding guide](/docs/guides/embeddings).
65+
*/
66+
embedding: Array<number>;
67+
68+
/**
69+
* The index of the embedding in the list of embeddings.
70+
*/
71+
index: number;
72+
73+
/**
74+
* The object type, which is always "embedding".
75+
*/
76+
object: string;
77+
}
78+
4279
export interface EmbeddingCreateParams {
4380
/**
4481
* Input text to embed, encoded as a string or array of tokens. To embed multiple
@@ -66,6 +103,7 @@ export interface EmbeddingCreateParams {
66103
}
67104

68105
export namespace Embeddings {
106+
export import CreateEmbeddingResponse = API.CreateEmbeddingResponse;
69107
export import Embedding = API.Embedding;
70108
export import EmbeddingCreateParams = API.EmbeddingCreateParams;
71109
}

‎src/resources/files.ts

+29
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,50 @@ export interface FileDeleted {
6666
object: string;
6767
}
6868

69+
/**
70+
* The `File` object represents a document that has been uploaded to OpenAI.
71+
*/
6972
export interface FileObject {
73+
/**
74+
* The file identifier, which can be referenced in the API endpoints.
75+
*/
7076
id: string;
7177

78+
/**
79+
* The size of the file in bytes.
80+
*/
7281
bytes: number;
7382

83+
/**
84+
* The unix timestamp for when the file was created.
85+
*/
7486
created_at: number;
7587

88+
/**
89+
* The name of the file.
90+
*/
7691
filename: string;
7792

93+
/**
94+
* The object type, which is always "file".
95+
*/
7896
object: string;
7997

98+
/**
99+
* The intended purpose of the file. Currently, only "fine-tune" is supported.
100+
*/
80101
purpose: string;
81102

103+
/**
104+
* The current status of the file, which can be either `uploaded`, `processed`,
105+
* `pending`, `error`, `deleting` or `deleted`.
106+
*/
82107
status?: string;
83108

109+
/**
110+
* Additional details about the status of the file. If the file is in the `error`
111+
* state, this will include a message describing the error.
112+
*/
84113
status_details?: string | null;
85114
}
86115

‎src/resources/fine-tunes.ts

+73
Original file line numberDiff line numberDiff line change
@@ -78,48 +78,121 @@ export class FineTunesPage extends Page<FineTune> {}
7878
// alias so we can export it in the namespace
7979
type _FineTunesPage = FineTunesPage;
8080

81+
/**
82+
* The `FineTune` object represents a fine-tuning job that has been created through
83+
* the API.
84+
*/
8185
export interface FineTune {
86+
/**
87+
* The object identifier, which can be referenced in the API endpoints.
88+
*/
8289
id: string;
8390

91+
/**
92+
* The unix timestamp for when the fine-tuning job was created.
93+
*/
8494
created_at: number;
8595

96+
/**
97+
* The name of the fine-tuned model that is being created.
98+
*/
8699
fine_tuned_model: string | null;
87100

101+
/**
102+
* The hyperparameters used for the fine-tuning job. See the
103+
* [Fine-tuning Guide](/docs/guides/fine-tuning/hyperparameters) for more details.
104+
*/
88105
hyperparams: FineTune.Hyperparams;
89106

107+
/**
108+
* The base model that is being fine-tuned.
109+
*/
90110
model: string;
91111

112+
/**
113+
* The object type, which is always "fine-tune".
114+
*/
92115
object: string;
93116

117+
/**
118+
* The organization that owns the fine-tuning job.
119+
*/
94120
organization_id: string;
95121

122+
/**
123+
* The compiled results files for the fine-tuning job.
124+
*/
96125
result_files: Array<Files.FileObject>;
97126

127+
/**
128+
* The current status of the fine-tuning job, which can be either `created`,
129+
* `pending`, `running`, `succeeded`, `failed`, or `cancelled`.
130+
*/
98131
status: string;
99132

133+
/**
134+
* The list of files used for training.
135+
*/
100136
training_files: Array<Files.FileObject>;
101137

138+
/**
139+
* The unix timestamp for when the fine-tuning job was last updated.
140+
*/
102141
updated_at: number;
103142

143+
/**
144+
* The list of files used for validation.
145+
*/
104146
validation_files: Array<Files.FileObject>;
105147

148+
/**
149+
* The list of events that have been observed in the lifecycle of the FineTune job.
150+
*/
106151
events?: Array<FineTuneEvent>;
107152
}
108153

109154
export namespace FineTune {
155+
/**
156+
* The hyperparameters used for the fine-tuning job. See the
157+
* [Fine-tuning Guide](/docs/guides/fine-tuning/hyperparameters) for more details.
158+
*/
110159
export interface Hyperparams {
160+
/**
161+
* The batch size to use for training. The batch size is the number of training
162+
* examples used to train a single forward and backward pass.
163+
*/
111164
batch_size: number;
112165

166+
/**
167+
* The learning rate multiplier to use for training.
168+
*/
113169
learning_rate_multiplier: number;
114170

171+
/**
172+
* The number of epochs to train the model for. An epoch refers to one full cycle
173+
* through the training dataset.
174+
*/
115175
n_epochs: number;
116176

177+
/**
178+
* The weight to use for loss on the prompt tokens.
179+
*/
117180
prompt_loss_weight: number;
118181

182+
/**
183+
* The number of classes to use for computing classification metrics.
184+
*/
119185
classification_n_classes?: number;
120186

187+
/**
188+
* The positive class to use for computing classification metrics.
189+
*/
121190
classification_positive_class?: string;
122191

192+
/**
193+
* The classification metrics to compute using the validation dataset at the end of
194+
* every epoch.
195+
*/
123196
compute_classification_metrics?: boolean;
124197
}
125198
}

‎src/resources/images.ts

+10
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,19 @@ export class Images extends APIResource {
3131
}
3232
}
3333

34+
/**
35+
* Represents the url or the content of an image generated by the OpenAI API.
36+
*/
3437
export interface Image {
38+
/**
39+
* The base64-encoded JSON of the generated image, if `response_format` is
40+
* `b64_json`.
41+
*/
3542
b64_json?: string;
3643

44+
/**
45+
* The URL of the generated image, if `response_format` is `url` (default).
46+
*/
3747
url?: string;
3848
}
3949

‎src/resources/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ export { Chat } from './chat/chat';
55
export {
66
Completion,
77
CompletionChoice,
8+
CompletionUsage,
89
CompletionCreateParams,
910
CompletionCreateParamsNonStreaming,
1011
CompletionCreateParamsStreaming,
1112
Completions,
1213
} from './completions';
14+
export { CreateEmbeddingResponse, Embedding, EmbeddingCreateParams, Embeddings } from './embeddings';
1315
export { Edit, EditCreateParams, Edits } from './edits';
14-
export { Embedding, EmbeddingCreateParams, Embeddings } from './embeddings';
1516
export { FileContent, FileDeleted, FileObject, FileCreateParams, FileObjectsPage, Files } from './files';
1617
export {
1718
FineTune,

‎src/resources/models.ts

+15
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,28 @@ export class ModelsPage extends Page<Model> {}
3737
// alias so we can export it in the namespace
3838
type _ModelsPage = ModelsPage;
3939

40+
/**
41+
* Describes an OpenAI model offering that can be used with the API.
42+
*/
4043
export interface Model {
44+
/**
45+
* The model identifier, which can be referenced in the API endpoints.
46+
*/
4147
id: string;
4248

49+
/**
50+
* The date and time when the model was created.
51+
*/
4352
created: number;
4453

54+
/**
55+
* The object type, which is always "model".
56+
*/
4557
object: string;
4658

59+
/**
60+
* The organization that owns the model.
61+
*/
4762
owned_by: string;
4863
}
4964

‎src/resources/moderations.ts

+71
Original file line numberDiff line numberDiff line change
@@ -17,52 +17,123 @@ export class Moderations extends APIResource {
1717
}
1818

1919
export interface Moderation {
20+
/**
21+
* A list of the categories, and whether they are flagged or not.
22+
*/
2023
categories: Moderation.Categories;
2124

25+
/**
26+
* A list of the categories along with their scores as predicted by model.
27+
*/
2228
category_scores: Moderation.CategoryScores;
2329

30+
/**
31+
* Whether the content violates
32+
* [OpenAI's usage policies](/policies/usage-policies).
33+
*/
2434
flagged: boolean;
2535
}
2636

2737
export namespace Moderation {
38+
/**
39+
* A list of the categories, and whether they are flagged or not.
40+
*/
2841
export interface Categories {
42+
/**
43+
* Whether the content was flagged as 'hate'.
44+
*/
2945
hate: boolean;
3046

47+
/**
48+
* Whether the content was flagged as 'hate/threatening'.
49+
*/
3150
'hate/threatening': boolean;
3251

52+
/**
53+
* Whether the content was flagged as 'self-harm'.
54+
*/
3355
'self-harm': boolean;
3456

57+
/**
58+
* Whether the content was flagged as 'sexual'.
59+
*/
3560
sexual: boolean;
3661

62+
/**
63+
* Whether the content was flagged as 'sexual/minors'.
64+
*/
3765
'sexual/minors': boolean;
3866

67+
/**
68+
* Whether the content was flagged as 'violence'.
69+
*/
3970
violence: boolean;
4071

72+
/**
73+
* Whether the content was flagged as 'violence/graphic'.
74+
*/
4175
'violence/graphic': boolean;
4276
}
4377

78+
/**
79+
* A list of the categories along with their scores as predicted by model.
80+
*/
4481
export interface CategoryScores {
82+
/**
83+
* The score for the category 'hate'.
84+
*/
4585
hate: number;
4686

87+
/**
88+
* The score for the category 'hate/threatening'.
89+
*/
4790
'hate/threatening': number;
4891

92+
/**
93+
* The score for the category 'self-harm'.
94+
*/
4995
'self-harm': number;
5096

97+
/**
98+
* The score for the category 'sexual'.
99+
*/
51100
sexual: number;
52101

102+
/**
103+
* The score for the category 'sexual/minors'.
104+
*/
53105
'sexual/minors': number;
54106

107+
/**
108+
* The score for the category 'violence'.
109+
*/
55110
violence: number;
56111

112+
/**
113+
* The score for the category 'violence/graphic'.
114+
*/
57115
'violence/graphic': number;
58116
}
59117
}
60118

119+
/**
120+
* Represents policy compliance report by OpenAI's content moderation model against
121+
* a given input.
122+
*/
61123
export interface ModerationCreateResponse {
124+
/**
125+
* The unique identifier for the moderation request.
126+
*/
62127
id: string;
63128

129+
/**
130+
* The model used to generate the moderation results.
131+
*/
64132
model: string;
65133

134+
/**
135+
* A list of moderation objects.
136+
*/
66137
results: Array<Moderation>;
67138
}
68139

‎src/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '4.0.0-beta.10';
1+
export const VERSION = '4.0.0-beta.11';

0 commit comments

Comments
 (0)
Please sign in to comment.