-
Notifications
You must be signed in to change notification settings - Fork 919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for token-based usage metrics. #8757
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d93ded6
Add support for token-based usage metrics.
rlazo 41cfa7b
Use right name for unspecified enum
rlazo bb950ff
Update API reports
rlazo ca74f88
Make promptTokensDetails an array
rlazo accb059
Update API reports
rlazo 1b05808
Merge branch 'main' into rl.token.count.js.modality
rlazo 61efb23
Add missing documentation
rlazo 40914d7
Add changeset entry
rlazo 9b8a59f
Fix formatting errors
rlazo 94bb826
Update API reports
rlazo ddb1a9a
Merge branch 'main' into rl.token.count.js.modality
rlazo fd5dcea
Merge branch 'main' into rl.token.count.js.modality
rlazo 7b5193a
Add missing refdoc
rlazo 6aaf68c
Update API reports
rlazo 7b043ec
Merge branch 'main' into rl.token.count.js.modality
rlazo ad619f5
Use correct formatting for Modality documentation.
rlazo db47a2f
Update API reports
rlazo 2efd3fa
Update docs
rlazo 421ab29
Update packages/vertexai/src/types/enums.ts
rlazo a6d2201
Merge branch 'main' into rl.token.count.js.modality
rlazo 813f682
Update md files
rlazo 6f90b2e
Revert changes to api-extractor.json
rlazo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,6 @@ | ||
--- | ||
'@firebase/vertexai': minor | ||
'firebase': minor | ||
--- | ||
|
||
Added support for modality-based token count. |
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
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
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,46 @@ | ||
Project: /docs/reference/js/_project.yaml | ||
Book: /docs/reference/_book.yaml | ||
page_type: reference | ||
|
||
{% comment %} | ||
DO NOT EDIT THIS FILE! | ||
This is generated by the JS SDK team, and any local changes will be | ||
overwritten. Changes should be made in the source code at | ||
https://github.com/firebase/firebase-js-sdk | ||
{% endcomment %} | ||
|
||
# ModalityTokenCount interface | ||
Represents token counting info for a single modality. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface ModalityTokenCount | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [modality](./vertexai.modalitytokencount.md#modalitytokencountmodality) | [Modality](./vertexai.md#modality) | The modality associated with this token count. | | ||
| [tokenCount](./vertexai.modalitytokencount.md#modalitytokencounttokencount) | number | The number of tokens counted. | | ||
|
||
## ModalityTokenCount.modality | ||
|
||
The modality associated with this token count. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
modality: Modality; | ||
``` | ||
|
||
## ModalityTokenCount.tokenCount | ||
|
||
The number of tokens counted. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
tokenCount: 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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want docs on this property? If so, add it in the same comment format as the two other properties above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, thanks!
BTW, why are
enums
shown as (undocumented) in the generated .md file?