feat(telegram,core,backends,storage): telegram frontend with inbox, outbox, drafts and question buttons

This commit is contained in:
hh
2026-08-28 17:57:09 +02:00
parent 5fc58e3bc7
commit 5177392f46
15 changed files with 2244 additions and 4 deletions
+9 -1
View File
@@ -26,7 +26,7 @@ import functools
import logging
import signal
from contextlib import AsyncExitStack
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Any
import uvicorn
import uvloop
@@ -294,6 +294,13 @@ class _LateConversations:
return None
return build_tool_server(self.conversations, conversation_key=key, names=names)
async def ask(self, key: str, payload: dict[str, Any]) -> str:
if self.conversations is None:
msg = "conversations service is not up yet"
raise RuntimeError(msg)
answer = await self.conversations.ask(key, payload)
return self.conversations.answer_text(answer)
async def _build_backends(
*,
@@ -368,6 +375,7 @@ async def _build_backends(
usage_sink=record_usage,
pool=pool,
tool_server=functools.partial(late.server, names=a.gateway_tools),
asker=late.ask,
)
await stack.enter_async_context(adapter)
backends[a.name] = adapter