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
Fixes #564 now susper answers questions #569
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
src/app/intelligence.service.ts
Outdated
let params = new URLSearchParams(); | ||
params.set('q', searchquery); | ||
// params.set('QueryClass', 'MaxHits=5'); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the comment also. There is no need to add QueryClass
and MaxHits
in future. We won't be using them.
} | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single space only. You're giving too much space here.
@@ -0,0 +1,3 @@ | |||
<div class="card" *ngIf="answer"> | |||
{{this.answer}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent it.
this.actions = res.answers[0].actions; | ||
for (let action of this.actions){ | ||
if (action.type === 'answer' && action.mood !== 'sabta') { | ||
this.answer = action.expression; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is 'sabta' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is some random mood name given in susi when the results are not sure, hence whenever mood is sabta, didn't display the result.
this.wholequery$ = store.select(fromRoot.getwholequery); | ||
this.wholequery$.subscribe(data => { | ||
this.intelligence.getintelligentresponse(data.query).subscribe(res => { | ||
console.log(res, res.answers , res.answers[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console.log to avoid console errors.
@nikhilrayaprolu Awesome! 💯 Kindly go through my requested changes. :) |
@harshit98 made the requested changes. |
Great job. I see travis is failing also on live site. Please help to solve it in subsequent PRs. |
Fixes issue #564
This is basic implementation of Intelligence which answers only for questions. this could be incrementally developed with new features like displaying charts, maps etc. and UI changes could be done.
Demo Link: https://susper-pr-569.herokuapp.com/
Screenshots for the change: