Closed heaths closed 2 years ago
Updated with changes from subsequent discussions.
@annatisch went through the list of property name renames and came up with this for python:
AnswerSpan.confidence_score -> AnswerSpan.confidence
AnswerSpanRequest.confidence_score_threshold -> ShortAnswerOptions.confidence_threshold
AnswerSpanRequest.top_answers_with_span -> ShortAnswerOptions.top
KnowledgeBaseAnswer.answer_span -> KnowledgeBaseAnswer.short_answer
KnowledgeBaseAnswer.id -> KnowledgeBaseAnswer.qna_id
KnowledgeBaseAnswer.confidence_score -> KnowledgeBaseAnswer.confidence
KnowledgeBaseAnswerRequestContext.previous_user_query -> KnowledgeBaseAnswerContext.previous_question
QueryKnowledgeBaseOptions.confidence_score_threshold -> AnswersOptions.confidence_threshold
QueryKnowledgeBaseOptions.answer_span_request -> AnswersOptions.short_answer_options
QueryKnowledgeBaseOptions.ranker_type -> AnswersOptions.ranker_kind
QueryTextOptions.records -> AnswersFromTextOptions.text_documents
TextAnswer.confidence_score -> TextAnswer.confidence
TextAnswer.answer_span -> TextAnswer.short_answer
Per discussion with @KrzysztofCwalina and @tg-msft I'll just move all models to the root via transform. If we add authoring to the same package (likely, given it's much smaller than Search) we can add the client and models - with their own .Models
namespace - to a separate authoring namespace like we did for Search.
projectName
anddeploymentName
parameters to new input model namedQuestionAnsweringProject
that requires them both in the constructor. This should be the second required parameter afterstring question
.QueryKnowledgeBase()
->AnswersResult GetAnswers(string question, QuestionAnsweringProject project, AnswersOptions options = null, …)
QueryText()
->AnswersFromTextResult GetAnswersFromText(string question, IEnumerable<string> textDocuments, …)
AnswersFromTextResult GetAnswersFromText(string question, IEnumerable<TextDocument> textDocuments, …)
AnswersFromTextResult GetAnswersFromText(AnswersFromTextOptions options, …)
TextRecord
->TextDocument
AnswerSpanRequest
->ShortAnswerOptions
ShortAnswerOptions.Enable
should be hidden and always set totrue
ShortAnswerOptions.TopAnswersWithSpan
->Top
QueryKnowledgeBaseOptions
->AnswersOptions
AnswersOptions.AnswerSpanRequest
->ShortAnswerOptions
(same as type name)AnswerSpan
model but rename property toShortAnswer
KnowledgeBaseAnswer.AnswerSpan
->ShortAnswer
ConfidenceScore
->Confidence
ConfidenceScoreThreshold
->ConfidenceThreshold
KnowledgeBaseAnswerRequestContext.PreviousUserQuery
->KnowledgeBaseAnswerRequestContext.PreviousQuestion
StringIndexType
RankerType
->RankerKind
KnowledgeBaseAnswer.Id
->KnowledgeBaseAnswer.QnaId
for consistencyTop
->Size
(at least 2 instances)string
for language for now, per offline discussion with @rokulka and @tg-msft, but XML doc comments should link to https://docs.microsoft.com/azure/cognitive-services/qnamaker/overview/language-support anywhere we uselanguage
orDefaultLanguage
.Investigate:
KeyValuePair<string, string>
instead ofMetadataRecord
~NameValueCollection
instead ofIList<MetadataRecord>
forMetadataFilter.Metadata
~After discussion since these are both input models and how they are used only for serializing, it's okay to leave as-is.