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

[AutoPR cognitiveservices/data-plane/QnAMaker] Updating the docs to include rankerType field in QueryDTO #8021

Closed
Show file tree
Hide file tree
Changes from all commits
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 @@ -538,6 +538,9 @@ class QueryDTO(Model):
:param context: Context object with previous QnA's information.
:type context:
~azure.cognitiveservices.knowledge.qnamaker.models.QueryDTOContext
:param ranker_type: Optional field. Set to 'QuestionOnly' for using a
question only Ranker.
:type ranker_type: str
:param strict_filters: Find only answers that contain these metadata.
:type strict_filters:
list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO]
Expand All @@ -551,6 +554,7 @@ class QueryDTO(Model):
'is_test': {'key': 'isTest', 'type': 'bool'},
'score_threshold': {'key': 'scoreThreshold', 'type': 'float'},
'context': {'key': 'context', 'type': 'QueryDTOContext'},
'ranker_type': {'key': 'rankerType', 'type': 'str'},
'strict_filters': {'key': 'strictFilters', 'type': '[MetadataDTO]'},
}

Expand All @@ -563,6 +567,7 @@ def __init__(self, **kwargs):
self.is_test = kwargs.get('is_test', None)
self.score_threshold = kwargs.get('score_threshold', None)
self.context = kwargs.get('context', None)
self.ranker_type = kwargs.get('ranker_type', None)
self.strict_filters = kwargs.get('strict_filters', None)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,9 @@ class QueryDTO(Model):
:param context: Context object with previous QnA's information.
:type context:
~azure.cognitiveservices.knowledge.qnamaker.models.QueryDTOContext
:param ranker_type: Optional field. Set to 'QuestionOnly' for using a
question only Ranker.
:type ranker_type: str
:param strict_filters: Find only answers that contain these metadata.
:type strict_filters:
list[~azure.cognitiveservices.knowledge.qnamaker.models.MetadataDTO]
Expand All @@ -551,10 +554,11 @@ class QueryDTO(Model):
'is_test': {'key': 'isTest', 'type': 'bool'},
'score_threshold': {'key': 'scoreThreshold', 'type': 'float'},
'context': {'key': 'context', 'type': 'QueryDTOContext'},
'ranker_type': {'key': 'rankerType', 'type': 'str'},
'strict_filters': {'key': 'strictFilters', 'type': '[MetadataDTO]'},
}

def __init__(self, *, qna_id: str=None, question: str=None, top: int=None, user_id: str=None, is_test: bool=None, score_threshold: float=None, context=None, strict_filters=None, **kwargs) -> None:
def __init__(self, *, qna_id: str=None, question: str=None, top: int=None, user_id: str=None, is_test: bool=None, score_threshold: float=None, context=None, ranker_type: str=None, strict_filters=None, **kwargs) -> None:
super(QueryDTO, self).__init__(**kwargs)
self.qna_id = qna_id
self.question = question
Expand All @@ -563,6 +567,7 @@ def __init__(self, *, qna_id: str=None, question: str=None, top: int=None, user_
self.is_test = is_test
self.score_threshold = score_threshold
self.context = context
self.ranker_type = ranker_type
self.strict_filters = strict_filters


Expand Down