Skip to content

Commit 61efb23

Browse files
committed
Add missing documentation
1 parent 1b05808 commit 61efb23

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

packages/vertexai/src/types/enums.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,20 @@ export enum FunctionCallingMode {
139139
}
140140

141141
/**
142-
* Type of content.
142+
* Content part modality.
143143
* @public
144144
*/
145145
export enum Modality {
146+
// Unspecified modality.
146147
MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',
148+
// Plain text.
147149
TEXT = 'TEXT',
150+
// Image.
148151
IMAGE = 'IMAGE',
152+
// Video.
149153
VIDEO = 'VIDEO',
154+
// Audio.
150155
AUDIO = 'AUDIO',
156+
// Document, e.g. PDF.
151157
DOCUMENT = 'DOCUMENT'
152158
}

packages/vertexai/src/types/responses.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,14 @@ export interface UsageMetadata {
8989
}
9090

9191
/**
92-
* The number of tokens used by a given content type.
92+
* Represents token counting info for a single modality.
93+
*
9394
* @public
9495
*/
9596
export interface ModalityTokenCount {
97+
/** The modality associated with this token count. */
9698
modality: Modality;
99+
/** The number of tokens counted. */
97100
tokenCount: number;
98101
}
99102

0 commit comments

Comments
 (0)