QuentinCG / jarvis-fb-messenger

[Done] Control Jarvis assistant (http://openjarvis.com/) remotely using Facebook Messenger
MIT License
4 stars 2 forks source link

Filter warnings and display only answer in Jarvis' JSON #11

Closed Oliv4945 closed 6 years ago

Oliv4945 commented 6 years ago

Hi Quentin,

@fredericsuretat opened this issue to complain about warnings displayed in the app. Could you please filter on 'keys' in "non verbose" mode here, in order to display only "answer" field ?

Something like this :-)

            if self.verbose_mode:
              response_to_send += "{}: {}".format(str(key), str(value))
            else:
              if str( key ) == 'answer':
                response_to_send += str(value)

Exemple of answer:

{
  "warning": "No mic configured, forcing keyboard mode",
  "warning": "No speaker configured, forcing mute",
  "answer":  "ça fonctionne"
}
QuentinCG commented 6 years ago

@fredericsuretat Could you please update your plugin and tell me if it works now? (I integrated the fix suggested by @Oliv4945)

@Oliv4945 Thanks for the bugfix suggestion ;)

Oliv4945 commented 6 years ago

Pretty fast :) I had the same in the Android app two days ago

fredericsuretat commented 6 years ago

hi.it works good. but not the help command :-( sorry.

Oliv4945 commented 6 years ago

@QuentinCG : I just recorded the following, seems to be fun :p

[  
   {  
      "info":"User defined commands:"
   },
   {  
      "debug":"*AIDE*            *BONJOUR*|*SALUT*    *COMMENT*APPELLE*\n*MERCI*            *AU REVOIR*|*BYE*    ANNULE*|TERMINE*\nENCORE*            *TEST*            *VERSION*\n*REPETE (*) ET (*)    *CA VA*            >*OUI*\n>*NON*|*PAS*"
   },
   {  
      "info":"Commands from plugin jarvis-api:"
   },
   {  
      "debug":""
   },
   {  
      "info":"Commands from plugin jarvis-ui:"
   },
   {  
      "debug":"*OUVR*INTERFACE*"
   }
]
QuentinCG commented 6 years ago

@Oliv4945 Thanks. @fredericsuretat It should be fully functional now ;) (I'll close the issue when you confirm it's working)

fredericsuretat commented 6 years ago

Hi, I just tested the case, it's better but i have a mistake when i use the word "info" in your plugin : "Réponse non valide". Other commands or OK. But I think we are on the good way :-)

QuentinCG commented 6 years ago

@fredericsuretat Do you have the full logs? Your error is strange: I don't understand from where this "Réponse non valide" comes from (I have no reference of this sentence in the plugin).

fredericsuretat commented 6 years ago

Oh sorry, my bad, This error is on jarvis on android, not in facebook plugin. It works fine now with your app ....

QuentinCG commented 6 years ago

Perfect ! Thanks for your report and for your help.

I close the issue.