Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions google/genai/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6473,7 +6473,7 @@ class GenerateContentConfig(_common.BaseModel):
""",
)
top_p: Optional[float] = Field(
default=None,
default=0.95,
description="""Tokens are selected from the most to least probable until the sum
of their probabilities equals this value. Use a lower value for less
random responses and a higher value for more random responses.
Expand Down Expand Up @@ -10914,7 +10914,7 @@ class Model(_common.BaseModel):
dataset was saved. This value is used to tune the degree of randomness.""",
)
top_p: Optional[float] = Field(
default=None,
default=0.95,
description="""Optional. Specifies the nucleus sampling threshold. The model
considers only the smallest set of tokens whose cumulative probability is
at least `top_p`. This helps generate more diverse and less repetitive
Expand Down Expand Up @@ -11504,7 +11504,7 @@ class GenerationConfig(_common.BaseModel):
description="""Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.""",
)
top_p: Optional[float] = Field(
default=None,
default=0.95,
description="""Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It's recommended to adjust either temperature or `top_p`, but not both.""",
)
enable_enhanced_civic_answers: Optional[bool] = Field(
Expand Down Expand Up @@ -21582,7 +21582,7 @@ class LiveConnectConfig(_common.BaseModel):
""",
)
top_p: Optional[float] = Field(
default=None,
default=0.95,
description="""Tokens are selected from the most to least probable until the sum
of their probabilities equals this value. Use a lower value for less
random responses and a higher value for more random responses.
Expand Down