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

feat: QnA import url #3919

Merged
merged 126 commits into from
Oct 15, 2020
Merged

feat: QnA import url #3919

merged 126 commits into from
Oct 15, 2020

Conversation

zhixzhan
Copy link
Contributor

@zhixzhan zhixzhan commented Aug 27, 2020

Description

QnA import

QnA import from url/scratch will create <name>.source.qna:

> !# @source.url= <url>

...

For dialog.qna will import it by

[import](<name>.source.qna)
...

All up view can edit all imported qna file.

KB container based QnA structure.

Every created QnA container (from url/scratch) is a .source.qna file, and shared by all dialog.qna, import by file id or file path both work, locale can be ignored.

{
  ...
  qna: 'knowledge-base/en-us/${BOTNAME}.en-us.qna',
  sourceQnA: 'knowledge-base/source/${FILENAME}.source.qna',
  dialogs: {
      qna: 'dialogs/${DIALOGNAME}/knowledge-base/en-us/${DIALOGNAME}.en-us.qna',
  }
}

Lu Reference

refer by wildcard matcher */**
  • [link name](<path>/*)
  • [link name](<path>/**)
refer a file
  • [link name](help.lu) refer by id
  • [link name](help.en-us.lu) when not specify locale will auto fallback to current luFile's locale
  • [link name](./help.lu) with path
refer a intent's utterances and patterns
  • [link name](help.lu#HowToDrive)
  • [link name](help.lu#HowToDrive*utterances*)
  • [link name](help.lu#HowToDrive*patterns*)
refer file's utterances and patterns
  • [link name](help.lu#*utterances*)
  • [link name](help.lu#*patterns*)
  • [link name](help.lu#*utterancesAndPatterns*)

QnA reference

  • [link name](<path>/*)
  • [link name](<path>/**)
  • [link name](help.qna#$name?)
  • [link name](help.qna#*alterations*?)
  • [link name](help.qna#?question-to-find?)
  • [link name](help.qna#*answers*?)

Known issue

  1. Due to LU parser not support customized importResolver yet, client / LUEditor are not be able do intelligence auto-complete or find out imported file not existed. e.g.
[link name](helpNotExist.lu)

only when publishing time  check error. this is tracked via microsoft/botframework-cli#933

  1. if a referenced intent not exist, the referenced' utterances will be empty, and do not block publishing. e.g.
[link name](help.lu#NotExistIntent)

Task Item

close #3668
close #3872
close #3988

Screenshots

image

image

image

@cwhitten cwhitten merged commit e5fc3df into microsoft:main Oct 15, 2020
@zhixzhan zhixzhan deleted the qna-import branch October 16, 2020 01:02
@cwhitten cwhitten mentioned this pull request Nov 13, 2020
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* lu  reference

* update

* update

* minimal publish model

* update resolver

* update package

* update

* support  path based resolve

* support wildcard match * / **

* update

* resolver support .qna file ext

* define source qna in bot structure

* include dialog name in source qna name

* qnaIndexer update

* update

* create qna file for imported  url & name

* update

* enable source qna in all up view

* import url sync all locale

* update import name

* qna parse more infomation

* keep header in qna crud

* group source.qna in dialog.qna

* refactor qnaUtil curd methods

* refactor qna all up view

* update

* remove > !# @source.name in options

* do not insert \n before section

* update

* remove source from nav tree

* enable multi turn

* create qna file for imported url & name

* update package

* imports methods

* remove import in table-view

* update

* update

* enable multiturn

* remove file state

* update style

* handle focus states

* clean install

* rename

* refactor create qna modal

* ... menuItems for navTree

* rename

* create from scratch & url

* clean up

* fix build

* update

* update all up view UX

* creation flow from qna scratch

* edit container name

* update css

* update css

* migrate exist qna to container

* edit url source

* update css

* update css

* clean up

* update bf-lu package

* update

* update ux

* creation back

* update

* fix create qna bot

* update css

* update container edit

* update tests

* update to multi projectId

* fix bug and update css

* fix bug

* add tests

* resolve merge conflict

* update

* use notification card

* unify create qna modal

* show code & back KB

* rename migrated file to *-munual.source.qna

* clean

* update css

* update styles

* update tests

* revert test

* update showcode button test id

* resolve comments

* resolve types

* update

* required validation

* edit field height

* update

* update

* expand row index

* craete QnA pair controls

* update

* fix empty group creation

* not change backgroud when switch to scratch

* update

* height

* update

* update

* resolve merge conflict

* fix creation

* fix bug

* show + when hover

Co-authored-by: liweitian <liweitian93@outlook.com>
Co-authored-by: Weitian Li <weitli@microsoft.com>
Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants