QuestionAnsweringClient Class

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/azure/cognitive-services/text-analytics/overview

Inheritance
azure.ai.language.questionanswering._operations._operations.QuestionAnsweringClientOperationsMixin
QuestionAnsweringClient

Constructor

QuestionAnsweringClient(endpoint: str, credential: AzureKeyCredential, **kwargs: Any)

Parameters

endpoint
str
Required

Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).

credential
AzureKeyCredential
Required

Credential needed for the client to connect to Azure.

default_language
str

Sets the default language to use for all operations.

Methods

close
send_request

Runs the network request through the client's chained policies.


>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = client.send_request(request)
<HttpResponse: 200 OK>

For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

close

close() -> None

send_request

Runs the network request through the client's chained policies.


>>> from azure.core.rest import HttpRequest
>>> request = HttpRequest("GET", "https://www.example.org/")
<HttpRequest [GET], url: 'https://www.example.org/'>
>>> response = client.send_request(request)
<HttpResponse: 200 OK>

For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart

send_request(request: HttpRequest, **kwargs: Any) -> HttpResponse

Parameters

request
HttpRequest
Required

The network request you want to make. Required.

stream
bool

Whether the response payload will be streamed. Defaults to False.

Returns

The response of your network call. Does not do error handling on your response.

Return type