You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9622700
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: google/genai/types.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6522,7 +6522,7 @@ class GenerateContentConfig(_common.BaseModel):
6522
6522
""",
6523
6523
)
6524
6524
top_p: Optional[float] = Field(
6525
-
default=None,
6525
+
default=0.95,
6526
6526
description="""Tokens are selected from the most to least probable until the sum
6527
6527
of their probabilities equals this value. Use a lower value for less
6528
6528
random responses and a higher value for more random responses.
@@ -10987,7 +10987,7 @@ class Model(_common.BaseModel):
10987
10987
dataset was saved. This value is used to tune the degree of randomness.""",
10988
10988
)
10989
10989
top_p: Optional[float] = Field(
10990
-
default=None,
10990
+
default=0.95,
10991
10991
description="""Optional. Specifies the nucleus sampling threshold. The model
10992
10992
considers only the smallest set of tokens whose cumulative probability is
10993
10993
at least `top_p`. This helps generate more diverse and less repetitive
@@ -11584,7 +11584,7 @@ class GenerationConfig(_common.BaseModel):
11584
11584
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.""",
11585
11585
)
11586
11586
top_p: Optional[float] = Field(
11587
-
default=None,
11587
+
default=0.95,
11588
11588
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.""",
0 commit comments