googleapis / googleapis/python-genai
Unrelated error shown when trying to use a reversed content list
- Lingua principale
- Python
- Stelle
- 4k
- Fork
- 1k
- Merge medio
- 2g 12h
- PR unite (30g)
- 41
Descrizione
#### Environment details
- Programming language: Python
- OS: Linux
- Language runtime version: 3.12.3
- Package version: google-genai[aiohttp] 1.30.0
#### Steps to reproduce
1. Create a list of `Content`.
2. Reverse the list with `contents = reversed(contents)`.
3. Pass the reversed contents to `models.generate_content(...)`.
I've gotten the errors `ValueError: file uri and mime_type are required.` and `ValueError: contents are required.` when doing this, when the actual error is that `models.generate_content(...)` apparently doesn't support a `list_reverseiterator` object. Using `contents = list(reversed(contents))` fixed the issue.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.