googleapis / googleapis/python-genai

Unify the BaseModel classes

Aperta
#2,465 2 commenti 0 reazioni 1 assegnatario Assegnata a @MarkDaoust Vedi su GitHub
priority: p3 type: feature request
Lingua principale
Python
Stelle
4k
Fork
1k
Merge medio
2g 12h
PR unite (30g)
41

Descrizione

**Is your feature request related to a problem? Please describe.**
Compare the two base models:

* https://github.com/googleapis/python-genai/blob/610059bf6a425ef95f280f60c7803230a7ce7980/google/genai/_common.py#L549
* https://github.com/googleapis/python-genai/blob/610059bf6a425ef95f280f60c7803230a7ce7980/google/genai/_interactions/_models.py#L113

and those couldn't be any more different.

As a start, the former has `model_config` that sets reasonable defaults, like alias generation, serialization etc; however the latter does not, which makes it that much harder to use.

**Describe the solution you'd like**
Have either a single BaseModel, or multiple, but with the reasonable defaults (alias generation, serialization etc).

**Describe alternatives you've considered**
The only alternative is to sub the hell out of everything and add a model config for each class, which is hardly the best solution.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.