Skip to content

Added new notebook Basic_Code_Review to examples #689

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Shi-pra-19
Copy link

@Shi-pra-19 Shi-pra-19 commented Apr 8, 2025

Integrated Gemini API to assist with code reviews and optimization.
Added Python SDK functionality for code quality feedback and suggesting improvements.
Example included demonstrating the use of the Gemini model to enhance code quality.

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 8, 2025
@Shi-pra-19 Shi-pra-19 changed the title Added new notebook Basic_Code_Review Added new notebook Basic_Code_Review to examples Apr 8, 2025
@@ -0,0 +1,268 @@
{
Copy link
Contributor

@andycandy andycandy Apr 14, 2025

Choose a reason for hiding this comment

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

It would be better to move the imports closer to where they are first used, ideally placing them in the same cell where they're invoked


Reply via ReviewNB

@@ -0,0 +1,268 @@
{
Copy link
Contributor

@andycandy andycandy Apr 14, 2025

Choose a reason for hiding this comment

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

Line #14.    programmer_response = client.models.generate_content(

The string formatting in this block could be improved for better readability. Here’s an example of a cleaner format that aligns with common conventions:

programmer_response = client.models.generate_content(
  	model=MODEL_ID,
  	contents= """
   		Write code to take a list of integers, remove any duplicates,
   		filter out all numbers less than 30,
   		and return the remaining numbers sorted in descending order.
	""",
  	config=types.GenerateContentConfig(
    system_instruction=buggy_code_prompt
  ),
)

Reply via ReviewNB

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.

2 participants