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

4 participants
@nikhilrayaprolu
Copy link
Member

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 Jun 28, 2017 Inactive

@Marauderer97
Copy link
Contributor

left a comment

Great work!

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

This comment has been minimized.

Copy link
@harshit98

harshit98 Jun 28, 2017

Member

Remove the comment also. There is no need to add QueryClass and MaxHits in future. We won't be using them.

}



This comment has been minimized.

Copy link
@harshit98

harshit98 Jun 28, 2017

Member

Single space only. You're giving too much space here.

@@ -0,0 +1,3 @@
<div class="card" *ngIf="answer">
{{this.answer}}

This comment has been minimized.

Copy link
@harshit98

harshit98 Jun 28, 2017

Member

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;

This comment has been minimized.

Copy link
@harshit98

harshit98 Jun 28, 2017

Member

what is 'sabta' ?

This comment has been minimized.

Copy link
@nikhilrayaprolu

nikhilrayaprolu Jun 28, 2017

Author Member

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]);

This comment has been minimized.

Copy link
@harshit98

harshit98 Jun 28, 2017

Member

remove console.log to avoid console errors.

@harshit98

This comment has been minimized.

Copy link
Member

commented Jun 28, 2017

@nikhilrayaprolu Awesome! 💯

Kindly go through my requested changes. :)

@nikhilrayaprolu

This comment has been minimized.

Copy link
Member Author

commented Jun 28, 2017

@harshit98 made the requested changes.

@mariobehling

This comment has been minimized.

Copy link
Member

commented Jun 28, 2017

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

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
codacy/pr Good work! A positive pull request.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.