Show a google search result list for new answer action type "websearch"
See original GitHub issueActual Behaviour
currently there is a hard-coded rule inside the app which triggers a web search.
Expected Behaviour
The app shall not decide on itself to perform a web search. It must only react on the actions as given in the actions object. To perform a web search, the actions object may now contain an action with the type “websearch”. In case that such an action appears, use the value “query” inside the action object to get the actual query term for the web search.
The new actions array will probably contain two actions, one with an normal answer type and another with the new websearch type. Both actions must be performed in the same order as given in the actions array
Steps to reproduce it
ask susi the following string: “search for linux distibutions”, or open http://api.asksusi.com/susi/chat.json?timezoneOffset=-60&q=search+for+linux+distributions. You will get an result json with the following actions array:
"actions": [
{
"type": "answer",
"expression": "Here is a web search result:"
},
{
"type": "websearch",
"query": "linux distributions"
}
]
Use the query object to query the google search result, in this case “linux distributions”. The app shall then show two things:
- the line “Here is a web search result:” - as taken from the expression object
- the google search result in the same window
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (18 by maintainers)
Top GitHub Comments
@mayank408 you can also use this one http://www.faroo.com/hp/api/api.html
If querying google for answers isn’t possible, I’d suggest you to have a look at DuckDuckGo’s APIs. https://duckduckgo.com/api They do have open sourced APIs for search and answers.