google-gemini / generative-ai-js

The official Node.js / Typescript library for the Google Gemini API
https://ai.google.dev/
Apache License 2.0
502 stars 96 forks source link

Add GenerateContentRequest as an optional param to CountTokensRequest #148

Closed DellaBitta closed 4 weeks ago

DellaBitta commented 1 month ago

Expand the model's countTokens method to alternatively accept a GenerateContentRequest.

Added integration and unit tests.