Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions generative-ai/snippets/count-tokens/countTokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// [START generativeaionvertexai_gemini_token_count]
const {GoogleGenAI} = require('@google/genai');

/**
Expand Down Expand Up @@ -51,7 +50,6 @@ async function countTokens(
const usageMetadata = result.usageMetadata;
console.log('Response tokens count: ', usageMetadata);
}
// [END generativeaionvertexai_gemini_token_count]

countTokens(...process.argv.slice(2)).catch(err => {
console.error(err.message);
Expand Down
2 changes: 0 additions & 2 deletions generative-ai/snippets/count-tokens/countTokensAdvanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// [START generativeaionvertexai_gemini_token_count_advanced]
const {GoogleGenAI} = require('@google/genai');
/**
* TODO(developer): Update these variables before running the sample.
Expand Down Expand Up @@ -63,7 +62,6 @@ async function countTokens(
console.log('Candidates Token Count:', usageMetadata.candidatesTokenCount);
console.log('Total Token Count:', usageMetadata.totalTokenCount);
}
// [END generativeaionvertexai_gemini_token_count_advanced]

countTokens(...process.argv.slice(2)).catch(err => {
console.error(err.message);
Expand Down
Loading