Skip to content
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

Merged
merged 2 commits into from Jun 28, 2017

Conversation

nikhilrayaprolu
Copy link
Member

@nikhilrayaprolu nikhilrayaprolu commented Jun 28, 2017

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:
screenshot from 2017-06-28 23-45-49

@nikhilrayaprolu nikhilrayaprolu temporarily deployed to susper-pr-569 June 28, 2017 18:24 Inactive
Copy link
Contributor

@Marauderer97 Marauderer97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

let params = new URLSearchParams();
params.set('q', searchquery);
// params.set('QueryClass', 'MaxHits=5');

Copy link
Member

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.

}



Copy link
Member

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}}
Copy link
Member

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is 'sabta' ?

Copy link
Member Author

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]);
Copy link
Member

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.

@harshit98
Copy link
Member

@nikhilrayaprolu Awesome! 💯

Kindly go through my requested changes. :)

@nikhilrayaprolu
Copy link
Member Author

@harshit98 made the requested changes.

@mariobehling
Copy link
Member

Great job. I see travis is failing also on live site. Please help to solve it in subsequent PRs.

@mariobehling mariobehling merged commit f6b9b7c into fossasia:master Jun 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants