Simplified database layer and consolidated Markov writes into a single transaction.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 5s
CI / Tests (push) Successful in 16s
CI / Type Checking (push) Successful in 10s
CI / Spelling (push) Successful in 5s

This commit is contained in:
2026-03-17 17:07:28 -04:00
parent 56d3c36c7d
commit 6aa8527adc
5 changed files with 109 additions and 219 deletions
+1 -4
View File
@@ -92,10 +92,7 @@ async def _ingest_sentence(
start_words.append((channel_id, user_id, words[i]))
transitions.append((channel_id, user_id, words[i], words[i + 1]))
if start_words:
await db.add_start_words_batch(start_words)
if transitions:
await db.add_transitions_batch(transitions)
await db.add_markov_data(start_words, transitions)
async def generate(