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

QnAMaker - Add getAnswers(), fix options in constructor, add metadata, create queryQnaMakerService() #683

Merged
merged 7 commits into from
Dec 5, 2018

Conversation

Zerryth
Copy link
Contributor

@Zerryth Zerryth commented Dec 5, 2018

Fixes #637, #551, #675, microsoft/botframework-sdk#5143

Specific Changes

  • Added strictFilters and metadataBoost in QnAMakerOptions interface
  • Created QnAMakerMetadata interface for strictFilters and metadataBoost and parity with C#
  • QnAMaker class constructor now assignsoptions argument passed in to _options property and doesn't only keep hard-coded defaults
  • deprecated generateAnswers()
  • created new getAnswers() to accept QnAMakerOptions and emit trace
  • created queryQnaService() which also accepts QnAMakerOptions
  • callService() now calls new queryQnaService()
  • changed to use async/await syntax
  • added User-Agent header to requests to QnAMaker service
  • removed link to sample 11. qnamaker, as it uses method generateAnswer() that this PR will deprecate

To-Do: write more tests

@coveralls
Copy link

coveralls commented Dec 8, 2018

Pull Request Test Coverage Report for Build 2385

  • 44 of 49 (89.8%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 82.285%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/botbuilder-ai/src/qnaMaker.ts 44 49 89.8%
Files with Coverage Reduction New Missed Lines %
libraries/botbuilder-ai/src/qnaMaker.ts 1 88.17%
Totals Coverage Status
Change from base Build 2375: 0.04%
Covered Lines: 2663
Relevant Lines: 3115

💛 - Coveralls

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.

3 participants