mirror of
https://github.com/uditkarode/bing-chat-telegram.git
synced 2025-02-22 17:22:13 +00:00
fix: use string instead of FmtString
This commit is contained in:
parent
23e78dbb81
commit
7bd82c943c
@ -37,11 +37,12 @@ export async function ai(ctx: Context<Update>, prompt: string) {
|
|||||||
);
|
);
|
||||||
chats[chatId].res = bingRes;
|
chats[chatId].res = bingRes;
|
||||||
|
|
||||||
let tgRes: FmtString;
|
let tgRes: FmtString | string;
|
||||||
if (bingRes.text === prompt) {
|
if (bingRes.text === prompt) {
|
||||||
// Bing Chat often replies with the exact prompt
|
// Bing Chat often replies with the exact prompt
|
||||||
// in case it's unable to continue the conversation.
|
// in case it's unable to continue the conversation.
|
||||||
tgRes = fmt`Something went wrong. Starting a new chat with /newchat is recommended.`;
|
tgRes =
|
||||||
|
"Something went wrong. Starting a new chat with /newchat is recommended.";
|
||||||
} else {
|
} else {
|
||||||
tgRes = transformBingResponse(bingRes);
|
tgRes = transformBingResponse(bingRes);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user