voicemate.hots.intents

Spoken draft commands: rules that turn an utterance into advice, without the LLM.

Intents recognizes a small English command language (“what’s good against Zul’jin”, “enemy has Tychus and Muradin”, “we’re on Cursed Hollow”, “what should I ban”), keeps the draft in a Draft and answers with one short templated sentence per command. An utterance it does not recognize, or one that names nothing it knows, returns None so the chat model handles it as usual.

Attributes

Classes

Intents

Recognizes draft commands and answers them.

Functions

clean(text) → str

text as the rules see it: lower case, plain letters, no filler like "Ava, please".

Module Contents

voicemate.hots.intents.ANSWER_HEROES: int = 3
voicemate.hots.intents.clean(text: str) → str[source]

text as the rules see it: lower case, plain letters, no filler like “Ava, please”.

class voicemate.hots.intents.Intents(advisor: voicemate.hots.advisor.Advisor, draft: voicemate.hots.draft.Draft | None = None, aliases: voicemate.hots.aliases.AliasStore | None = None)[source]

Recognizes draft commands and answers them.

Parameters:
  • advisor – Ranks counters, picks and bans.

  • draft – The session’s draft (a new one when omitted).

  • aliases – Where spellings settled by a question are remembered.

advisor
draft
aliases = None
terse = False
last: list[voicemate.hots.advisor.Suggestion] = []
handle(text: str) → str | None[source]

Answer text when it is a draft command, otherwise return None.

name(slug: str) → str[source]

The display name of a hero.