Get generation configuration
(self)
| 1415 | await db.commit() |
| 1416 | |
| 1417 | async def get_generation_config(self) -> Optional[GenerationConfig]: |
| 1418 | """Get generation configuration""" |
| 1419 | async with self._connect() as db: |
| 1420 | db.row_factory = aiosqlite.Row |
| 1421 | cursor = await db.execute("SELECT * FROM generation_config WHERE id = 1") |
| 1422 | row = await cursor.fetchone() |
| 1423 | if row: |
| 1424 | return GenerationConfig(**dict(row)) |
| 1425 | return None |
| 1426 | |
| 1427 | async def update_generation_config( |
| 1428 | self, |