fix: Correctly handle Gemini parallel function calls in sample notebook
Description
The Gemini API now returns an error when the number of function call responses does not match the requested number of function calls, as reported in https://www.googlecloudcommunity.com/gc/AI-ML/Reasoning-Engine-Error/m-p/789436:
400 Please ensure that function response turn comes immediately after a function call turn. And the number of function response parts should be equal to number of function call parts of the function call turn.
This PR fixes how the sample notebook for Parallel Function Calling handles multiple function call responses.
- [x] Follow the
CONTRIBUTINGGuide. - [x] You are listed as the author in your notebook or README file.
- [x] Your account is listed in
CODEOWNERSfor the file(s).
- [x] Your account is listed in
- [x] Make your Pull Request title in the https://www.conventionalcommits.org/ specification.
- [x] Ensure the tests and linter pass (Run
nox -s formatfrom the repository root to format). - [x] Appropriate docs were updated (if necessary)
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Much appreciated!