-
Notifications
You must be signed in to change notification settings - Fork 938
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
base: erikeldridge-vertex-stream
Are you sure you want to change the base?
Sid hybrid count token #8925
Conversation
|
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.
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 () => { |
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.
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 { |
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.
Minor: unnecessary else
, given the return statement above
Hey there! So you want to contribute to a Firebase SDK?
Before you file this pull request, please read these guidelines:
Discussion
If not, go file an issue about this before creating a pull request to discuss.
Testing
API Changes
us make Firebase APIs better, please propose your change in an issue so that we
can discuss it together.