Computation Class

Defines an expression and its answer.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Inheritance
azure.cognitiveservices.search.websearch.models._models_py3.Answer
Computation

Constructor

Computation(*, expression: str, value: str, **kwargs)

Parameters

_type
str
Required

Required. Constant filled by server.

expression
str
Required

Required. The math or conversion expression. If the query contains a request to convert units of measure (for example, meters to feet), this field contains the from units and value contains the to units. If the query contains a mathematical expression such as 2+2, this field contains the expression and value contains the answer. Note that mathematical expressions may be normalized. For example, if the query was sqrt(4^2+8^2), the normalized expression may be sqrt((4^2)+(8^2)). If the user's query is a math question and the textDecorations query parameter is set to true, the expression string may include formatting markers. For example, if the user's query is log(2), the normalized expression includes the subscript markers. For more information, see Hit Highlighting.

value
str
Required

Required. The expression's answer.

Variables

id
str

A String identifier.

web_search_url
str

The URL To Bing's search result for this item.

follow_up_queries
list[Query]