keiffster / program-y

Python 3.x based AIML 2.0 Chatbot interpreter, framework, related programs and knowledge files
https://keiffster.github.io/program-y/
Other
348 stars 138 forks source link

line break in the telegram client message from bot. #264

Open SunilGudivada opened 4 years ago

SunilGudivada commented 4 years ago

Issue Tracker can be used for report issues and new features. All requests will be accepted, reviewed and responded to. However submitting a request for a new feature does not guarantee that it will be implemented, but we will commit to respond with 7 working days if a new feature will be added to the backlog.

You can see the full backlog in Trello at Programy Backlog

Expected Behavior

It should send the text without adding a line break. Example: http://telegram.com

Current Behavior

Currently, In Telegram CLient, the response it is sending, it is appending with \n in the sentence. Example: http://tele\ngram.com

keiffster commented 4 years ago

Is there a \n in the grammar

Are you able to post the grammar which causes this ?

Regards

Keith 07771 597630

On 10 Jun 2020, at 17:46, Sunil Gudivada notifications@github.com wrote:

 Issue Tracker can be used for report issues and new features. All requests will be accepted, reviewed and responded to. However submitting a request for a new feature does not guarantee that it will be implemented, but we will commit to responded with 7 working days if a new feature will be added to the backlog.

You can see the full backlog in Trello at Programy Backlog

Expected Behavior

It should send the text with changing breaking the line. Example: http://telegram.com

Current Behavior

Currently, In Telegram CLient, response it is sending, it is appending with \n in the sentence. Example: http://tele\ngram.com

Possible Solution

Steps to Reproduce

Context (Environment)

Version of Program-y: Name and Version of Bot: Version of Python: Operating System ( inc Version ): Detailed Description

Possible Implementation

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

SunilGudivada commented 4 years ago

Attaching the logs. Made the call from telegram with RCS SHOW CARDS.

2020-06-11 00:42:14,067  root       DEBUG   [telegram] [bot] [brain] [*********] - AIML Parser evaluating template [PTEMPLATE [*] [P(0)^(0)#(0)C(0)_(0)*(0)To(0)Th(0)Te(1)]]
2020-06-11 00:42:14,067  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]Servusai] resolved to [Servusai]
2020-06-11 00:42:14,067  root       DEBUG   [telegram] [bot] [brain] [*********] - [[NODE]] resolved to [Servusai]
2020-06-11 00:42:14,068  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]The] resolved to [The]
2020-06-11 00:42:14,068  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]home] resolved to [home]
2020-06-11 00:42:14,069  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]of] resolved to [of]
2020-06-11 00:42:14,069  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]Program] resolved to [Program]
2020-06-11 00:42:14,069  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]Y] resolved to [Y]
2020-06-11 00:42:14,070  root       DEBUG   [telegram] [bot] [brain] [*********] - [[NODE]] resolved to [The home of Program Y]
2020-06-11 00:42:14,070  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]https://chatilly.com/images/cta01.jpg] resolved to [https://chatilly.com/images/cta01.jpg]
2020-06-11 00:42:14,071  root       DEBUG   [telegram] [bot] [brain] [*********] - [[NODE]] resolved to [https://chatilly.com/images/cta01.jpg]
2020-06-11 00:42:14,071  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]Servusai] resolved to [Servusai]
2020-06-11 00:42:14,071  root       DEBUG   [telegram] [bot] [brain] [*********] - [[NODE]] resolved to [Servusai]
2020-06-11 00:42:14,072  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]http://www.servusai.com] resolved to [http://www.servusai.com]
2020-06-11 00:42:14,073  root       DEBUG   [telegram] [bot] [brain] [*********] - [[NODE]] resolved to [http://www.servusai.com]
2020-06-11 00:42:14,074  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]AIML] resolved to [AIML]
2020-06-11 00:42:14,074  root       DEBUG   [telegram] [bot] [brain] [*********] - [[NODE]] resolved to [AIML]
2020-06-11 00:42:14,075  root       DEBUG   [telegram] [bot] [brain] [*********] - [[WORD]http://aiml.foundation] resolved to [http://aiml.foundation]
2020-06-11 00:42:14,075  root       DEBUG   [telegram] [bot] [brain] [*********] - [[NODE]] resolved to [http://aiml.foundation]
2020-06-11 00:42:14,076  root       DEBUG   [telegram] [bot] [brain] [*********] - [[CARD 2]] resolved to [<card><title>Servusai</title><subtitle>The home of Program Y</subtitle><image>https://chatilly.com/images/cta01.jpg</image><button><text>Servusai</text><url>http://www.servusai.com</url></button><button><text>AIML</text><url>http://aiml.foundation</url></button></card>]
2020-06-11 00:42:14,076  root       DEBUG   [telegram] [bot] [brain] [*********] - [[NODE]] resolved to [<card><title>Servusai</title><subtitle>The home of Program Y</subtitle><image>https://chatilly.com/images/cta01.jpg</image><button><text>Servusai</text><url>http://www.servusai.com</url></button><button><text>AIML</text><url>http://aiml.foundation</url></button></card>]
2020-06-11 00:42:14,077  root       DEBUG   [telegram] [bot] [brain] [*********] - Raw Response (*********): <card><title>Servusai</title><subtitle>The home of Program Y</subtitle><image>https://chatilly.com/images/cta01.jpg</image><button><text>Servusai</text><url>http://www.servusai.com</url></button><button><text>AIML</text><url>http://aiml.foundation</url></button></card>
2020-06-11 00:42:14,083  root       DEBUG   [telegram] [bot] [brain] [*********] - Denormalising input from [<card><title>Servusai</title><subtitle>The home of Program Y</subtitle><image>https://chatilly.com/images/cta01.jpg</image><button><text>Servusai</text><url>http://www.servusai.com</url></button><button><text>AIML</text><url>http://aiml.foundation</url></button></card>] to [<card><title>Servusai</title><subtitle>The home of Program Y</subtitle><image>https://chatilly.com/images/cta01.jpg</image><button><text>Servusai</text><url>http://www.servusai.com</url></button><button><text>AIML</text><url>http://aiml.foundation</url></button></card>]
2020-06-11 00:42:14,083  root       DEBUG   [telegram] [bot] [brain] [*********] - Formatting punctuation...
2020-06-11 00:42:14,088  root       DEBUG   [telegram] [bot] [brain] [*********] - Formatting numbers...
2020-06-11 00:42:14,091  root       DEBUG   [telegram] [bot] [brain] [*********] - Removing multiple spaces from words...
2020-06-11 00:42:14,093  root       DEBUG   [telegram] [bot] [brain] [*********] - Removing html from sentence...
2020-06-11 00:42:14,095  root       DEBUG   [telegram] [bot] [brain] [*********] - Formatting response for console outpout...
2020-06-11 00:42:14,096  root       DEBUG   [telegram] [bot] [brain] [*********] - Processed Response (*********): <card><title>Servusai</title><subtitle>The home of Program Y</subtitle><image>ht

tps://chatilly.com/images/cta01.jpg</image><button><text>Servusai</text><url>htt

p://www.servusai.com</url></button><button><text>AIML</text><url>http://aiml.fou

ndation</url></button></card>
SunilGudivada commented 4 years ago

Changing the BUG title, It is not producing \n, but it giving the response in the nextline by breaking the reply including the URL