cherche / fuchsia

An attempt at creating an intelligent virtual personal assistant for the web based on Jared Cubilla's Jarvis.
https://cherche.github.io/fuchsia/
MIT License
5 stars 6 forks source link

Google popping up all the time is annoying, here's my solution #11

Closed Bergenfrundt closed 7 years ago

Bergenfrundt commented 8 years ago

Make it so Fuchsia says "I'm sorry, i didn't quite understand that. Would you like me to Google it instead?"

And you can add an else if y.startswith Google/Search for... then it goes straight to Google.

cherche commented 8 years ago

Another solution could be to embed the Google search page.

The problem is that after "Would you like me to Google it instead?", the natural response is "yes", and that means that the search query needs to be saved which isn't possible with the local scope the variables have inside the function.

Edit: I should be able to use http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q= to get the results and put them in a box like the movie box.

Edit 2: So that didn't work. I'll probably just leave it as it is for now. Changing anything would be quite difficult.

cherche commented 8 years ago

I found that the Bing Search API should work. In fact, Siri uses it. http://www.bing.com/dev/