[KongchangAI]
Productgoogle-generativeai SDK / 旧版 Gemini SDK

google-generativeai

An earlier Python SDK released by Google for calling the Gemini API, using the GenModel construction style. It has been superseded by google-genai.

Timeline (last 90 days)

Oct 18

The Google Gemini SDK (such as google-generativeai) raises ResourceExhausted (corresponding to 429) and ServiceUnavailable (corresponding to 503).

Unverified50%
Oct 14

The official Python package for the Gemini API can be installed via `pip install google-generativeai`.

Unverified50%
Oct 14

In the old `google-generativeai` SDK, initialize the model with `genai.GenModel("gemini-1.5-pro")`, then call `model.generate(prompt)` to generate content.

Unverified50%
Oct 14

The two SDKs (`google-generativeai` and `google-genai`) differ in method naming, response fields, and exception types, so mixing example code from them easily leads to pitfalls.

Unverified50%

All Facts (4)

Source Articles