Skip to content

Commit 5e6e38a

Browse files
annatischiscai-msft
authored andcommitted
Update question-answering readme links (#20439)
1 parent 150a03e commit 5e6e38a

File tree

1 file changed

+9
-9
lines changed
  • sdk/cognitivelanguage/azure-ai-language-questionanswering

1 file changed

+9
-9
lines changed

sdk/cognitivelanguage/azure-ai-language-questionanswering/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ params = qna.KnowledgeBaseQueryOptions(
7979
question="How long should my Surface battery last?"
8080
)
8181

82-
output = client.query_knowledge_base(
82+
output = client.query_knowledgebase(
8383
params,
8484
project_name="FAQ",
8585
)
@@ -93,18 +93,17 @@ You can set additional properties on `KnowledgeBaseQueryOptions` to limit the nu
9393

9494
### Ask a follow-up question
9595

96-
If your knowledge base is configured for [chit-chat][questionanswering_docs_chat], you can ask a follow-up question provided the previous question-answering ID and, optionally, the exact question the user asked:
96+
If your knowledge base is configured for [chit-chat][questionanswering_docs_chat], the answers from the knowledge base may include suggested [prompts for follow-up questions][questionanswering_refdocs_prompts] to initiate a conversation. You can ask a follow-up question by providing the ID of your chosen answer as the context for the continued conversation:
9797

9898
```python
9999
params = qna.models.KnowledgeBaseQueryOptions(
100100
question="How long should charging take?"
101101
context=qna.models.KnowledgeBaseAnswerRequestContext(
102-
previous_user_query="How long should my Surface battery last?",
103102
previous_qna_id=previous_answer.id
104103
)
105104
)
106105

107-
output = client.query_knowledge_base(
106+
output = client.query_knowledgebase(
108107
params,
109108
project_name="FAQ"
110109
)
@@ -127,7 +126,7 @@ params = qna.KnowledgeBaseQueryOptions(
127126
question="How long should my Surface battery last?"
128127
)
129128

130-
output = await client.query_knowledge_base(
129+
output = await client.query_knowledgebase(
131130
params,
132131
project_name="FAQ"
133132
)
@@ -148,7 +147,7 @@ For example, if you submit a question to a non-existant knowledge base, a `400`
148147
from azure.core.exceptions import HttpResponseError
149148

150149
try:
151-
client.query_knowledge_base(
150+
client.query_knowledgebase(
152151
params,
153152
project_name="invalid-knowledge-base"
154153
)
@@ -198,14 +197,15 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
198197
[azure_core_ref_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html
199198
[azure_core_readme]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md
200199
[pip_link]:https://pypi.org/project/pip/
201-
[questionanswering_client_class]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_question_answering_client.py#L27
200+
[questionanswering_client_class]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-questionanswering/1.0.0b1/azure.ai.language.questionanswering.html#azure.ai.language.questionanswering.QuestionAnsweringClient
201+
[questionanswering_refdocs_prompts]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-questionanswering/1.0.0b1/azure.ai.language.questionanswering.models.html#azure.ai.language.questionanswering.models.KnowledgeBaseAnswerDialog
202202
[questionanswering_client_src]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-questionanswering/
203203
[questionanswering_docs]: https://azure.microsoft.com/services/cognitive-services/qna-maker/
204204
[questionanswering_docs_chat]: https://docs.microsoft.com/azure/cognitive-services/qnamaker/how-to/chit-chat-knowledge-base
205205
[questionanswering_docs_demos]: https://azure.microsoft.com/services/cognitive-services/qna-maker/#demo
206206
[questionanswering_docs_features]: https://azure.microsoft.com/services/cognitive-services/qna-maker/#features
207-
[questionanswering_pypi_package]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-questionanswering/
208-
[questionanswering_refdocs]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-questionanswering/
207+
[questionanswering_pypi_package]: https://pypi.org/project/azure-ai-language-questionanswering/
208+
[questionanswering_refdocs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-questionanswering/1.0.0b1/azure.ai.language.questionanswering.html
209209
[questionanswering_rest_docs]: https://docs.microsoft.com/rest/api/cognitiveservices-qnamaker/
210210
[questionanswering_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/README.md
211211

0 commit comments

Comments
 (0)