azure.cognitiveservices.knowledge.qnamaker.operations module¶
-
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 '/usr/lib/python3/dist-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:
-
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:
-
models
= <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/usr/lib/python3/dist-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, 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’
- 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:
-
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:
-
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 '/usr/lib/python3/dist-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 '/usr/lib/python3/dist-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>¶