Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@
from .alterations_dto_py3 import AlterationsDTO
from .word_alterations_dto_py3 import WordAlterationsDTO
from .endpoint_keys_dto_py3 import EndpointKeysDTO
from .query_dto_context_py3 import QueryDTOContext
from .query_dto_answer_span_request_py3 import QueryDTOAnswerSpanRequest
from .query_dto_py3 import QueryDTO
from .query_context_dto_py3 import QueryContextDTO
from .qn_asearch_result_context_py3 import QnASearchResultContext
from .qn_asearch_result_answer_span_py3 import QnASearchResultAnswerSpan
from .qn_asearch_result_py3 import QnASearchResult
from .qn_asearch_result_list_py3 import QnASearchResultList
from .feedback_record_dto_py3 import FeedbackRecordDTO
from .feedback_records_dto_py3 import FeedbackRecordsDTO
from .answer_span_request_dto_py3 import AnswerSpanRequestDTO
from .answer_span_response_dto_py3 import AnswerSpanResponseDTO
except (SyntaxError, ImportError):
from .update_kb_operation_dto_add import UpdateKbOperationDTOAdd
from .update_kb_operation_dto_delete import UpdateKbOperationDTODelete
Expand Down Expand Up @@ -85,9 +97,22 @@
from .alterations_dto import AlterationsDTO
from .word_alterations_dto import WordAlterationsDTO
from .endpoint_keys_dto import EndpointKeysDTO
from .query_dto_context import QueryDTOContext
from .query_dto_answer_span_request import QueryDTOAnswerSpanRequest
from .query_dto import QueryDTO
from .query_context_dto import QueryContextDTO
from .qn_asearch_result_context import QnASearchResultContext
from .qn_asearch_result_answer_span import QnASearchResultAnswerSpan
from .qn_asearch_result import QnASearchResult
from .qn_asearch_result_list import QnASearchResultList
from .feedback_record_dto import FeedbackRecordDTO
from .feedback_records_dto import FeedbackRecordsDTO
from .answer_span_request_dto import AnswerSpanRequestDTO
from .answer_span_response_dto import AnswerSpanResponseDTO
from .qn_amaker_client_enums import (
ErrorCodeType,
OperationStateType,
StrictFiltersCompoundOperationType,
EnvironmentType,
)

Expand Down Expand Up @@ -129,7 +154,20 @@
'AlterationsDTO',
'WordAlterationsDTO',
'EndpointKeysDTO',
'QueryDTOContext',
'QueryDTOAnswerSpanRequest',
'QueryDTO',
'QueryContextDTO',
'QnASearchResultContext',
'QnASearchResultAnswerSpan',
'QnASearchResult',
'QnASearchResultList',
'FeedbackRecordDTO',
'FeedbackRecordsDTO',
'AnswerSpanRequestDTO',
'AnswerSpanResponseDTO',
'ErrorCodeType',
'OperationStateType',
'StrictFiltersCompoundOperationType',
'EnvironmentType',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AnswerSpanRequestDTO(Model):
"""To configure Answer span prediction feature.

:param enable: Enable or Disable Answer Span prediction.
:type enable: bool
:param score_threshold: Minimum threshold score required to include an
answer span.
:type score_threshold: float
:param top_answers_with_span: Number of Top answers to be considered for
span prediction.
:type top_answers_with_span: int
"""

_validation = {
'top_answers_with_span': {'maximum': 10, 'minimum': 1},
}

_attribute_map = {
'enable': {'key': 'enable', 'type': 'bool'},
'score_threshold': {'key': 'scoreThreshold', 'type': 'float'},
'top_answers_with_span': {'key': 'topAnswersWithSpan', 'type': 'int'},
}

def __init__(self, **kwargs):
super(AnswerSpanRequestDTO, self).__init__(**kwargs)
self.enable = kwargs.get('enable', None)
self.score_threshold = kwargs.get('score_threshold', None)
self.top_answers_with_span = kwargs.get('top_answers_with_span', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AnswerSpanRequestDTO(Model):
"""To configure Answer span prediction feature.

:param enable: Enable or Disable Answer Span prediction.
:type enable: bool
:param score_threshold: Minimum threshold score required to include an
answer span.
:type score_threshold: float
:param top_answers_with_span: Number of Top answers to be considered for
span prediction.
:type top_answers_with_span: int
"""

_validation = {
'top_answers_with_span': {'maximum': 10, 'minimum': 1},
}

_attribute_map = {
'enable': {'key': 'enable', 'type': 'bool'},
'score_threshold': {'key': 'scoreThreshold', 'type': 'float'},
'top_answers_with_span': {'key': 'topAnswersWithSpan', 'type': 'int'},
}

def __init__(self, *, enable: bool=None, score_threshold: float=None, top_answers_with_span: int=None, **kwargs) -> None:
super(AnswerSpanRequestDTO, self).__init__(**kwargs)
self.enable = enable
self.score_threshold = score_threshold
self.top_answers_with_span = top_answers_with_span
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AnswerSpanResponseDTO(Model):
"""Answer span object of QnA.

:param text: Predicted text of answer span.
:type text: str
:param score: Predicted score of answer span.
:type score: float
:param start_index: Start index of answer span in answer.
:type start_index: int
:param end_index: End index of answer span in answer.
:type end_index: int
"""

_attribute_map = {
'text': {'key': 'text', 'type': 'str'},
'score': {'key': 'score', 'type': 'float'},
'start_index': {'key': 'startIndex', 'type': 'int'},
'end_index': {'key': 'endIndex', 'type': 'int'},
}

def __init__(self, **kwargs):
super(AnswerSpanResponseDTO, self).__init__(**kwargs)
self.text = kwargs.get('text', None)
self.score = kwargs.get('score', None)
self.start_index = kwargs.get('start_index', None)
self.end_index = kwargs.get('end_index', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AnswerSpanResponseDTO(Model):
"""Answer span object of QnA.

:param text: Predicted text of answer span.
:type text: str
:param score: Predicted score of answer span.
:type score: float
:param start_index: Start index of answer span in answer.
:type start_index: int
:param end_index: End index of answer span in answer.
:type end_index: int
"""

_attribute_map = {
'text': {'key': 'text', 'type': 'str'},
'score': {'key': 'score', 'type': 'float'},
'start_index': {'key': 'startIndex', 'type': 'int'},
'end_index': {'key': 'endIndex', 'type': 'int'},
}

def __init__(self, *, text: str=None, score: float=None, start_index: int=None, end_index: int=None, **kwargs) -> None:
super(AnswerSpanResponseDTO, self).__init__(**kwargs)
self.text = text
self.score = score
self.start_index = start_index
self.end_index = end_index
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,24 @@ class CreateKbDTO(Model):
a hierarchy. Required when EnableHierarchicalExtraction field is set to
True.
:type default_answer_used_for_extraction: str
:param language: Language of the knowledgebase.
:param language: Language of the knowledgebase. Please find the list of
supported languages <a
href="https://aka.ms/qnamaker-languages#languages-supported"
target="_blank">here</a>.
:type language: str
:param enable_multiple_languages: Set to true to enable creating KBs in
different languages for the same resource.
:type enable_multiple_languages: bool
:param default_answer: Default answer sent to user if no good match is
found in the KB.
:type default_answer: str
"""

_validation = {
'name': {'required': True, 'max_length': 100, 'min_length': 1},
'default_answer_used_for_extraction': {'max_length': 300, 'min_length': 1},
'language': {'max_length': 100, 'min_length': 1},
'default_answer': {'max_length': 300, 'min_length': 1},
}

_attribute_map = {
Expand All @@ -55,6 +65,8 @@ class CreateKbDTO(Model):
'enable_hierarchical_extraction': {'key': 'enableHierarchicalExtraction', 'type': 'bool'},
'default_answer_used_for_extraction': {'key': 'defaultAnswerUsedForExtraction', 'type': 'str'},
'language': {'key': 'language', 'type': 'str'},
'enable_multiple_languages': {'key': 'enableMultipleLanguages', 'type': 'bool'},
'default_answer': {'key': 'defaultAnswer', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -66,3 +78,5 @@ def __init__(self, **kwargs):
self.enable_hierarchical_extraction = kwargs.get('enable_hierarchical_extraction', None)
self.default_answer_used_for_extraction = kwargs.get('default_answer_used_for_extraction', None)
self.language = kwargs.get('language', None)
self.enable_multiple_languages = kwargs.get('enable_multiple_languages', None)
self.default_answer = kwargs.get('default_answer', None)
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,24 @@ class CreateKbDTO(Model):
a hierarchy. Required when EnableHierarchicalExtraction field is set to
True.
:type default_answer_used_for_extraction: str
:param language: Language of the knowledgebase.
:param language: Language of the knowledgebase. Please find the list of
supported languages <a
href="https://aka.ms/qnamaker-languages#languages-supported"
target="_blank">here</a>.
:type language: str
:param enable_multiple_languages: Set to true to enable creating KBs in
different languages for the same resource.
:type enable_multiple_languages: bool
:param default_answer: Default answer sent to user if no good match is
found in the KB.
:type default_answer: str
"""

_validation = {
'name': {'required': True, 'max_length': 100, 'min_length': 1},
'default_answer_used_for_extraction': {'max_length': 300, 'min_length': 1},
'language': {'max_length': 100, 'min_length': 1},
'default_answer': {'max_length': 300, 'min_length': 1},
}

_attribute_map = {
Expand All @@ -55,9 +65,11 @@ class CreateKbDTO(Model):
'enable_hierarchical_extraction': {'key': 'enableHierarchicalExtraction', 'type': 'bool'},
'default_answer_used_for_extraction': {'key': 'defaultAnswerUsedForExtraction', 'type': 'str'},
'language': {'key': 'language', 'type': 'str'},
'enable_multiple_languages': {'key': 'enableMultipleLanguages', 'type': 'bool'},
'default_answer': {'key': 'defaultAnswer', 'type': 'str'},
}

def __init__(self, *, name: str, qna_list=None, urls=None, files=None, enable_hierarchical_extraction: bool=None, default_answer_used_for_extraction: str=None, language: str=None, **kwargs) -> None:
def __init__(self, *, name: str, qna_list=None, urls=None, files=None, enable_hierarchical_extraction: bool=None, default_answer_used_for_extraction: str=None, language: str=None, enable_multiple_languages: bool=None, default_answer: str=None, **kwargs) -> None:
super(CreateKbDTO, self).__init__(**kwargs)
self.name = name
self.qna_list = qna_list
Expand All @@ -66,3 +78,5 @@ def __init__(self, *, name: str, qna_list=None, urls=None, files=None, enable_hi
self.enable_hierarchical_extraction = enable_hierarchical_extraction
self.default_answer_used_for_extraction = default_answer_used_for_extraction
self.language = language
self.enable_multiple_languages = enable_multiple_languages
self.default_answer = default_answer
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class FeedbackRecordDTO(Model):
"""Active learning feedback record.

:param user_id: Unique identifier for the user.
:type user_id: str
:param user_question: The suggested question being provided as feedback.
:type user_question: str
:param qna_id: The qnaId for which the suggested question is provided as
feedback.
:type qna_id: int
"""

_validation = {
'user_question': {'max_length': 1000},
}

_attribute_map = {
'user_id': {'key': 'userId', 'type': 'str'},
'user_question': {'key': 'userQuestion', 'type': 'str'},
'qna_id': {'key': 'qnaId', 'type': 'int'},
}

def __init__(self, **kwargs):
super(FeedbackRecordDTO, self).__init__(**kwargs)
self.user_id = kwargs.get('user_id', None)
self.user_question = kwargs.get('user_question', None)
self.qna_id = kwargs.get('qna_id', None)
Loading