-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UsageMetadata - add cachedContentTokenCount field (#178)
Add a `cachedContentTokenCount` field to the `UsageMetadata` interface returned by `generateContent` responses.
- Loading branch information
1 parent
92662ca
commit fb1c0f2
Showing
5 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@google/generative-ai": minor | ||
--- | ||
|
||
Add a `cachedContentTokenCount` field to the `UsageMetadata` interface returned by `generateContent` responses. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
docs/reference/main/generative-ai.usagemetadata.cachedcontenttokencount.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@google/generative-ai](./generative-ai.md) > [UsageMetadata](./generative-ai.usagemetadata.md) > [cachedContentTokenCount](./generative-ai.usagemetadata.cachedcontenttokencount.md) | ||
|
||
## UsageMetadata.cachedContentTokenCount property | ||
|
||
Total token count in the cached part of the prompt, i.e. in the cached content. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
cachedContentTokenCount?: number; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters