Skip to content

Commit 3e7a6b8

Browse files
committed
Convert enum comments to doc comments
1 parent 82373b3 commit 3e7a6b8

File tree

3 files changed

+101
-77
lines changed

3 files changed

+101
-77
lines changed

common/api-review/vertexai.api.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ export interface BaseParams {
2828

2929
// @public
3030
export enum BlockReason {
31-
// (undocumented)
3231
OTHER = "OTHER",
33-
// (undocumented)
3432
SAFETY = "SAFETY"
3533
}
3634

@@ -157,15 +155,10 @@ export interface FileDataPart {
157155

158156
// @public
159157
export enum FinishReason {
160-
// (undocumented)
161158
MAX_TOKENS = "MAX_TOKENS",
162-
// (undocumented)
163159
OTHER = "OTHER",
164-
// (undocumented)
165160
RECITATION = "RECITATION",
166-
// (undocumented)
167161
SAFETY = "SAFETY",
168-
// (undocumented)
169162
STOP = "STOP"
170163
}
171164

@@ -187,11 +180,8 @@ export interface FunctionCallingConfig {
187180

188181
// @public (undocumented)
189182
export enum FunctionCallingMode {
190-
// (undocumented)
191183
ANY = "ANY",
192-
// (undocumented)
193184
AUTO = "AUTO",
194-
// (undocumented)
195185
NONE = "NONE"
196186
}
197187

@@ -375,21 +365,15 @@ export interface GroundingMetadata {
375365

376366
// @public (undocumented)
377367
export enum HarmBlockMethod {
378-
// (undocumented)
379368
PROBABILITY = "PROBABILITY",
380-
// (undocumented)
381369
SEVERITY = "SEVERITY"
382370
}
383371

384372
// @public
385373
export enum HarmBlockThreshold {
386-
// (undocumented)
387374
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
388-
// (undocumented)
389375
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
390-
// (undocumented)
391376
BLOCK_NONE = "BLOCK_NONE",
392-
// (undocumented)
393377
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH"
394378
}
395379

@@ -407,25 +391,17 @@ export enum HarmCategory {
407391

408392
// @public
409393
export enum HarmProbability {
410-
// (undocumented)
411394
HIGH = "HIGH",
412-
// (undocumented)
413395
LOW = "LOW",
414-
// (undocumented)
415396
MEDIUM = "MEDIUM",
416-
// (undocumented)
417397
NEGLIGIBLE = "NEGLIGIBLE"
418398
}
419399

420400
// @public
421401
export enum HarmSeverity {
422-
// (undocumented)
423402
HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH",
424-
// (undocumented)
425403
HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW",
426-
// (undocumented)
427404
HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM",
428-
// (undocumented)
429405
HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE"
430406
}
431407

docs-devsite/vertexai.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ export declare enum BlockReason
231231

232232
| Member | Value | Description |
233233
| --- | --- | --- |
234-
| OTHER | <code>&quot;OTHER&quot;</code> | |
235-
| SAFETY | <code>&quot;SAFETY&quot;</code> | |
234+
| OTHER | <code>&quot;OTHER&quot;</code> | Content was blocked, but the reason is uncategorized. |
235+
| SAFETY | <code>&quot;SAFETY&quot;</code> | Content was blocked by safety settings. |
236236

237237
## FinishReason
238238

@@ -248,11 +248,11 @@ export declare enum FinishReason
248248

249249
| Member | Value | Description |
250250
| --- | --- | --- |
251-
| MAX\_TOKENS | <code>&quot;MAX_TOKENS&quot;</code> | |
252-
| OTHER | <code>&quot;OTHER&quot;</code> | |
253-
| RECITATION | <code>&quot;RECITATION&quot;</code> | |
254-
| SAFETY | <code>&quot;SAFETY&quot;</code> | |
255-
| STOP | <code>&quot;STOP&quot;</code> | |
251+
| MAX\_TOKENS | <code>&quot;MAX_TOKENS&quot;</code> | The maximum number of tokens as specified in the request was reached. |
252+
| OTHER | <code>&quot;OTHER&quot;</code> | Unknown reason. |
253+
| RECITATION | <code>&quot;RECITATION&quot;</code> | The candidate content was flagged for recitation reasons. |
254+
| SAFETY | <code>&quot;SAFETY&quot;</code> | The candidate content was flagged for safety reasons. |
255+
| STOP | <code>&quot;STOP&quot;</code> | Natural stop point of the model or provided stop sequence. |
256256

257257
## FunctionCallingMode
258258

@@ -267,9 +267,9 @@ export declare enum FunctionCallingMode
267267

268268
| Member | Value | Description |
269269
| --- | --- | --- |
270-
| ANY | <code>&quot;ANY&quot;</code> | |
271-
| AUTO | <code>&quot;AUTO&quot;</code> | |
272-
| NONE | <code>&quot;NONE&quot;</code> | |
270+
| ANY | <code>&quot;ANY&quot;</code> | Model is constrained to always predicting a function call only. If "allowed\_function\_names" is set, the predicted function call will be limited to any one of "allowed\_function\_names", else the predicted function call will be any one of the provided "function\_declarations". |
271+
| AUTO | <code>&quot;AUTO&quot;</code> | Default model behavior, model decides to predict either a function call or a natural language response. |
272+
| NONE | <code>&quot;NONE&quot;</code> | Model will not predict any function call. Model behavior is same as when not passing any function declarations. |
273273

274274
## HarmBlockMethod
275275

@@ -284,8 +284,8 @@ export declare enum HarmBlockMethod
284284

285285
| Member | Value | Description |
286286
| --- | --- | --- |
287-
| PROBABILITY | <code>&quot;PROBABILITY&quot;</code> | |
288-
| SEVERITY | <code>&quot;SEVERITY&quot;</code> | |
287+
| PROBABILITY | <code>&quot;PROBABILITY&quot;</code> | The harm block method uses the probability score. |
288+
| SEVERITY | <code>&quot;SEVERITY&quot;</code> | The harm block method uses both probability and severity scores. |
289289

290290
## HarmBlockThreshold
291291

@@ -301,10 +301,10 @@ export declare enum HarmBlockThreshold
301301

302302
| Member | Value | Description |
303303
| --- | --- | --- |
304-
| BLOCK\_LOW\_AND\_ABOVE | <code>&quot;BLOCK_LOW_AND_ABOVE&quot;</code> | |
305-
| BLOCK\_MEDIUM\_AND\_ABOVE | <code>&quot;BLOCK_MEDIUM_AND_ABOVE&quot;</code> | |
306-
| BLOCK\_NONE | <code>&quot;BLOCK_NONE&quot;</code> | |
307-
| BLOCK\_ONLY\_HIGH | <code>&quot;BLOCK_ONLY_HIGH&quot;</code> | |
304+
| BLOCK\_LOW\_AND\_ABOVE | <code>&quot;BLOCK_LOW_AND_ABOVE&quot;</code> | Content with NEGLIGIBLE will be allowed. |
305+
| BLOCK\_MEDIUM\_AND\_ABOVE | <code>&quot;BLOCK_MEDIUM_AND_ABOVE&quot;</code> | Content with NEGLIGIBLE and LOW will be allowed. |
306+
| BLOCK\_NONE | <code>&quot;BLOCK_NONE&quot;</code> | All content will be allowed. |
307+
| BLOCK\_ONLY\_HIGH | <code>&quot;BLOCK_ONLY_HIGH&quot;</code> | Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed. |
308308

309309
## HarmCategory
310310

@@ -339,10 +339,10 @@ export declare enum HarmProbability
339339

340340
| Member | Value | Description |
341341
| --- | --- | --- |
342-
| HIGH | <code>&quot;HIGH&quot;</code> | |
343-
| LOW | <code>&quot;LOW&quot;</code> | |
344-
| MEDIUM | <code>&quot;MEDIUM&quot;</code> | |
345-
| NEGLIGIBLE | <code>&quot;NEGLIGIBLE&quot;</code> | |
342+
| HIGH | <code>&quot;HIGH&quot;</code> | Content has a high chance of being unsafe. |
343+
| LOW | <code>&quot;LOW&quot;</code> | Content has a low chance of being unsafe. |
344+
| MEDIUM | <code>&quot;MEDIUM&quot;</code> | Content has a medium chance of being unsafe. |
345+
| NEGLIGIBLE | <code>&quot;NEGLIGIBLE&quot;</code> | Content has a negligible chance of being unsafe. |
346346

347347
## HarmSeverity
348348

@@ -358,10 +358,10 @@ export declare enum HarmSeverity
358358

359359
| Member | Value | Description |
360360
| --- | --- | --- |
361-
| HARM\_SEVERITY\_HIGH | <code>&quot;HARM_SEVERITY_HIGH&quot;</code> | |
362-
| HARM\_SEVERITY\_LOW | <code>&quot;HARM_SEVERITY_LOW&quot;</code> | |
363-
| HARM\_SEVERITY\_MEDIUM | <code>&quot;HARM_SEVERITY_MEDIUM&quot;</code> | |
364-
| HARM\_SEVERITY\_NEGLIGIBLE | <code>&quot;HARM_SEVERITY_NEGLIGIBLE&quot;</code> | |
361+
| HARM\_SEVERITY\_HIGH | <code>&quot;HARM_SEVERITY_HIGH&quot;</code> | High level of harm severity. |
362+
| HARM\_SEVERITY\_LOW | <code>&quot;HARM_SEVERITY_LOW&quot;</code> | Low level of harm severity. |
363+
| HARM\_SEVERITY\_MEDIUM | <code>&quot;HARM_SEVERITY_MEDIUM&quot;</code> | Medium level of harm severity. |
364+
| HARM\_SEVERITY\_NEGLIGIBLE | <code>&quot;HARM_SEVERITY_NEGLIGIBLE&quot;</code> | Negligible level of harm severity. |
365365

366366
## SchemaType
367367

packages/vertexai/src/types/enums.ts

Lines changed: 77 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,35 @@ export enum HarmCategory {
4343
* @public
4444
*/
4545
export enum HarmBlockThreshold {
46-
// Content with NEGLIGIBLE will be allowed.
46+
/**
47+
* Content with NEGLIGIBLE will be allowed.
48+
*/
4749
BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',
48-
// Content with NEGLIGIBLE and LOW will be allowed.
50+
/**
51+
* Content with NEGLIGIBLE and LOW will be allowed.
52+
*/
4953
BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',
50-
// Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed.
54+
/**
55+
* Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed.
56+
*/
5157
BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',
52-
// All content will be allowed.
58+
/**
59+
* All content will be allowed.
60+
*/
5361
BLOCK_NONE = 'BLOCK_NONE'
5462
}
5563

5664
/**
5765
* @public
5866
*/
5967
export enum HarmBlockMethod {
60-
// The harm block method uses both probability and severity scores.
68+
/**
69+
* The harm block method uses both probability and severity scores.
70+
*/
6171
SEVERITY = 'SEVERITY',
62-
// The harm block method uses the probability score.
72+
/**
73+
* The harm block method uses the probability score.
74+
*/
6375
PROBABILITY = 'PROBABILITY'
6476
}
6577

@@ -68,13 +80,21 @@ export enum HarmBlockMethod {
6880
* @public
6981
*/
7082
export enum HarmProbability {
71-
// Content has a negligible chance of being unsafe.
83+
/**
84+
* Content has a negligible chance of being unsafe.
85+
*/
7286
NEGLIGIBLE = 'NEGLIGIBLE',
73-
// Content has a low chance of being unsafe.
87+
/**
88+
* Content has a low chance of being unsafe.
89+
*/
7490
LOW = 'LOW',
75-
// Content has a medium chance of being unsafe.
91+
/**
92+
* Content has a medium chance of being unsafe.
93+
*/
7694
MEDIUM = 'MEDIUM',
77-
// Content has a high chance of being unsafe.
95+
/**
96+
* Content has a high chance of being unsafe.
97+
*/
7898
HIGH = 'HIGH'
7999
}
80100

@@ -83,13 +103,21 @@ export enum HarmProbability {
83103
* @public
84104
*/
85105
export enum HarmSeverity {
86-
// Negligible level of harm severity.
106+
/**
107+
* Negligible level of harm severity.
108+
*/
87109
HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE',
88-
// Low level of harm severity.
110+
/**
111+
* Low level of harm severity.
112+
*/
89113
HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW',
90-
// Medium level of harm severity.
114+
/**
115+
* Medium level of harm severity.
116+
*/
91117
HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM',
92-
// High level of harm severity.
118+
/**
119+
* High level of harm severity.
120+
*/
93121
HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH'
94122
}
95123

@@ -98,9 +126,13 @@ export enum HarmSeverity {
98126
* @public
99127
*/
100128
export enum BlockReason {
101-
// Content was blocked by safety settings.
129+
/**
130+
* Content was blocked by safety settings.
131+
*/
102132
SAFETY = 'SAFETY',
103-
// Content was blocked, but the reason is uncategorized.
133+
/**
134+
* Content was blocked, but the reason is uncategorized.
135+
*/
104136
OTHER = 'OTHER'
105137
}
106138

@@ -109,31 +141,47 @@ export enum BlockReason {
109141
* @public
110142
*/
111143
export enum FinishReason {
112-
// Natural stop point of the model or provided stop sequence.
144+
/**
145+
* Natural stop point of the model or provided stop sequence.
146+
*/
113147
STOP = 'STOP',
114-
// The maximum number of tokens as specified in the request was reached.
148+
/**
149+
* The maximum number of tokens as specified in the request was reached.
150+
*/
115151
MAX_TOKENS = 'MAX_TOKENS',
116-
// The candidate content was flagged for safety reasons.
152+
/**
153+
* The candidate content was flagged for safety reasons.
154+
*/
117155
SAFETY = 'SAFETY',
118-
// The candidate content was flagged for recitation reasons.
156+
/**
157+
* The candidate content was flagged for recitation reasons.
158+
*/
119159
RECITATION = 'RECITATION',
120-
// Unknown reason.
160+
/**
161+
* Unknown reason.
162+
*/
121163
OTHER = 'OTHER'
122164
}
123165

124166
/**
125167
* @public
126168
*/
127169
export enum FunctionCallingMode {
128-
// Default model behavior, model decides to predict either a function call
129-
// or a natural language response.
170+
/**
171+
* Default model behavior, model decides to predict either a function call
172+
* or a natural language response.
173+
*/
130174
AUTO = 'AUTO',
131-
// Model is constrained to always predicting a function call only.
132-
// If "allowed_function_names" is set, the predicted function call will be
133-
// limited to any one of "allowed_function_names", else the predicted
134-
// function call will be any one of the provided "function_declarations".
175+
/**
176+
* Model is constrained to always predicting a function call only.
177+
* If "allowed_function_names" is set, the predicted function call will be
178+
* limited to any one of "allowed_function_names", else the predicted
179+
* function call will be any one of the provided "function_declarations".
180+
*/
135181
ANY = 'ANY',
136-
// Model will not predict any function call. Model behavior is same as when
137-
// not passing any function declarations.
182+
/**
183+
* Model will not predict any function call. Model behavior is same as when
184+
* not passing any function declarations.
185+
*/
138186
NONE = 'NONE'
139187
}

0 commit comments

Comments
 (0)