Skip to content

Update README.md for improved structure and clarity#97

Open
wenakanew wants to merge 2 commits intogoogle-gemini:mainfrom
wenakanew:readme-update
Open

Update README.md for improved structure and clarity#97
wenakanew wants to merge 2 commits intogoogle-gemini:mainfrom
wenakanew:readme-update

Conversation

@wenakanew
Copy link

This pull request significantly expands and improves the README.md to provide a much more comprehensive, beginner-friendly, and structured guide to the Gemini API examples repository. The new README clarifies the repository's purpose, details its structure, explains the scope of included examples, and adds clear quickstart and contribution instructions for each supported language.

Repository documentation improvements:

  • Rewrites and expands the introduction to clarify the repository's goals, supported languages, and the pedagogical approach of the examples.
  • Adds a detailed repository structure section, including a directory tree and explanations of the contents of each folder.
  • Provides language-specific quickstart guides (Go, Java, JavaScript/TypeScript, Python, REST), with step-by-step setup and run instructions for each.
  • Lists and describes the full range of Gemini API features covered by the examples, grouped by theme (e.g., Core Text & Chat, Structured Generation, Multimodal, etc.).

Best practices and contribution guidance:

  • Adds a section on the use of region tags for documentation extraction, including rules for their usage and examples.
  • Introduces a detailed contributing section, including a PR checklist and guidelines for writing clear, concise, and complete example code.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @wenakanew, 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 significantly overhauls the README.md file to provide a much more comprehensive and user-friendly guide for the Gemini API examples repository. The update aims to improve clarity, structure, and accessibility for new users and contributors by detailing the repository's purpose, organization, and the scope of its examples, alongside clear instructions for setup, execution, and contribution.

Highlights

  • Enhanced Introduction: The introduction to the repository has been rewritten and expanded to clarify its goals, supported languages, and the pedagogical approach of the examples, emphasizing their runnable, minimal, multi-language, and documentation-aware nature.
  • Detailed Repository Structure: A new section detailing the repository's structure has been added, including a directory tree and explanations of the contents of each folder, providing a clear overview of the project layout.
  • Language-Specific Quickstart Guides: Comprehensive quickstart guides have been introduced for Go, Java, JavaScript/TypeScript, Python, and REST, offering step-by-step setup and run instructions for each language.
  • Comprehensive Feature Coverage: The README now lists and describes the full range of Gemini API features covered by the examples, grouped by themes such as Core Text & Chat, Structured & Programmatic Generation, Data & Tokens, Advanced Features, and Multimodal capabilities.
  • Region Tag Guidance: A dedicated section on region tags has been added, explaining their purpose for automated documentation extraction and providing clear rules and best practices for their usage when contributing examples.
  • Detailed Contribution Guidelines: An expanded contributing section has been included, featuring a PR checklist and guidelines for writing clear, concise, and complete example code, along with a 'Testing Philosophy' section explaining how examples are automatically verified.
Changelog
  • README.md
    • Updated the main title and introduction to be more descriptive and highlight key characteristics of the examples.
    • Added a detailed 'Repository Structure' section with a directory tree and explanations.
    • Introduced a 'What’s Included' section, categorizing and listing Gemini API features covered by examples.
    • Created 'Quickstart by Language' sections with installation and run instructions for Go, Java, JavaScript/TypeScript, Python, and REST.
    • Added a dedicated 'Region Tags' section explaining their use and best practices.
    • Included a 'Testing Philosophy' section detailing how examples are automatically verified.
    • Expanded the 'Contributing' section with best practices for code within region tags, types of contributions, and a PR checklist.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 provides a significant and valuable overhaul of the README.md file, making it much more structured, comprehensive, and user-friendly. The new sections on repository structure, included features, and language-specific quickstarts are excellent additions. I've provided a few suggestions to further improve clarity and consistency in the quickstart instructions and to align with standard practices for some of the languages.

README.md Outdated
@@ -1,31 +1,249 @@
# Gemini API examples
# **Gemini API Examples**
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The use of bold markdown (**) inside a level-1 heading is redundant and non-standard. The # character already creates a top-level heading, which browsers and markdown renderers typically display as large and bold. For cleaner and more standard markdown, the asterisks should be removed.

Suggested change
# **Gemini API Examples**
# Gemini API Examples

README.md Outdated
Comment on lines +95 to +103
### Set Up

1. Open the folder in IntelliJ IDEA
2. Load Maven when prompted (`pom.xml`)
3. Wait for dependencies to download

### Set API Key

Set `GOOGLE_API_KEY` in your Run/Debug environment variables.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The setup and API key instructions for Java are quite specific to IntelliJ IDEA. To make them more broadly applicable to users of other IDEs or the command line, consider:

  1. Generalizing the setup steps for any Maven project.
  2. Providing the export GOOGLE_API_KEY=... command for setting the API key, for consistency with the other language sections.

For example, you could rephrase the setup to be about opening a Maven project in a 'preferred IDE', and add the export command to the API key section.

Comment on lines +130 to 132
```bash
node <feature>.test.js
```
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Running tests by directly invoking the test file with node is unconventional for a JavaScript project. Typically, a test runner like Jest, Mocha, or the built-in Node.js test runner is used, invoked via a script in package.json (e.g., npm test). This provides better test reporting and aligns with standard JS development practices. Consider updating the project to use a standard test runner and changing this instruction to npm test.

@wenakanew
Copy link
Author

All Reviewer Feedback Addressed — README Updated

I've addressed all the feedback points:

1. Removed bold formatting from the top-level header

Replaced the non-standard:

# **Gemini API Examples**

with the cleaner and conventional:

# Gemini API Examples

2. Generalized and improved Java setup instructions

Updated the Java section to be IDE-agnostic and more consistent with other languages:

  • Replaced IntelliJ-specific steps with general Maven project setup
  • Added a reminder about installing JDK 11+ and Maven
  • Added mvn clean install for dependency resolution
  • Added explicit export GOOGLE_API_KEY="YOUR_KEY" to match other quickstarts

This makes the instructions more portable across IDEs and command-line workflows.

✔️ 3. Updated JavaScript test instructions to recommended practices

The project now uses npm test as the primary method for running tests.

  • Added a "test" script to package.json
  • Updated README to recommend:
npm test
  • Kept node <file>.test.js as an optional way to run individual tests

This aligns with standard JavaScript conventions and improves the contributor experience.

4. Cleaned up Python installation instructions

Removed pyink from the required installation command (it belongs in the formatting section, not runtime).

Updated installation:

pip install absl-py google-genai Pillow

Formatting instructions remain in their proper section.

5. Additional README improvements

While implementing the requested changes, I also:

  • Improved Markdown consistency across all language quickstarts
  • Unified environment variable instructions
  • Ensured consistent section hierarchy and spacing

The README is now more structured, clearer for beginners, and aligned with common development practices.

@wenakanew
Copy link
Author

All Reviewer Feedback Addressed — README Updated

I've addressed all the feedback points:

1. Removed bold formatting from the top-level header

Replaced the non-standard:

# **Gemini API Examples**

with the cleaner and conventional:

# Gemini API Examples

2. Generalized and improved Java setup instructions

Updated the Java section to be IDE-agnostic and more consistent with other languages:

  • Replaced IntelliJ-specific steps with general Maven project setup
  • Added a reminder about installing JDK 11+ and Maven
  • Added mvn clean install for dependency resolution
  • Added explicit export GOOGLE_API_KEY="YOUR_KEY" to match other quickstarts

This makes the instructions more portable across IDEs and command-line workflows.

3. Updated JavaScript test instructions to recommended practices

The project now uses npm test as the primary method for running tests.

  • Added a "test" script to package.json
  • Updated README to recommend:
npm test
  • Kept node <file>.test.js as an optional way to run individual tests

This aligns with standard JavaScript conventions and improves the contributor experience.

4. Cleaned up Python installation instructions

Removed pyink from the required installation command (it belongs in the formatting section, not runtime).

Updated installation:

pip install absl-py google-genai Pillow

Formatting instructions remain in their proper section.

5. Additional README improvements

While implementing the requested changes, I also:

  • Improved Markdown consistency across all language quickstarts
  • Unified environment variable instructions
  • Ensured consistent section hierarchy and spacing

The README is now more structured, clearer for beginners, and aligned with common development practices.

@wenakanew wenakanew closed this Feb 26, 2026
@wenakanew wenakanew reopened this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant