Skip to content

Commit

Permalink
mod: update default parse mode for telegram client
Browse files Browse the repository at this point in the history
  • Loading branch information
Blair Lee committed Dec 27, 2024
1 parent b414590 commit f91b24e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
6 changes: 1 addition & 5 deletions docs/api/type-aliases/Character.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,13 +428,9 @@ Optional client-specific config

> `optional` **teamMemberInterestKeywords**: `string`[]
### clientConfig.telegram.disableParseMode?

> `optional` **disableParseMode**: `boolean`
### clientConfig.telegram.parseMode?

> `optional` **parseMode**: `"Markdown" | "MarkdownV2" | "HTML"`
> `optional` **parseMode**: `"Markdown" | "MarkdownV2" | "HTML" | null`
### clientConfig.slack?

Expand Down
6 changes: 1 addition & 5 deletions packages/client-telegram/src/messageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,7 @@ export class MessageManager {
i === 0 && replyToMessageId
? { message_id: replyToMessageId }
: undefined,
parse_mode: this.runtime.character.clientConfig.telegram
.disableParseMode
? undefined
: this.runtime.character.clientConfig.telegram
.parseMode || "Markdown",
parse_mode: this.runtime.character.clientConfig.telegram.parseMode || undefined,
}
)) as Message.TextMessage;

Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,7 @@ export type Character = {
teamAgentIds?: string[];
teamLeaderId?: string;
teamMemberInterestKeywords?: string[];
disableParseMode?: boolean;
parseMode?: "Markdown" | "MarkdownV2" | "HTML";
parseMode?: "Markdown" | "MarkdownV2" | "HTML" | null;
};
slack?: {
shouldIgnoreBotMessages?: boolean;
Expand Down

0 comments on commit f91b24e

Please sign in to comment.