feat(telegram): stop generation from the client, questions survive a restart, images reach the model inline, albums become one turn
This commit is contained in:
@@ -53,6 +53,10 @@ class Draft:
|
||||
self._task: asyncio.Task[None] | None = None
|
||||
self._inflight: asyncio.Future[None] | None = None
|
||||
|
||||
@property
|
||||
def draft_id(self) -> int:
|
||||
return self._draft_id
|
||||
|
||||
def start(self) -> None:
|
||||
if self._task is None:
|
||||
self._task = asyncio.create_task(self._run())
|
||||
@@ -126,6 +130,7 @@ class Draft:
|
||||
message_thread_id=self._thread_id,
|
||||
text=text,
|
||||
parse_mode=parse_mode,
|
||||
can_stop=True,
|
||||
)
|
||||
|
||||
def _render(self) -> tuple[str, str]:
|
||||
|
||||
Reference in New Issue
Block a user