You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Improve key naming clarity and consistency across REST requests #683
It is not immediately obvious that both camel casing and underscore pythonic style casing are interchangeable for the input data keys to Gemini. It would be helpful to note this somewhere as there are several examples where both styles are used in a confusing fashion often time in the same input json:
The 'generationConfig' dictionary, in the input json to the /generateContent endpoint, contains several keys in the camel case notation and several in the underscore pythonic notation which is confusing and messy:
It also doesn't help that the general version of the API reference denotes everything in camel case so if a developer is only referring to that it would create a confusing situation: https://ai.google.dev/api/generate-content#generationconfig
What problem are you trying to solve with this feature?
Improved clarity and consistency in Gemini API documentation, reduces potential for errors imo.
1)- Updating all shell scripts in the samples/rest directory to use consistent naming
2)- Documenting the flexibility- by adding a note in the REST API documentation which explains both naming conventions that are supported and including this information in the README.md or in comments at the top of the REST example files.
3)- Developing a Style guide to demonstrate internal guidelines for contributors.
Activity
MarkDaoust commentedon Feb 18, 2025
@Giom-V - you were looking at rest samples, maybe look into enforcing this at the same time?
ossa-ma commentedon Feb 18, 2025
I think it would also be useful to add a script example for generating content with pdfs as inline data (not file data).
I have included an example below:
demoncoder-crypto commentedon Mar 10, 2025
Hey, I would love to work on this issue.
Giom-V commentedon Mar 10, 2025
@demoncoder-crypto Feel free to send a PR, I'll review it.
Improve key naming clarity and consistency across REST API examples -…
demoncoder-crypto commentedon Mar 11, 2025
To resolve this issue, I recommend
1)- Updating all shell scripts in the samples/rest directory to use consistent naming
2)- Documenting the flexibility- by adding a note in the REST API documentation which explains both naming conventions that are supported and including this information in the README.md or in comments at the top of the REST example files.
3)- Developing a Style guide to demonstrate internal guidelines for contributors.
ossa-ma commentedon Mar 11, 2025
@demoncoder-crypto I've left comments on the pull request regarding some changes that you missed.