diff --git a/common/api-review/vertexai.api.md b/common/api-review/vertexai.api.md index 14c58e803e5..c0b28466bd7 100644 --- a/common/api-review/vertexai.api.md +++ b/common/api-review/vertexai.api.md @@ -29,10 +29,8 @@ export interface BaseParams { // @public export enum BlockReason { BLOCKLIST = "BLOCKLIST", - // (undocumented) OTHER = "OTHER", PROHIBITED_CONTENT = "PROHIBITED_CONTENT", - // (undocumented) SAFETY = "SAFETY" } @@ -162,17 +160,12 @@ export interface FileDataPart { export enum FinishReason { BLOCKLIST = "BLOCKLIST", MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL", - // (undocumented) MAX_TOKENS = "MAX_TOKENS", - // (undocumented) OTHER = "OTHER", PROHIBITED_CONTENT = "PROHIBITED_CONTENT", - // (undocumented) RECITATION = "RECITATION", - // (undocumented) SAFETY = "SAFETY", SPII = "SPII", - // (undocumented) STOP = "STOP" } @@ -194,11 +187,8 @@ export interface FunctionCallingConfig { // @public (undocumented) export enum FunctionCallingMode { - // (undocumented) ANY = "ANY", - // (undocumented) AUTO = "AUTO", - // (undocumented) NONE = "NONE" } @@ -383,21 +373,15 @@ export interface GroundingMetadata { // @public (undocumented) export enum HarmBlockMethod { - // (undocumented) PROBABILITY = "PROBABILITY", - // (undocumented) SEVERITY = "SEVERITY" } // @public export enum HarmBlockThreshold { - // (undocumented) BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE", - // (undocumented) BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE", - // (undocumented) BLOCK_NONE = "BLOCK_NONE", - // (undocumented) BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH" } @@ -415,25 +399,17 @@ export enum HarmCategory { // @public export enum HarmProbability { - // (undocumented) HIGH = "HIGH", - // (undocumented) LOW = "LOW", - // (undocumented) MEDIUM = "MEDIUM", - // (undocumented) NEGLIGIBLE = "NEGLIGIBLE" } // @public export enum HarmSeverity { - // (undocumented) HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH", - // (undocumented) HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW", - // (undocumented) HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM", - // (undocumented) HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE" } diff --git a/docs-devsite/vertexai.md b/docs-devsite/vertexai.md index c0e744fb8e9..eb805c7710f 100644 --- a/docs-devsite/vertexai.md +++ b/docs-devsite/vertexai.md @@ -278,9 +278,9 @@ export declare enum BlockReason | Member | Value | Description | | --- | --- | --- | | BLOCKLIST | "BLOCKLIST" | Content was blocked because it contained terms from the terminology blocklist. | -| OTHER | "OTHER" | | +| OTHER | "OTHER" | Content was blocked, but the reason is uncategorized. | | PROHIBITED\_CONTENT | "PROHIBITED_CONTENT" | Content was blocked due to prohibited content. | -| SAFETY | "SAFETY" | | +| SAFETY | "SAFETY" | Content was blocked by safety settings. | ## FinishReason @@ -298,13 +298,13 @@ export declare enum FinishReason | --- | --- | --- | | BLOCKLIST | "BLOCKLIST" | The candidate content contained forbidden terms. | | MALFORMED\_FUNCTION\_CALL | "MALFORMED_FUNCTION_CALL" | The function call generated by the model was invalid. | -| MAX\_TOKENS | "MAX_TOKENS" | | -| OTHER | "OTHER" | | +| MAX\_TOKENS | "MAX_TOKENS" | The maximum number of tokens as specified in the request was reached. | +| OTHER | "OTHER" | Unknown reason. | | PROHIBITED\_CONTENT | "PROHIBITED_CONTENT" | The candidate content potentially contained prohibited content. | -| RECITATION | "RECITATION" | | -| SAFETY | "SAFETY" | | +| RECITATION | "RECITATION" | The candidate content was flagged for recitation reasons. | +| SAFETY | "SAFETY" | The candidate content was flagged for safety reasons. | | SPII | "SPII" | The candidate content potentially contained Sensitive Personally Identifiable Information (SPII). | -| STOP | "STOP" | | +| STOP | "STOP" | Natural stop point of the model or provided stop sequence. | ## FunctionCallingMode @@ -319,9 +319,9 @@ export declare enum FunctionCallingMode | Member | Value | Description | | --- | --- | --- | -| ANY | "ANY" | | -| AUTO | "AUTO" | | -| NONE | "NONE" | | +| ANY | "ANY" | 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. | +| AUTO | "AUTO" | Default model behavior; model decides to predict either a function call or a natural language response. | +| NONE | "NONE" | Model will not predict any function call. Model behavior is same as when not passing any function declarations. | ## HarmBlockMethod @@ -336,8 +336,8 @@ export declare enum HarmBlockMethod | Member | Value | Description | | --- | --- | --- | -| PROBABILITY | "PROBABILITY" | | -| SEVERITY | "SEVERITY" | | +| PROBABILITY | "PROBABILITY" | The harm block method uses the probability score. | +| SEVERITY | "SEVERITY" | The harm block method uses both probability and severity scores. | ## HarmBlockThreshold @@ -353,10 +353,10 @@ export declare enum HarmBlockThreshold | Member | Value | Description | | --- | --- | --- | -| BLOCK\_LOW\_AND\_ABOVE | "BLOCK_LOW_AND_ABOVE" | | -| BLOCK\_MEDIUM\_AND\_ABOVE | "BLOCK_MEDIUM_AND_ABOVE" | | -| BLOCK\_NONE | "BLOCK_NONE" | | -| BLOCK\_ONLY\_HIGH | "BLOCK_ONLY_HIGH" | | +| BLOCK\_LOW\_AND\_ABOVE | "BLOCK_LOW_AND_ABOVE" | Content with NEGLIGIBLE will be allowed. | +| BLOCK\_MEDIUM\_AND\_ABOVE | "BLOCK_MEDIUM_AND_ABOVE" | Content with NEGLIGIBLE and LOW will be allowed. | +| BLOCK\_NONE | "BLOCK_NONE" | All content will be allowed. | +| BLOCK\_ONLY\_HIGH | "BLOCK_ONLY_HIGH" | Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed. | ## HarmCategory @@ -391,10 +391,10 @@ export declare enum HarmProbability | Member | Value | Description | | --- | --- | --- | -| HIGH | "HIGH" | | -| LOW | "LOW" | | -| MEDIUM | "MEDIUM" | | -| NEGLIGIBLE | "NEGLIGIBLE" | | +| HIGH | "HIGH" | Content has a high chance of being unsafe. | +| LOW | "LOW" | Content has a low chance of being unsafe. | +| MEDIUM | "MEDIUM" | Content has a medium chance of being unsafe. | +| NEGLIGIBLE | "NEGLIGIBLE" | Content has a negligible chance of being unsafe. | ## HarmSeverity @@ -410,10 +410,10 @@ export declare enum HarmSeverity | Member | Value | Description | | --- | --- | --- | -| HARM\_SEVERITY\_HIGH | "HARM_SEVERITY_HIGH" | | -| HARM\_SEVERITY\_LOW | "HARM_SEVERITY_LOW" | | -| HARM\_SEVERITY\_MEDIUM | "HARM_SEVERITY_MEDIUM" | | -| HARM\_SEVERITY\_NEGLIGIBLE | "HARM_SEVERITY_NEGLIGIBLE" | | +| HARM\_SEVERITY\_HIGH | "HARM_SEVERITY_HIGH" | High level of harm severity. | +| HARM\_SEVERITY\_LOW | "HARM_SEVERITY_LOW" | Low level of harm severity. | +| HARM\_SEVERITY\_MEDIUM | "HARM_SEVERITY_MEDIUM" | Medium level of harm severity. | +| HARM\_SEVERITY\_NEGLIGIBLE | "HARM_SEVERITY_NEGLIGIBLE" | Negligible level of harm severity. | ## ImagenAspectRatio diff --git a/packages/vertexai/src/types/enums.ts b/packages/vertexai/src/types/enums.ts index 78cbdb09bd7..a9481d40f5f 100644 --- a/packages/vertexai/src/types/enums.ts +++ b/packages/vertexai/src/types/enums.ts @@ -43,13 +43,21 @@ export enum HarmCategory { * @public */ export enum HarmBlockThreshold { - // Content with NEGLIGIBLE will be allowed. + /** + * Content with `NEGLIGIBLE` will be allowed. + */ BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE', - // Content with NEGLIGIBLE and LOW will be allowed. + /** + * Content with `NEGLIGIBLE` and `LOW` will be allowed. + */ BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE', - // Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed. + /** + * Content with `NEGLIGIBLE`, `LOW`, and `MEDIUM` will be allowed. + */ BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH', - // All content will be allowed. + /** + * All content will be allowed. + */ BLOCK_NONE = 'BLOCK_NONE' } @@ -57,9 +65,13 @@ export enum HarmBlockThreshold { * @public */ export enum HarmBlockMethod { - // The harm block method uses both probability and severity scores. + /** + * The harm block method uses both probability and severity scores. + */ SEVERITY = 'SEVERITY', - // The harm block method uses the probability score. + /** + * The harm block method uses the probability score. + */ PROBABILITY = 'PROBABILITY' } @@ -68,13 +80,21 @@ export enum HarmBlockMethod { * @public */ export enum HarmProbability { - // Content has a negligible chance of being unsafe. + /** + * Content has a negligible chance of being unsafe. + */ NEGLIGIBLE = 'NEGLIGIBLE', - // Content has a low chance of being unsafe. + /** + * Content has a low chance of being unsafe. + */ LOW = 'LOW', - // Content has a medium chance of being unsafe. + /** + * Content has a medium chance of being unsafe. + */ MEDIUM = 'MEDIUM', - // Content has a high chance of being unsafe. + /** + * Content has a high chance of being unsafe. + */ HIGH = 'HIGH' } @@ -83,13 +103,21 @@ export enum HarmProbability { * @public */ export enum HarmSeverity { - // Negligible level of harm severity. + /** + * Negligible level of harm severity. + */ HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE', - // Low level of harm severity. + /** + * Low level of harm severity. + */ HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW', - // Medium level of harm severity. + /** + * Medium level of harm severity. + */ HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM', - // High level of harm severity. + /** + * High level of harm severity. + */ HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH' } @@ -98,9 +126,13 @@ export enum HarmSeverity { * @public */ export enum BlockReason { - // Content was blocked by safety settings. + /** + * Content was blocked by safety settings. + */ SAFETY = 'SAFETY', - // Content was blocked, but the reason is uncategorized. + /** + * Content was blocked, but the reason is uncategorized. + */ OTHER = 'OTHER', /** * Content was blocked because it contained terms from the terminology blocklist. @@ -117,15 +149,25 @@ export enum BlockReason { * @public */ export enum FinishReason { - // Natural stop point of the model or provided stop sequence. + /** + * Natural stop point of the model or provided stop sequence. + */ STOP = 'STOP', - // The maximum number of tokens as specified in the request was reached. + /** + * The maximum number of tokens as specified in the request was reached. + */ MAX_TOKENS = 'MAX_TOKENS', - // The candidate content was flagged for safety reasons. + /** + * The candidate content was flagged for safety reasons. + */ SAFETY = 'SAFETY', - // The candidate content was flagged for recitation reasons. + /** + * The candidate content was flagged for recitation reasons. + */ RECITATION = 'RECITATION', - // Unknown reason. + /** + * Unknown reason. + */ OTHER = 'OTHER', /** * The candidate content contained forbidden terms. @@ -149,16 +191,22 @@ export enum FinishReason { * @public */ export enum FunctionCallingMode { - // Default model behavior, model decides to predict either a function call - // or a natural language response. + /** + * Default model behavior; model decides to predict either a function call + * or a natural language response. + */ AUTO = 'AUTO', - // 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". + /** + * 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`. + */ ANY = 'ANY', - // Model will not predict any function call. Model behavior is same as when - // not passing any function declarations. + /** + * Model will not predict any function call. Model behavior is same as when + * not passing any function declarations. + */ NONE = 'NONE' }