GoogleCloudPlatform / nodejs-docs-samples

Node.js samples for Google Cloud Platform products.
https://cloud.google.com/nodejs
Apache License 2.0
2.82k stars 1.95k forks source link

improvement: generativeaionvertexai_gemini_safety_settings and generativeaionvertexai_gemini_token_count #3878

Closed gryczj closed 1 month ago

gryczj commented 1 month ago

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

conventional-commit-lint-gcf[bot] commented 1 month ago

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot https://conventionalcommits.org/

gryczj commented 1 month ago

Changes introduced to be consistent with python implementation: https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/generative_ai/gemini_count_token_example.py and https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/generative_ai/gemini_safety_config_example.py.

Clarification can be found: https://docs.google.com/document/d/1IwvxzFwLhZIsAUWb48rjzGwnAiWNDQ08pDO6KlLy6ms/edit