-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Granular Per-Agent Speech Configuration #3170
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @qyuo, 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 enhances the flexibility of LLM agent configurations by enabling granular, per-agent speech settings. It ensures that during live interactions, an agent's specific speech configuration is prioritized over the general run configuration, providing more precise control over how individual agents handle speech input and output. This change directly addresses a feature request to allow agents to define their own speech parameters. 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 speech_config
at the LlmAgent
level, providing more granular control over speech settings. The implementation correctly prioritizes the agent-specific configuration over the global run configuration. The changes are well-supported by unit tests that cover various scenarios. I have a couple of suggestions to enhance the code's robustness against potential null values and to improve the maintainability of the new tests.
If there are multiple agents with different speech config, will that work? |
Could you update this sample to have different configs for each agent: https://github.com/google/adk-python/tree/main/contributing/samples/live_bidi_streaming_multi_agent? |
Yes. They will reply with a different voice based on which one provides the final output. |
Addresses Feature Request: #3116
This PR adds a
speech_config
to the LLM Agent configuration for the live use case. When an asynchronous LLM call is made to the Gemini Live API, it prioritizes the most specific agent configuration's speech_config. If that is null, it then uses the run configuration's speech_config. Unit tests have been added to verify this behavior.