Skip to content

[QnA] Release prep - #19947

Merged
Wes Haggard (weshaggard) merged 7 commits into
Azure:mainfrom
annatisch:feature/cognitiveservices/language
Jul 27, 2021
Merged

[QnA] Release prep#19947
Wes Haggard (weshaggard) merged 7 commits into
Azure:mainfrom
annatisch:feature/cognitiveservices/language

Conversation

@annatisch

Copy link
Copy Markdown
Member

No description provided.

@iscai-msft iscai-msft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't look too much at docstrings, but loosk good! thanks for adding chardet

@heaths Heath Stewart (heaths) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of nits that don't need to be done now.


### Features Added
* Initial release.
* Initial release - supports querying from text records and knowledge bases.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I should probably do something like that.


class QuestionAnsweringClient(QuestionAnsweringClientOperationsMixin):
"""The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in :code:`<a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview">https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview</a>`.
"""The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: for review purposes, would be great - if heredoc supports it (I actually don't know) - if this was separated on multiple lines. GH doesn't make this easy to review otherwise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - this is in autorest, there were a couple of docs quirks I had to manually edit - but they're rendering okay.

:paramtype question: str
:keyword records: Text records to be searched for given question. Provide either `text_query_options`, OR
individual keyword arguments. If both are provided, only the options object will be used.
:paramtype records: list[~azure.ai.language.questionanswering.models.TextRecord]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take it these can't also just be strings, right? From the implementation I don't see any auto-incrementing like Text Analytics did, which I copied for .NET.

Probably don't need to worry about it now, but you might open an issue to consider for beta 2.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I will open an issue for this.

**kwargs # type: Any
):
# type: (...) -> "_models.KnowledgeBaseAnswers"
"""Answers the specified question using your knowledge base.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the method now be query_knowledge_base? I'm using QueryKnowledgeBase in .NET.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm that's a good point - I think this happened because my swagger readme file was redefining the operations IDs of the APIs - and so the capitalization change in the operation was ignored. I will open an issue for this.

'azure-core<2.0.0,>=1.16.0',
"msrest>=0.6.21"
'msrest>=0.6.21',
'chardet>=3.0.2,<5'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: trailing comma makes the diff cleaner next time, like you did on line 66 above.

@weshaggard
Wes Haggard (weshaggard) merged commit ffdb2b4 into Azure:main Jul 27, 2021
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.

4 participants