GeminiModelConfig
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| BaseModelConfig llmling_models_config.configs Base for model configurations. |
â‹” Inheritance diagram¶
graph TD
4186269012["configs.GeminiModelConfig"]
3497727833["configs.BaseModelConfig"]
330168112["schema.Schema"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
3497727833 --> 4186269012
330168112 --> 3497727833
3879467795 --> 330168112
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: BaseModelConfig
Configuration for Gemini models.
Source code in src/llmling_models_config/configs.py
1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 | |
extra_body
class-attribute
instance-attribute
¶
Extra body to send to the model.
extra_headers
class-attribute
instance-attribute
¶
extra_headers: dict[str, str] | None = Field(
default=None, examples=[{"Custom-Header": "value"}], title="Extra headers"
)
Extra headers to send to the model.
frequency_penalty
class-attribute
instance-attribute
¶
frequency_penalty: float | None = Field(
default=None, ge=-2.0, le=2.0, examples=[-1.0, 0.0, 0.5, 1.0], title="Frequency penalty"
)
Penalize new tokens based on their existing frequency in the text so far.
identifier
class-attribute
instance-attribute
¶
identifier: GeminiModelName | str = Field(
examples=["gemini-2.0-flash", "gemini-1.5-pro"], title="Model identifier"
)
String identifier for the model.
labels
class-attribute
instance-attribute
¶
User-defined metadata to break down billed charges.
logit_bias
class-attribute
instance-attribute
¶
logit_bias: dict[str, int] | None = Field(
default=None, title="Logit bias", examples=[{"5678": -100}, {"1234": 100}]
)
Modify the likelihood of specified tokens appearing in the completion.
max_tokens
class-attribute
instance-attribute
¶
max_tokens: int | None = Field(
default=None, ge=1, examples=[1024, 2048, 4096], title="Maximum tokens"
)
The maximum number of tokens to generate before stopping.
parallel_tool_calls
class-attribute
instance-attribute
¶
Whether to allow parallel tool calls.
presence_penalty
class-attribute
instance-attribute
¶
presence_penalty: float | None = Field(
default=None, ge=-2.0, le=2.0, examples=[-1.0, 0.0, 0.5, 1.0], title="Presence penalty"
)
Penalize new tokens based on whether they have appeared in the text so far.
safety_settings
class-attribute
instance-attribute
¶
Safety settings options for Gemini model request.
seed
class-attribute
instance-attribute
¶
The random seed to use for the model, theoretically allowing for deterministic results.
stop_sequences
class-attribute
instance-attribute
¶
stop_sequences: list[str] | None = Field(
default=None, examples=[["STOP", "END"], ["\n\n"]], title="Stop sequences"
)
Sequences that will cause the model to stop generating.
temperature
class-attribute
instance-attribute
¶
temperature: float | None = Field(
default=None, ge=0.0, examples=[0.0, 0.7, 1.0, 2.0], title="Temperature"
)
Amount of randomness injected into the response.
thinking_config
class-attribute
instance-attribute
¶
Thinking features configuration.
timeout
class-attribute
instance-attribute
¶
Override the client-level default timeout for a request, in seconds.
top_p
class-attribute
instance-attribute
¶
top_p: float | None = Field(
default=None, ge=0.0, le=1.0, examples=[0.1, 0.9, 1.0], title="Top-p (nucleus sampling)"
)
An alternative to sampling with temperature, called nucleus sampling.
type
class-attribute
instance-attribute
¶
Type identifier for Gemini model.
get_model_settings
¶
Get model settings in pydantic-ai format.