qnas
Creates, updates, deletes, gets or lists a qnas resource.
Overview
| Name | qnas |
| Type | Resource |
| Id | azure.ai_language.qnas |
Fields
The following fields are returned by SELECT queries:
- list_qnas
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique ID for the QnA. Required. |
activeLearningSuggestions | array | List of Active Learning suggestions for the QnA. |
answer | string | Answer text. |
dialog | object | Context of a QnA. |
lastUpdatedDateTime | string (date-time) | Date-time when the QnA was last updated. |
metadata | object | Metadata associated with the answer, useful to categorize or filter question answers. |
questions | array | List of questions associated with the answer. |
source | string | Source from which QnA was indexed e.g. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs _ . |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_qnas | select | project_name, endpoint | top, skip, maxpagesize, source | Gets all the QnAs of a project. |
update_qnas | update | project_name, endpoint, op, value | Updates the QnAs of a project. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client Endpoint parameter. (default: ) |
project_name | string | The name of the project to use. Required. |
maxpagesize | integer | |
skip | integer | An offset into the collection of the first resource to be returned. Default value is None. |
source | string | Source of the QnA. Default value is None. |
top | integer | The maximum number of resources to return from the collection. Default value is None. |
SELECT examples
- list_qnas
Gets all the QnAs of a project.
SELECT
id,
activeLearningSuggestions,
answer,
dialog,
lastUpdatedDateTime,
metadata,
questions,
source
FROM azure.ai_language.qnas
WHERE project_name = '{{ project_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND maxpagesize = '{{ maxpagesize }}'
AND source = '{{ source }}'
;
UPDATE examples
- update_qnas
Updates the QnAs of a project.
UPDATE azure.ai_language.qnas
SET
op = '{{ op }}',
value = '{{ value }}'
WHERE
project_name = '{{ project_name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND op = '{{ op }}' --required
AND value = '{{ value }}' --required;