...

/

Publishing, Querying and Deleting the Knowledge Base Using SDK

Publishing, Querying and Deleting the Knowledge Base Using SDK

Learn to create a knowledge base using the Azure QnA maker's Python SDK.

To recap, in the previous lesson we created the knowledge base using the Azure QnA Maker SDK for Python and added one URL as the data source which contains the question-answer pairs. In this lesson, we’ll publish the knowledge base, then get the answers from the QnA maker, and finally, we’ll explore how to delete the knowledge base.

Publishing the knowledge base

We’ll use the qna_maker_knowledge_base_id that we saved from the previous lesson and send this value as a parameter to the publish() method to publish the knowledge base.

Press + to interact
Please provide values for the following:
qna_maker_key
Not Specified...
qna_maker_endpoint
Not Specified...
qna_maker_knowledge_base_id
Not Specified...
qna_maker_client.knowledgebase.publish(kb_id = qna_maker_knowledge_base_id)
print("Knowledge Base is published successfully!")

Explanation:

  • In ...