Replaced redundant database query with known fallback start word to fix mypy type narrowing.
This commit is contained in:
+1
-1
@@ -114,7 +114,7 @@ async def generate(
|
|||||||
# Seed the chain with a fallback sentence if the channel has no data yet.
|
# Seed the chain with a fallback sentence if the channel has no data yet.
|
||||||
if word is None:
|
if word is None:
|
||||||
await _ingest_sentence(db, channel_id, 0, "Hello world!")
|
await _ingest_sentence(db, channel_id, 0, "Hello world!")
|
||||||
word = await db.get_random_start_word(channel_id)
|
word = "Hello" # Known start word from the fallback sentence above.
|
||||||
|
|
||||||
parts: list[str] = []
|
parts: list[str] = []
|
||||||
parts.append(word)
|
parts.append(word)
|
||||||
|
|||||||
Reference in New Issue
Block a user