Open LaDoger opened 10 months ago
I'd like to add streaming (a.k.a. typing animation) to Telegram Bots as well.
So I've reviewed the code. Looks like we'll have to:
app/client/platforms/telegram.ts
TelegramAPI
sendMessage()
editMessage()
app/store/session.ts
callSession()
stream: true
app/workers/telegram.ts
handleAI()
handleUpdate()
if (aiMessage)
@LaDoger looks like a proper analysis. Should be done after https://github.com/marcusschiesser/unc/issues/14 due to it's dependency with session.ts
session.ts
I'd like to add streaming (a.k.a. typing animation) to Telegram Bots as well.
So I've reviewed the code. Looks like we'll have to:
app/client/platforms/telegram.ts
TelegramAPI
, apart from thesendMessage()
function, we should add aneditMessage()
function.sendMessage()
function to (at least) return the message id.app/store/session.ts
callSession()
, we might have to add something likestream: true
to enable streaming chunks. See this.app/workers/telegram.ts
handleAI()
stream: true
somewhere as well.handleUpdate()
, inif (aiMessage)