KnowledgebaseOperations Class
KnowledgebaseOperations operations.
- Inheritance
-
builtins.objectKnowledgebaseOperations
Constructor
KnowledgebaseOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Methods
| create |
Asynchronous operation to create a new knowledgebase. |
| delete |
Deletes the knowledgebase and all its data. |
| download |
Download the knowledgebase. |
| generate_answer |
GenerateAnswer call to query knowledgebase (QnA Maker Managed). |
| get_details |
Gets details of a specific knowledgebase. |
| list_all |
Gets all knowledgebases for a user. |
| publish |
Publishes all changes in test index of a knowledgebase to its prod index. |
| replace |
Replace knowledgebase contents. |
| train |
Train call to add suggestions to knowledgebase (QnAMaker Managed). |
| update |
Asynchronous operation to modify a knowledgebase. |
create
Asynchronous operation to create a new knowledgebase.
create(create_kb_payload, custom_headers=None, raw=False, **operation_config)
Parameters
- operation_config
Operation configuration overrides.
Returns
Operation or ClientRawResponse if raw=true
Return type
Exceptions
delete
Deletes the knowledgebase and all its data.
delete(kb_id, custom_headers=None, raw=False, **operation_config)
Parameters
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
download
Download the knowledgebase.
download(kb_id, environment, source=None, changed_since=None, custom_headers=None, raw=False, **operation_config)
Parameters
- environment
- str or EnvironmentType
Specifies whether environment is Test or Prod. Possible values include: 'Prod', 'Test'
- operation_config
Operation configuration overrides.
Returns
QnADocumentsDTO or ClientRawResponse if raw=true
Return type
Exceptions
generate_answer
GenerateAnswer call to query knowledgebase (QnA Maker Managed).
generate_answer(kb_id, generate_answer_payload, custom_headers=None, raw=False, **operation_config)
Parameters
- operation_config
Operation configuration overrides.
Returns
QnASearchResultList or ClientRawResponse if raw=true
Return type
Exceptions
get_details
Gets details of a specific knowledgebase.
get_details(kb_id, custom_headers=None, raw=False, **operation_config)
Parameters
- operation_config
Operation configuration overrides.
Returns
KnowledgebaseDTO or ClientRawResponse if raw=true
Return type
Exceptions
list_all
Gets all knowledgebases for a user.
list_all(custom_headers=None, raw=False, **operation_config)
Parameters
- operation_config
Operation configuration overrides.
Returns
KnowledgebasesDTO or ClientRawResponse if raw=true
Return type
Exceptions
publish
Publishes all changes in test index of a knowledgebase to its prod index.
publish(kb_id, custom_headers=None, raw=False, **operation_config)
Parameters
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
replace
Replace knowledgebase contents.
replace(kb_id, qn_alist, custom_headers=None, raw=False, **operation_config)
Parameters
List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
train
Train call to add suggestions to knowledgebase (QnAMaker Managed).
train(kb_id, feedback_records=None, custom_headers=None, raw=False, **operation_config)
Parameters
- operation_config
Operation configuration overrides.
Returns
None or ClientRawResponse if raw=true
Return type
Exceptions
update
Asynchronous operation to modify a knowledgebase.
update(kb_id, update_kb, custom_headers=None, raw=False, **operation_config)
Parameters
- operation_config
Operation configuration overrides.
Returns
Operation or ClientRawResponse if raw=true
Return type
Exceptions
Attributes
models
models = <module 'azure.cognitiveservices.knowledge.qnamaker.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.12\\x64\\lib\\site-packages\\azure\\cognitiveservices\\knowledge\\qnamaker\\models\\__init__.py'>
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ