-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(genai): live samples part1 #4190
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
feat(genai): live samples part1 #4190
Conversation
Here is the summary of changes.
You are about to add 5 region tags.
- genai/live/live-code-exec-with-txt.js:15, tag
googlegenaisdk_live_code_exec_with_txt - genai/live/live-conversation-audio-with-audio.js:15, tag
googlegenaisdk_live_conversation_audio_with_audio - genai/live/live-func-call-with-txt.js:15, tag
googlegenaisdk_live_func_call_with_txt - genai/live/live-ground-googsearch-with-txt.js:16, tag
googlegenaisdk_live_ground_googsearch_with_txt - genai/live/live-with-txt.js:15, tag
googlegenaisdk_live_with_txt
This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:
- Refresh this comment
Summary of ChangesHello @Guiners, I'm Gemini Code Assist1 ! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request delivers the first part of live samples for the Google GenAI SDK, providing developers with practical, real-time examples. These samples are designed to illustrate how to leverage the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request introduces a set of live samples for the GenAI SDK, demonstrating features like code execution, audio conversations, function calling, and grounding with Google Search. The code is well-structured and provides good examples of how to use the live API.
My review includes a few suggestions for improvement:
- A recurring pattern of using polling with
setTimeoutto wait for messages is present in all samples. I've suggested a more efficient, event-driven approach. - There is a potential bug in the audio conversation sample that could lead to a crash if a message times out. I've provided a fix for this.
- The audio sample also makes an assumption about the WAV file header size which could be brittle.
- There's a minor typo in a test filename (
genai/test/live-conversation-audio-with-audio.js.test.js) which should be corrected for consistency togenai/test/live-conversation-audio-with-audio.test.js.
Overall, these are great additions. My feedback aims to make them more robust and efficient.
Besides @jdomingr comment...... LGTM
f19d350
into
GoogleCloudPlatform:main
Uh oh!
There was an error while loading. Please reload this page.
Description
Fixes #
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.