Make client reply with html formatted text
This commit is contained in:
parent
e8c096108b
commit
ea43984ec6
|
@ -7,6 +7,7 @@ import {
|
|||
|
||||
import { config } from "../config.ts";
|
||||
import { callOpenAiAPI } from "./openai.js";
|
||||
import { convertMarkdownToHtml } from "./markdownToHtmlHelper.ts";
|
||||
|
||||
const {
|
||||
homeserverUrl,
|
||||
|
@ -51,6 +52,8 @@ async function handleCommand(roomId: string, event: Event) {
|
|||
bearer: openaiApiKey,
|
||||
});
|
||||
|
||||
const htmlResponse = convertMarkdownToHtml(responseFromAi);
|
||||
|
||||
await client.setTyping(roomId, false);
|
||||
await client.replyNotice(roomId, event, responseFromAi);
|
||||
await client.sendHtmlText(roomId, htmlResponse);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue