Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: tables returned from chatGPT are not support #56

Open
2 tasks done
yanCode opened this issue May 20, 2023 · 1 comment
Open
2 tasks done

[Bug]: tables returned from chatGPT are not support #56

yanCode opened this issue May 20, 2023 · 1 comment

Comments

@yanCode
Copy link

yanCode commented May 20, 2023

Not a duplicate issue

  • I have searched the existing issues and confirmed this issue is not a duplicate.

Verify ChatGPT service is operational

Bot version

2.5.0

API type

official

Environment details

Node.js v19.2.0 m1 mac osx , run in local env.

Describe the Bug

When i request a table in the question, like asking
show me a table of difference between shanghai and nanjing
or 用表格显示南京和上海的区别

when the response includes |, it prints the error:
5/20/2023, 3:38:41 PM ⛔️ Edit message error: ETELEGRAM: 400 Bad Request: can't parse entities: Character '|' is reserved and must be escaped with the preceding '\'

To Reproduce

ask any questions that can return a table, like
show me a table of difference between shanghai and nanjing
or 用表格显示南京和上海的区别

Logs

5/20/2023, 3:38:39 PM ⛔️ Edit message error: ETELEGRAM: 400 Bad Request: can't parse entities: Character '|' is reserved and must be escaped with the preceding ''
utils.js:885/20/2023, 3:38:39 PM ⛔️ Message text: | Criteria | Shanghai | Nanjing |
| ------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Location | East coast of China, on the Yangtze River Delta | Along the Yangtze River, south of Shanghai |
| Population | Approximately 24 million | Approximately 8.5 million |
| GDP | $544.4 billion (2019) | $327.4 billion (2019) |
| Culture | Known for its modernity, international flair, and vibrant nightlife | Has a rich history and is considered a cultural center of the Jiangsu province |
| Tourist Attractions | The Bund, Yu Garden, Oriental Pearl Tower, Shanghai Disneyland | Confucius Temple, Nanjing City Wall, Qinhuai River, Sun Yat-sen Mausoleum |
| Transportation | Well-developed public transportation, including subway, bus, and taxi services | Public transportation options include subway, bus, and taxi services |

Additional context

No response

@yanCode
Copy link
Author

yanCode commented May 20, 2023

it seems this bug is from node-telegram-bot-api

Error: ETELEGRAM: 400 Bad Request: can't parse entities: Character '|' is reserved and must be escaped with the preceding '\' at /Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/node-telegram-bot-api@0.60.0/node_modules/node-telegram-bot-api/src/telegram.js:284:15 at tryCatcher (/Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/promise.js:729:18) at _drainQueueStep (/Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/async.js:102:5) at Async.drainQueues [as _onImmediate] (/Users/y/youtube/chatgpt-telegram-bot/node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/async.js:15:14) at process.processImmediate (node:internal/timers:471:21) at process.callbackTrampoline (node:internal/async_hooks:132:17) {code: "ETELEGRAM", response: IncomingMessage, stack: "Error: ETELEGRAM: 400 Bad Request: can't parse ent…backTrampoline (node:internal/async_hooks:132:17)", message: "ETELEGRAM: 400 Bad Request: can't parse entities: …served and must be escaped with the preceding '\'"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant