Skip to content

Conversation

@Shi-pra-19
Copy link
Contributor

Updated module google-generativeai to use google-genai
Refactored imports

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added status:awaiting review PR awaiting review from a maintainer component:examples Issues/PR referencing examples folder labels Apr 3, 2025
@Giom-V Giom-V self-assigned this Apr 3, 2025
{
"cell_type": "markdown",
"metadata": {
"id": "gy3KpnNx_Jl4"
Copy link
Collaborator

@Giom-V Giom-V Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #2.    You are an assistant that helps tourists around the world to plan their vacation. Your responsibilities are:

Can you add some indentation to improve readability? Like

instructions = """
     You are an assistant that helps tourists around the world to plan their vacation. Your responsibilities are:
     1. Helping book the hotel.
     2. Recommending restaurants.
     3. Warning about potential dangers.

     If other request is asked return "I cannot help with this request."
"""

Reply via ReviewNB

{
"cell_type": "markdown",
"metadata": {
"id": "gy3KpnNx_Jl4"
Copy link
Collaborator

@Giom-V Giom-V Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #1.    MODEL_ID="gemini-2.0-flash" # @param ["gemini-2.0-flash-lite","gemini-2.0-flash","gemini-2.5-pro-exp-03-25"] {"allow-input":true, isTemplate: true}

We don't need to define the model all the time. I think once at the beginning of the notebook is enough.


Reply via ReviewNB

{
"cell_type": "markdown",
"metadata": {
"id": "gy3KpnNx_Jl4"
Copy link
Collaborator

@Giom-V Giom-V Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #1.    print("ON TOPIC:", on_topic_response.text)

Can you use display(Markdown()) to improve the rendering of the markdown?


Reply via ReviewNB

{
"cell_type": "markdown",
"metadata": {
"id": "gy3KpnNx_Jl4"
Copy link
Collaborator

@Giom-V Giom-V Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add indentation here as well?


Reply via ReviewNB

{
"cell_type": "markdown",
"metadata": {
"id": "gy3KpnNx_Jl4"
Copy link
Collaborator

@Giom-V Giom-V Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #1.    print('''## Specified genre:

Can you use display(Markdown()) to improve the rendering of the markdown? I also don't think the line breaks are needed.


Reply via ReviewNB

@Giom-V
Copy link
Collaborator

Giom-V commented Apr 3, 2025

Thanks for the submission @Shi-pra-19! It's the first one if I'm not mistaken 🥳

I just added a couple of minor comments to make the notebook easier to understand.

Can you also check the format failures. It is likely because you haven't run the formatting script.

Thanks again!

@Shi-pra-19
Copy link
Contributor Author

@Giom-V Thank you for the review! This one is my second submission—my first one was #642. 🥳

I’ve added indentation and run the formatting script. Let me know if there are any more improvements needed.

Also, please take a look at #642 as well—I fixed the indentation there too.

"source": [
"##### Copyright 2025 Google LLC."
]
},
Copy link
Collaborator

@andycandy andycandy Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the model list so we can get this merged quickly?

MODEL_ID="gemini-2.5-flash-preview-05-20" # @param ["gemini-2.5-flash-preview-05-20", "gemini-2.5-pro-preview-05-06"] {"allow-input":true, isTemplate: true}

Reply via ReviewNB

"source": [
"##### Copyright 2025 Google LLC."
]
},
Copy link
Collaborator

@andycandy andycandy Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you wrap this line up so its easier to read?


Reply via ReviewNB

@Shi-pra-19
Copy link
Contributor Author

Fixed it. Let me know if I missed anything.

@andycandy
Copy link
Collaborator

Fixed it. Let me know if I missed anything.

Looks great overall! Just one small thing, could you avoid bumping the @google/genai package to 1.7.0? Since the current code works with versions as low as 1.0.0, keeping it more broadly compatible would be ideal. Once that's updated, we can get this merged right away :)

@Shi-pra-19 Shi-pra-19 requested a review from andycandy June 13, 2025 00:12
@andycandy
Copy link
Collaborator

Looks good to me. @Giom-V

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:examples Issues/PR referencing examples folder status:awaiting review PR awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants