chore(bigquery): refactor conversational analytics handlers and fix tests#2567
Conversation
Summary of ChangesHello @Genesis929, 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 refactors the BigQuery conversational analytics handlers to enhance the structure and content of the responses. The changes enable handlers to return a richer set of information by accumulating results in a map, and improve the conversation flow by ensuring that only the most current data retrieval results are maintained in the message history. This leads to more informative and streamlined interactions with the BigQuery tool. Highlights
Changelog
Activity
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.
Code Review
This pull request refactors the conversational analytics handlers in bigqueryconversationalanalytics.go to correctly aggregate different parts of a response into a single message, fixing a bug where some information could be lost. The logic for appending messages is also improved to correctly handle Data Retrieved messages, preventing duplicates while preserving other contextual data. The integration tests have been updated to reflect these changes, with more accurate assertions for the expected output. The changes are well-implemented and improve the correctness and robustness of the conversational analytics tool.
71bdd82 to
3196351
Compare
|
/gcbrun |
|
@Genesis929 Seems like there's still one test failure: |
…ests (googleapis#2567) ## Description BigQuery Conversational Analytics tests have been failing, and it appears the cause is a recent change in the API's response format and streaming behavior. This PR refactors the handlers to aggregate response fields correctly. ## PR Checklist > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [ ] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) - [ ] Make sure to add `!` if this involve a breaking change 🛠️ Fixes #<issue_number_goes_here> Co-authored-by: Averi Kitsch <akitsch@google.com>
Description
BigQuery Conversational Analytics tests have been failing, and it appears the cause is a recent change in the API's response format and streaming behavior. This PR refactors the handlers to aggregate response fields correctly.
PR Checklist
CONTRIBUTING.md
bug/issue
before writing your code! That way we can discuss the change, evaluate
designs, and agree on the general idea
!if this involve a breaking change🛠️ Fixes #<issue_number_goes_here>