danneu / telegram-chatgpt-bot

a Telegram ChatGPT bot that supports text prompts and two-way voice memos
33 stars 8 forks source link

Turn off parse_mode=HTML #16

Open danneu opened 1 year ago

danneu commented 1 year ago

If the bot responds with invalid html, telegram API errors:

editMessageText https://api.telegram.org/botXXX/editMessageText {"chat_id":XXX,"message_id":XXX,"parse_mode":"HTML","text":"<b>
   GPT-4:</b> The blurriness of <img> elements on your MacBook M1 (Retina display) is likely due to images having a low resolution that doesn't match the high pixel density of the Retina display. To fix this issue, use higher resolution images (2x the regular size) and compress them to ensure faster loading times. In your code, implement responsive images using the \"srcset\" attribute to serve the appropriate image resolution based on the user's device. This will improve image sharpness and overall visual quality on Retina displays."} -- status: 400 Bad Request, body: {
  "ok": false,
  "error_code": 400,
  "description": "Bad Request: can't parse entities: Unsupported start tag \"img\" at byte offset 37"
}

I should turn off parse_mode=HTML. Don't have time to look into it atm.