feat(generative-ai): migrate batch 3 samples to @google/genai and remove old vertexai package#4334
feat(generative-ai): migrate batch 3 samples to @google/genai and remove old vertexai package#4334angelcaamal wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the generative AI snippets from the @google-cloud/vertexai SDK to the new @google/genai SDK, updating the default model to gemini-2.5-flash and simplifying client initialization and content generation. Additionally, previously skipped tests are now enabled. A review comment suggests updating an outdated test comment in nonStreamingContent.test.js to accurately describe the new assertion logic.
…treamingContent test
|
There's currently a directory of samples for the updated SDK Here https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/main/genai Most of the samples updated in this PR seem to be duplicated in this other directory, can they be consolidated? |
|
Hi @holtskinner thanks for the feedback! You're completely right. However, this PR is primarily a fix to unblock the CI/tests that were failing due to the old vertex library. Consolidating the samples and migrating the region tags to the genai folder is the very next task planned. Does it work for you if we merge this to fix the tests first, and handle the consolidation in the next PR? |
Description
Fixes Internal: b/519978610
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
npm test(see Testing)npm run lint(see Style)GoogleCloudPlatform/nodejs-docs-samples. Not a fork.