Skip to content

Commit 2efd3fa

Browse files
committed
Update docs
1 parent db47a2f commit 2efd3fa

File tree

5 files changed

+57
-3
lines changed

5 files changed

+57
-3
lines changed

docs-devsite/_toc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,8 @@ toc:
540540
path: /docs/reference/js/vertexai.inlinedatapart.md
541541
- title: IntegerSchema
542542
path: /docs/reference/js/vertexai.integerschema.md
543+
- title: ModalityTokenCount
544+
path: /docs/reference/js/vertexai.modalitytokencount.md
543545
- title: ModelParams
544546
path: /docs/reference/js/vertexai.modelparams.md
545547
- title: NumberSchema

docs-devsite/vertexai.counttokensresponse.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,20 @@ export interface CountTokensResponse
2222

2323
| Property | Type | Description |
2424
| --- | --- | --- |
25+
| [promptTokensDetails](./vertexai.counttokensresponse.md#counttokensresponseprompttokensdetails) | [ModalityTokenCount](./vertexai.modalitytokencount.md#modalitytokencount_interface)<!-- -->\[\] | The breakdown, by modality, of how many tokens are consumed by the prompt. |
2526
| [totalBillableCharacters](./vertexai.counttokensresponse.md#counttokensresponsetotalbillablecharacters) | number | The total number of billable characters counted across all instances from the request. |
2627
| [totalTokens](./vertexai.counttokensresponse.md#counttokensresponsetotaltokens) | number | The total number of tokens counted across all instances from the request. |
2728

29+
## CountTokensResponse.promptTokensDetails
30+
31+
The breakdown, by modality, of how many tokens are consumed by the prompt.
32+
33+
<b>Signature:</b>
34+
35+
```typescript
36+
promptTokensDetails?: ModalityTokenCount[];
37+
```
38+
2839
## CountTokensResponse.totalBillableCharacters
2940

3041
The total number of billable characters counted across all instances from the request.

docs-devsite/vertexai.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ The Vertex AI in Firebase Web SDK.
4848
| [HarmCategory](./vertexai.md#harmcategory) | Harm categories that would cause prompts or candidates to be blocked. |
4949
| [HarmProbability](./vertexai.md#harmprobability) | Probability that a prompt or candidate matches a harm category. |
5050
| [HarmSeverity](./vertexai.md#harmseverity) | Harm severity levels. |
51+
| [Modality](./vertexai.md#modality) | Content part modality. |
5152
| [SchemaType](./vertexai.md#schematype) | Contains the list of OpenAPI data types as defined by the [OpenAPI specification](https://swagger.io/docs/specification/data-models/data-types/) |
5253
| [VertexAIErrorCode](./vertexai.md#vertexaierrorcode) | Standardized error codes that <code>[VertexAIError](./vertexai.vertexaierror.md#vertexaierror_class)</code> can have. |
5354

@@ -84,6 +85,7 @@ The Vertex AI in Firebase Web SDK.
8485
| [GroundingAttribution](./vertexai.groundingattribution.md#groundingattribution_interface) | |
8586
| [GroundingMetadata](./vertexai.groundingmetadata.md#groundingmetadata_interface) | Metadata returned to client when grounding is enabled. |
8687
| [InlineDataPart](./vertexai.inlinedatapart.md#inlinedatapart_interface) | Content part interface if the part represents an image. |
88+
| [ModalityTokenCount](./vertexai.modalitytokencount.md#modalitytokencount_interface) | Represents token counting info for a single modality. |
8789
| [ModelParams](./vertexai.modelparams.md#modelparams_interface) | Params passed to <code>[getGenerativeModel()](./vertexai.md#getgenerativemodel_e3037c9)</code>. |
8890
| [ObjectSchemaInterface](./vertexai.objectschemainterface.md#objectschemainterface_interface) | Interface for <code>[ObjectSchema](./vertexai.objectschema.md#objectschema_class)</code> class. |
8991
| [PromptFeedback](./vertexai.promptfeedback.md#promptfeedback_interface) | If the prompt was blocked, this will be populated with <code>blockReason</code> and the relevant <code>safetyRatings</code>. |
@@ -363,6 +365,27 @@ export declare enum HarmSeverity
363365
| HARM\_SEVERITY\_MEDIUM | <code>&quot;HARM_SEVERITY_MEDIUM&quot;</code> | |
364366
| HARM\_SEVERITY\_NEGLIGIBLE | <code>&quot;HARM_SEVERITY_NEGLIGIBLE&quot;</code> | |
365367

368+
## Modality
369+
370+
Content part modality.
371+
372+
<b>Signature:</b>
373+
374+
```typescript
375+
export declare enum Modality
376+
```
377+
378+
## Enumeration Members
379+
380+
| Member | Value | Description |
381+
| --- | --- | --- |
382+
| AUDIO | <code>&quot;AUDIO&quot;</code> | Audio. |
383+
| DOCUMENT | <code>&quot;DOCUMENT&quot;</code> | Document, e.g. PDF. |
384+
| IMAGE | <code>&quot;IMAGE&quot;</code> | Image. |
385+
| MODALITY\_UNSPECIFIED | <code>&quot;MODALITY_UNSPECIFIED&quot;</code> | Unspecified modality. |
386+
| TEXT | <code>&quot;TEXT&quot;</code> | Plain text. |
387+
| VIDEO | <code>&quot;VIDEO&quot;</code> | Video. |
388+
366389
## SchemaType
367390

368391
Contains the list of OpenAPI data types as defined by the [OpenAPI specification](https://swagger.io/docs/specification/data-models/data-types/)

docs-devsite/vertexai.usagemetadata.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export interface UsageMetadata
2323
| Property | Type | Description |
2424
| --- | --- | --- |
2525
| [candidatesTokenCount](./vertexai.usagemetadata.md#usagemetadatacandidatestokencount) | number | |
26+
| [candidatesTokensDetails](./vertexai.usagemetadata.md#usagemetadatacandidatestokensdetails) | [ModalityTokenCount](./vertexai.modalitytokencount.md#modalitytokencount_interface)<!-- -->\[\] | |
2627
| [promptTokenCount](./vertexai.usagemetadata.md#usagemetadataprompttokencount) | number | |
28+
| [promptTokensDetails](./vertexai.usagemetadata.md#usagemetadataprompttokensdetails) | [ModalityTokenCount](./vertexai.modalitytokencount.md#modalitytokencount_interface)<!-- -->\[\] | |
2729
| [totalTokenCount](./vertexai.usagemetadata.md#usagemetadatatotaltokencount) | number | |
2830

2931
## UsageMetadata.candidatesTokenCount
@@ -34,6 +36,14 @@ export interface UsageMetadata
3436
candidatesTokenCount: number;
3537
```
3638

39+
## UsageMetadata.candidatesTokensDetails
40+
41+
<b>Signature:</b>
42+
43+
```typescript
44+
candidatesTokensDetails?: ModalityTokenCount[];
45+
```
46+
3747
## UsageMetadata.promptTokenCount
3848

3949
<b>Signature:</b>
@@ -42,6 +52,14 @@ candidatesTokenCount: number;
4252
promptTokenCount: number;
4353
```
4454

55+
## UsageMetadata.promptTokensDetails
56+
57+
<b>Signature:</b>
58+
59+
```typescript
60+
promptTokensDetails?: ModalityTokenCount[];
61+
```
62+
4563
## UsageMetadata.totalTokenCount
4664

4765
<b>Signature:</b>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"extends": "../../config/api-extractor.json",
3-
// Point it to your entry point d.ts file.
4-
"mainEntryPointFilePath": "<projectFolder>/dist/rules-unit-testing/index.d.ts"
5-
}
3+
// Point it to your entry point d.ts file.
4+
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts"
5+
}

0 commit comments

Comments
 (0)