google-gemini / generative-ai-python

The official Python library for the Google Gemini API
https://pypi.org/project/google-generativeai/
Apache License 2.0
1.62k stars 322 forks source link

Fix arg length error, add multimodal examples, update video prompt #634

Closed vishal-dharm closed 5 days ago

vishal-dharm commented 6 days ago

Description of the change

This PR fixes the "argument list too long" error in the text_generation.sh file when using large base64 encoded images by using temporary files to store the encoded data and the JSON payload. This resolves issues encountered when running the text_gen_multimodal_one_image_prompt and text_gen_multimodal_one_image_prompt_streaming examples.

This PR also makes the following additions and updates:

Motivation

These examples are being added so they can be included in the revamped vision documentation.

Type of change

Feature request

Checklist

MarkDaoust commented 5 days ago

Thanks!