次の方法で共有


ConversationAnalysisClient.GetAnalyzeConversationJobStatus Method

Definition

Overloads

GetAnalyzeConversationJobStatus(Guid, Nullable<Boolean>, CancellationToken)

Get analysis status and results.

GetAnalyzeConversationJobStatus(Guid, Nullable<Boolean>, RequestContext)

[Protocol Method] Get analysis status and results

GetAnalyzeConversationJobStatus(Guid, Nullable<Boolean>, CancellationToken)

Source:
ConversationAnalysisClient.cs

Get analysis status and results.

public virtual Azure.Response<Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationState> GetAnalyzeConversationJobStatus (Guid jobId, bool? showStatistics = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAnalyzeConversationJobStatus : Guid * Nullable<bool> * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationState>
override this.GetAnalyzeConversationJobStatus : Guid * Nullable<bool> * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationState>
Public Overridable Function GetAnalyzeConversationJobStatus (jobId As Guid, Optional showStatistics As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AnalyzeConversationOperationState)

Parameters

jobId
Guid

job ID.

showStatistics
Nullable<Boolean>

(Optional) if set to true, response will contain request and document level statistics.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetAnalyzeConversationJobStatus.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential);

Response<AnalyzeConversationOperationState> response = client.GetAnalyzeConversationJobStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"));

This sample shows how to call GetAnalyzeConversationJobStatus with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential);

Response<AnalyzeConversationOperationState> response = client.GetAnalyzeConversationJobStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), showStatistics: true);

Remarks

Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task.

Applies to

GetAnalyzeConversationJobStatus(Guid, Nullable<Boolean>, RequestContext)

Source:
ConversationAnalysisClient.cs
Source:
ConversationAnalysisClient.cs

[Protocol Method] Get analysis status and results

public virtual Azure.Response GetAnalyzeConversationJobStatus (Guid jobId, bool? showStats = default, Azure.RequestContext context = default);
public virtual Azure.Response GetAnalyzeConversationJobStatus (Guid jobId, bool? showStatistics, Azure.RequestContext context);
abstract member GetAnalyzeConversationJobStatus : Guid * Nullable<bool> * Azure.RequestContext -> Azure.Response
override this.GetAnalyzeConversationJobStatus : Guid * Nullable<bool> * Azure.RequestContext -> Azure.Response
abstract member GetAnalyzeConversationJobStatus : Guid * Nullable<bool> * Azure.RequestContext -> Azure.Response
override this.GetAnalyzeConversationJobStatus : Guid * Nullable<bool> * Azure.RequestContext -> Azure.Response
Public Overridable Function GetAnalyzeConversationJobStatus (jobId As Guid, Optional showStats As Nullable(Of Boolean) = Nothing, Optional context As RequestContext = Nothing) As Response
Public Overridable Function GetAnalyzeConversationJobStatus (jobId As Guid, showStatistics As Nullable(Of Boolean), context As RequestContext) As Response

Parameters

jobId
Guid

job ID.

showStatsshowStatistics
Nullable<Boolean>

(Optional) if set to true, response will contain request and document level statistics.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetAnalyzeConversationJobStatus and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential);

Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null, null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString());

This sample shows how to call GetAnalyzeConversationJobStatus with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential);

Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), true, null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("displayName").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("expirationDateTime").ToString());
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("nextLink").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("items")[0].GetProperty("lastUpdateDateTime").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("items")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("items")[0].GetProperty("taskName").ToString());
Console.WriteLine(result.GetProperty("tasks").GetProperty("items")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("statistics").GetProperty("documentsCount").ToString());
Console.WriteLine(result.GetProperty("statistics").GetProperty("validDocumentsCount").ToString());
Console.WriteLine(result.GetProperty("statistics").GetProperty("erroneousDocumentsCount").ToString());
Console.WriteLine(result.GetProperty("statistics").GetProperty("transactionsCount").ToString());
Console.WriteLine(result.GetProperty("statistics").GetProperty("conversationsCount").ToString());
Console.WriteLine(result.GetProperty("statistics").GetProperty("validConversationsCount").ToString());
Console.WriteLine(result.GetProperty("statistics").GetProperty("erroneousConversationsCount").ToString());

Remarks

Additional information can be found in the service REST API documentation: https://learn.microsoft.com/rest/api/language/2023-04-01/analyze-conversation/job-status

Applies to