Skip to content

Commit 770d472

Browse files
committed
Add rev14 parameters
Change-Id: I16f2b1f5820a6cf867b9abb04ffd5c6e6d2d947b
1 parent 4f42118 commit 770d472

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

google/generativeai/types/generation_types.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,27 +144,41 @@ class GenerationConfig:
144144
Note: The default value varies by model, see the
145145
`Model.top_k` attribute of the `Model` returned the
146146
`genai.get_model` function.
147-
147+
seed:
148+
Optional. Seed used in decoding. If not set, the request uses a randomly generated seed.
148149
response_mime_type:
149150
Optional. Output response mimetype of the generated candidate text.
150151
151152
Supported mimetype:
152153
`text/plain`: (default) Text output.
154+
`text/x-enum`: for use with a string-enum in `response_schema`
153155
`application/json`: JSON response in the candidates.
154156
155157
response_schema:
156158
Optional. Specifies the format of the JSON requested if response_mime_type is
157159
`application/json`.
160+
presence_penalty:
161+
Optional.
162+
frequency_penalty:
163+
Optional.
164+
response_logprobs:
165+
Optional. If true, export the `logprobs` results in response.
166+
logprobs:
167+
Optional. Number of candidates of log probabilities to return at each step of decoding.
158168
"""
159-
160169
candidate_count: int | None = None
161170
stop_sequences: Iterable[str] | None = None
162171
max_output_tokens: int | None = None
163172
temperature: float | None = None
164173
top_p: float | None = None
165174
top_k: int | None = None
175+
seed: int | None = None
166176
response_mime_type: str | None = None
167177
response_schema: protos.Schema | Mapping[str, Any] | type | None = None
178+
presence_penalty:float | None = None
179+
frequency_penalty: float | None = None
180+
response_logprobs: bool|None = None
181+
logprobs: int| None = None
168182

169183

170184
GenerationConfigType = Union[protos.GenerationConfig, GenerationConfigDict, GenerationConfig]

0 commit comments

Comments
 (0)