You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -67,7 +67,7 @@ The `azure-ai-language-conversation` client library provides both synchronous an
67
67
68
68
The following examples show common scenarios using the `client`[created above](#create-conversationanalysisclient).
69
69
70
-
### Analyze a conversation with a Conversation App
70
+
### Analyze Text with a Conversation App
71
71
If you would like to extract custom intents and entities from a user utterance, you can call the `client.analyze_conversations()` method with your conversation's project name as follows:
72
72
73
73
```python
@@ -76,45 +76,68 @@ import os
76
76
from azure.core.credentials import AzureKeyCredential
77
77
78
78
from azure.ai.language.conversations import ConversationAnalysisClient
79
-
from azure.ai.language.conversations.models import ConversationAnalysisOptions
79
+
from azure.ai.language.conversations.models import (
If you would like to pass the user utterance to your orchestrator (worflow) app, you can call the `client.analyze_conversations()` method with your orchestration's project name. The orchestrator project simply orchestrates the submitted user utterance between your language apps (Luis, Conversation, and Question Answering) to get the best response according to the user intent. See the next example:
120
143
@@ -124,98 +147,58 @@ import os
124
147
from azure.core.credentials import AzureKeyCredential
125
148
126
149
from azure.ai.language.conversations import ConversationAnalysisClient
127
-
from azure.ai.language.conversations.models import ConversationAnalysisOptions
### Analyze conversation with a Orchestration (Direct) App
163
-
164
-
If you would like to use an orchestrator (orchestration) app, and you want to call a specific one of your language apps directly, you can call the `client.analyze_conversations()` method with your orchestration's project name and the diirect target name which corresponds to your one of you language apps as follows:
165
-
166
-
```python
167
-
# import libraries
168
-
import os
169
-
from azure.core.credentials import AzureKeyCredential
170
-
171
-
from azure.ai.language.conversations import ConversationAnalysisClient
172
-
from azure.ai.language.conversations.models import ConversationAnalysisOptions
if top_intent_object.target_kind =="question_answering":
195
+
print("\nview qna result:")
196
+
qna_result = top_intent_object.result
197
+
for answer in qna_result.answers:
198
+
print("\nanswer: {}".format(answer.answer))
199
+
print("answer: {}".format(answer.confidence))
216
200
```
217
201
218
-
219
202
## Optional Configuration
220
203
221
204
Optional keyword arguments can be passed in at the client and per-operation level. The azure-core [reference documentation][azure_core_ref_docs] describes available configurations for retries, logging, transport protocols, and more.
0 commit comments