Skip to content

Sid hybrid count token #8925

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

Open
wants to merge 5 commits into
base: erikeldridge-vertex-stream
Choose a base branch
from

Conversation

gsiddh
Copy link

@gsiddh gsiddh commented Apr 14, 2025

Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:

Discussion

  • Read the contribution guidelines (CONTRIBUTING.md).
  • If this has been discussed in an issue, make sure to link to the issue here.
    If not, go file an issue about this before creating a pull request to discuss.

Testing

  • Make sure all existing tests in the repository pass after your change.
  • If you fixed a bug or added a feature, add a new test to cover your code.

API Changes

  • At this time we cannot accept changes that affect the public API. If you'd like to help
    us make Firebase APIs better, please propose your change in an issue so that we
    can discuss it together.

@gsiddh gsiddh requested a review from a team as a code owner April 14, 2025 20:43
Copy link

changeset-bot bot commented Apr 14, 2025

⚠️ No Changeset found

Latest commit: 6eaf81f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@erikeldridge erikeldridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! LGTM. I'll hold off on checking "approve" to avoid confusion with the formal approval we'll need from @hsubox76.

@@ -298,4 +298,87 @@ describe('ChromeAdapter', () => {
});
});
});
describe('countTokens', () => {
it('With no initial prompts', async () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: describing this as a test for a singular input, eg it('counts tokens from a singular input', would be more self-explanatory from my perspective.

): Promise<CountTokensResponse> {
if (await chromeAdapter.isAvailable(params)) {
return (await chromeAdapter.countTokens(params)).json();
} else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: unnecessary else, given the return statement above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants