google-gemini / cookbook

Examples and guides for using the Gemini API
https://ai.google.dev/gemini-api/docs
Apache License 2.0
5.48k stars 845 forks source link

Missing OpenAPI spec #261

Closed KotlinFactory closed 2 months ago

KotlinFactory commented 3 months ago

Description of the feature request:

We need an OpenAPI spec for the gemini API. The SpringAI team or some contributors would use this to implement Google Gemini directly into SpringAI. However this is not possible without reverse engineering code of existing clients like the python clients. (Which I would love not having to do)

See: https://github.com/spring-projects/spring-ai/issues/1252

What problem are you trying to solve with this feature?

Google Gemini should be available for the server side Java/JVM world.

Any other information you'd like to share?

No response

markmcd commented 3 months ago

We don't use OpenAPI specs for our APIs, we use protocol buffer specs that are converted to discovery documents for, e.g. auto-generated client libraries.

Here's the service definition in proto format, and here's the discovery URL (make sure you substitute your API key)

I believe we can turn OpenAPI output on but I'd need to look into what trade-offs/compatibility issues there are, if any.

Have you tried using a converter? e.g. gnostic will generate openapi from the proto def, and there are other tools that do discovery -> openapi, as well as catalogues of converted API specs.

github-actions[bot] commented 2 months ago

Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.

github-actions[bot] commented 2 months ago

This issue was closed because it has been inactive for 27 days. Please post a new issue if you need further assistance. Thanks!