Skip to content
Merged
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

Stream long text messages to Telegram.
Make LLM output appear as animated message drafts before sending the message.
Automatically split long text across several messages.

## Quickstart

Expand Down Expand Up @@ -57,6 +56,8 @@ bot.command("credits", async (ctx) => {
});

// Automatically stream response with grammY:
await ctx.replyWithStream(textStream);
await ctx.replyWithMarkdownStream(textStream);
});
```

Consider including information about Telegram's [rich message formatting options](https://core.telegram.org/bots/api#rich-message-formatting-options) in your prompt if your LLM requires some guidance on this.
1 change: 1 addition & 0 deletions src/deps.deno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export {
} from "https://lib.deno.dev/x/grammy@v1/mod.ts";
export type {
ApiMethods,
InputRichMessage,
Message,
MessageEntity,
} from "https://lib.deno.dev/x/grammy@v1/types.ts";
7 changes: 6 additions & 1 deletion src/deps.node.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
export { type Context, type MiddlewareFn, type RawApi } from "grammy";
export type { ApiMethods, Message, MessageEntity } from "grammy/types";
export type {
ApiMethods,
InputRichMessage,
Message,
MessageEntity,
} from "grammy/types";
Loading
Loading