azure.cognitiveservices.knowledge.qnamaker.operations module¶
-
class
azure.cognitiveservices.knowledge.qnamaker.operations.
EndpointSettingsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
EndpointSettingsOperations operations.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
get_settings
(custom_headers=None, raw=False, **operation_config)[source]¶ Gets endpoint settings for an endpoint.
- Parameters
- Returns
EndpointSettingsDTO or ClientRawResponse if raw=true
- Return type
EndpointSettingsDTO or ClientRawResponse
- Raises
-
update_settings
(active_learning=None, custom_headers=None, raw=False, **operation_config)[source]¶ Updates endpoint settings for an endpoint.
- Parameters
active_learning (EndpointSettingsDTOActiveLearning) – Active Learning settings of the endpoint.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
None or ClientRawResponse if raw=true
- Return type
None or ClientRawResponse
- Raises
-
models
= <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/home/vsts/work/1/s/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/.tox/sphinx/lib/python3.6/site-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>¶
-
class
azure.cognitiveservices.knowledge.qnamaker.operations.
EndpointKeysOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
EndpointKeysOperations operations.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
get_keys
(custom_headers=None, raw=False, **operation_config)[source]¶ Gets endpoint keys for an endpoint.
- Parameters
- Returns
EndpointKeysDTO or ClientRawResponse if raw=true
- Return type
EndpointKeysDTO or ClientRawResponse
- Raises
-
refresh_keys
(key_type, custom_headers=None, raw=False, **operation_config)[source]¶ Re-generates an endpoint key.
- Parameters
- Returns
EndpointKeysDTO or ClientRawResponse if raw=true
- Return type
EndpointKeysDTO or ClientRawResponse
- Raises
-
models
= <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/home/vsts/work/1/s/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/.tox/sphinx/lib/python3.6/site-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>¶
-
class
azure.cognitiveservices.knowledge.qnamaker.operations.
AlterationsOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
AlterationsOperations operations.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
get
(custom_headers=None, raw=False, **operation_config)[source]¶ Download alterations from runtime.
- Parameters
- Returns
WordAlterationsDTO or ClientRawResponse if raw=true
- Return type
WordAlterationsDTO or ClientRawResponse
- Raises
-
get_alterations_for_kb
(kb_id, custom_headers=None, raw=False, **operation_config)[source]¶ Download alterations per Knowledgebase (QnAMaker Managed).
- Parameters
- Returns
WordAlterationsDTO or ClientRawResponse if raw=true
- Return type
WordAlterationsDTO or ClientRawResponse
- Raises
-
replace
(word_alterations, custom_headers=None, raw=False, **operation_config)[source]¶ Replace alterations data.
- Parameters
word_alterations (list[AlterationsDTO]) – Collection of word alterations.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
None or ClientRawResponse if raw=true
- Return type
None or ClientRawResponse
- Raises
-
replace_alterations_for_kb
(kb_id, word_alterations, custom_headers=None, raw=False, **operation_config)[source]¶ Replace alterations data per Knowledgebase (QnAMaker Managed).
- Parameters
kb_id (str) – Knowledgebase id.
word_alterations (list[AlterationsDTO]) – Collection of word alterations.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
None or ClientRawResponse if raw=true
- Return type
None or ClientRawResponse
- Raises
-
models
= <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/home/vsts/work/1/s/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/.tox/sphinx/lib/python3.6/site-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>¶
-
class
azure.cognitiveservices.knowledge.qnamaker.operations.
KnowledgebaseOperations
(client, config, serializer, deserializer)[source]¶ Bases:
object
KnowledgebaseOperations operations.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
create
(create_kb_payload, custom_headers=None, raw=False, **operation_config)[source]¶ Asynchronous operation to create a new knowledgebase.
- Parameters
create_kb_payload (CreateKbDTO) – Post body of the request.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Operation or ClientRawResponse if raw=true
- Return type
Operation or ClientRawResponse
- Raises
-
delete
(kb_id, custom_headers=None, raw=False, **operation_config)[source]¶ Deletes the knowledgebase and all its data.
- Parameters
- Returns
None or ClientRawResponse if raw=true
- Return type
None or ClientRawResponse
- Raises
-
download
(kb_id, environment, source=None, changed_since=None, custom_headers=None, raw=False, **operation_config)[source]¶ Download the knowledgebase.
- Parameters
kb_id (str) – Knowledgebase id.
environment (str or EnvironmentType) – Specifies whether environment is Test or Prod. Possible values include: ‘Prod’, ‘Test’
source (str) – The source property filter to apply.
changed_since (str) – The last changed status property filter to apply.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
QnADocumentsDTO or ClientRawResponse if raw=true
- Return type
QnADocumentsDTO or ClientRawResponse
- Raises
-
generate_answer
(kb_id, generate_answer_payload, custom_headers=None, raw=False, **operation_config)[source]¶ GenerateAnswer call to query knowledgebase (QnA Maker Managed).
- Parameters
- Returns
QnASearchResultList or ClientRawResponse if raw=true
- Return type
QnASearchResultList or ClientRawResponse
- Raises
-
get_details
(kb_id, custom_headers=None, raw=False, **operation_config)[source]¶ Gets details of a specific knowledgebase.
- Parameters
- Returns
KnowledgebaseDTO or ClientRawResponse if raw=true
- Return type
KnowledgebaseDTO or ClientRawResponse
- Raises
-
list_all
(custom_headers=None, raw=False, **operation_config)[source]¶ Gets all knowledgebases for a user.
- Parameters
- Returns
KnowledgebasesDTO or ClientRawResponse if raw=true
- Return type
KnowledgebasesDTO or ClientRawResponse
- Raises
-
publish
(kb_id, custom_headers=None, raw=False, **operation_config)[source]¶ Publishes all changes in test index of a knowledgebase to its prod index.
- Parameters
- Returns
None or ClientRawResponse if raw=true
- Return type
None or ClientRawResponse
- Raises
-
replace
(kb_id, qn_alist, custom_headers=None, raw=False, **operation_config)[source]¶ Replace knowledgebase contents.
- Parameters
kb_id (str) – Knowledgebase id.
qn_alist (list[QnADTO]) – List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
None or ClientRawResponse if raw=true
- Return type
None or ClientRawResponse
- Raises
-
train
(kb_id, feedback_records=None, custom_headers=None, raw=False, **operation_config)[source]¶ Train call to add suggestions to knowledgebase (QnAMaker Managed).
- Parameters
kb_id (str) – Knowledgebase id.
feedback_records (list[FeedbackRecordDTO]) – List of feedback records.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
None or ClientRawResponse if raw=true
- Return type
None or ClientRawResponse
- Raises
-
update
(kb_id, update_kb, custom_headers=None, raw=False, **operation_config)[source]¶ Asynchronous operation to modify a knowledgebase.
- Parameters
kb_id (str) – Knowledgebase id.
update_kb (UpdateKbOperationDTO) – Post body of the request.
custom_headers (dict) – headers that will be added to the request
raw (bool) – returns the direct response alongside the deserialized response
operation_config – Operation configuration overrides.
- Returns
Operation or ClientRawResponse if raw=true
- Return type
Operation or ClientRawResponse
- Raises
-
models
= <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/home/vsts/work/1/s/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/.tox/sphinx/lib/python3.6/site-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>¶
-
class
azure.cognitiveservices.knowledge.qnamaker.operations.
Operations
(client, config, serializer, deserializer)[source]¶ Bases:
object
Operations operations.
- Parameters
client – Client for service requests.
config – Configuration of service client.
serializer – An object model serializer.
deserializer – An object model deserializer.
-
get_details
(operation_id, custom_headers=None, raw=False, **operation_config)[source]¶ Gets details of a specific long running operation.
- Parameters
- Returns
Operation or ClientRawResponse if raw=true
- Return type
Operation or ClientRawResponse
- Raises
-
models
= <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/home/vsts/work/1/s/sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/.tox/sphinx/lib/python3.6/site-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>¶