| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Sorry, something went wrong.
The `create()` docstring documents a config field and a type that do not
exist, so all four of its usage examples raise AttributeError if copied:
live_constrained_parameters=types.LiveEphemeralParameters(...)
AttributeError: module 'google.genai.types' has no attribute
'LiveEphemeralParameters'
The field on CreateAuthTokenConfig is `live_connect_constraints` and the
type is `LiveConnectConstraints`, which has the same (model, config)
shape the examples already use - so this is a rename, not a behaviour
change. `LiveEphemeralParameters` appears zero times in types.py.
Also fixes the adjacent typo 'attrubite' -> 'attribute' and lowercases
the sentence continuation, and updates the prose comments that referred
to the old type name and to lockAdditionalFields (the Python field is
`lock_additional_fields`).
Docstring only - no functional change. Verified all four corrected
examples construct against google-genai 2.16.0.
|
Two notes from double-checking this before review: 1. The rename is already recorded in this repo. CHANGELOG.md:1447:
So the docstring is stale text left behind by a deliberate rename, not a forward reference. LiveEphemeralParameters and live_constrained_parameters now appear only in this docstring and in generated docs — nowhere in the package source. 2. docs/genai.html carries the same stale examples (lines ~3710, 3742–3750, 3772, 3789, 3806). I have deliberately not touched it, since it is Sphinx build output rather than a source file — but it will need regenerating for the published docs to pick this up. Safety of the change: the patch is docstring-only. Parsing both revisions and comparing the ASTs with docstrings stripped gives an identical tree, so there is no functional delta. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The auth_tokens.create() docstring documents a config field and a type that do not exist. All four of its usage examples raise AttributeError if copied verbatim.
Reproduction
Cause
The field on CreateAuthTokenConfig is live_connect_constraints, and the type is LiveConnectConstraints:
LiveEphemeralParameters appears zero times in types.py. LiveConnectConstraints has the same (model, config) shape the examples already use, so this is a rename in the docs rather than a behaviour change.
What this PR changes
Docstring only, no functional change:
Verification
All four corrected examples construct against google-genai 2.16.0:
Found while building a Vertex-based teaching repo — the examples were the first thing I reached for when wiring ephemeral tokens for a browser Live client.