다음을 통해 공유


ConversationAnalysisClient.AnalyzeConversationSubmitOperation Method

Definition

Overloads

AnalyzeConversationSubmitOperation(WaitUntil, AnalyzeConversationOperationInput, CancellationToken)

Analyzes the input conversation utterance.

AnalyzeConversationSubmitOperation(WaitUntil, RequestContent, RequestContext)

[Protocol Method] Analyzes the input conversation utterance.

AnalyzeConversationSubmitOperation(WaitUntil, AnalyzeConversationOperationInput, CancellationToken)

Source:
ConversationAnalysisClient.cs

Analyzes the input conversation utterance.

public virtual Azure.Operation AnalyzeConversationSubmitOperation (Azure.WaitUntil waitUntil, Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationInput analyzeConversationOperationInput, System.Threading.CancellationToken cancellationToken = default);
abstract member AnalyzeConversationSubmitOperation : Azure.WaitUntil * Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationInput * System.Threading.CancellationToken -> Azure.Operation
override this.AnalyzeConversationSubmitOperation : Azure.WaitUntil * Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationInput * System.Threading.CancellationToken -> Azure.Operation
Public Overridable Function AnalyzeConversationSubmitOperation (waitUntil As WaitUntil, analyzeConversationOperationInput As AnalyzeConversationOperationInput, Optional cancellationToken As CancellationToken = Nothing) As Operation

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

analyzeConversationOperationInput
AnalyzeConversationOperationInput

The input for the analyze conversations operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

analyzeConversationOperationInput is null.

Examples

This sample shows how to call AnalyzeConversationSubmitOperation.

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

AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[]
{
    new TextConversation("<id>", "<language>", new TextConversationItem[]
    {
        new TextConversationItem("<id>", "<participantId>", "<text>")
    })
}), new AnalyzeConversationOperationAction[]
{
    new PiiOperationAction()
});
Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput);

This sample shows how to call AnalyzeConversationSubmitOperation with all parameters.

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

AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[]
{
    new TextConversation("<id>", "<language>", new TextConversationItem[]
    {
        new TextConversationItem("<id>", "<participantId>", "<text>")
        {
            Language = "<language>",
            Modality = InputModality.Transcript,
            Role = ParticipantRole.Customer,
        }
    })
    {
        Domain = ConversationDomain.Finance,
    }
}), new AnalyzeConversationOperationAction[]
{
    new PiiOperationAction
    {
        ActionContent = new ConversationPiiActionContent
        {
            LoggingOptOut = true,
            ModelVersion = "<modelVersion>",
            PiiCategories = {ConversationPiiCategories.Address},
            RedactAudioTiming = true,
            RedactionSource = TranscriptContentType.Lexical,
            RedactionCharacter = RedactionCharacter.ExclamationPoint,
            ExcludePiiCategories = {ConversationPiiCategoryExclusions.Address},
        },
        Name = "<taskName>",
    }
})
{
    DisplayName = "<displayName>",
};
Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput);

Applies to

AnalyzeConversationSubmitOperation(WaitUntil, RequestContent, RequestContext)

Source:
ConversationAnalysisClient.cs

[Protocol Method] Analyzes the input conversation utterance.

public virtual Azure.Operation AnalyzeConversationSubmitOperation (Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member AnalyzeConversationSubmitOperation : Azure.WaitUntil * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Operation
override this.AnalyzeConversationSubmitOperation : Azure.WaitUntil * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Operation
Public Overridable Function AnalyzeConversationSubmitOperation (waitUntil As WaitUntil, content As RequestContent, Optional context As RequestContext = Nothing) As Operation

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

content
RequestContent

The content to send as the body of the request.

context
RequestContext

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

Returns

The Operation representing an asynchronous operation on the service.

Exceptions

content is null.

Service returned a non-success status code.

Examples

This sample shows how to call AnalyzeConversationSubmitOperation.

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

using RequestContent content = RequestContent.Create(new
{
    analysisInput = new
    {
        conversations = new object[]
        {
            new
            {
                modality = "text",
                conversationItems = new object[]
                {
                    new
                    {
                        id = "<id>",
                        participantId = "<participantId>",
                        text = "<text>",
                    }
                },
                id = "<id>",
                language = "<language>",
            }
        },
    },
    tasks = new object[]
    {
        new
        {
            kind = "ConversationalPIITask",
        }
    },
});
Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content);

This sample shows how to call AnalyzeConversationSubmitOperation with all parameters and request content.

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

using RequestContent content = RequestContent.Create(new
{
    displayName = "<displayName>",
    analysisInput = new
    {
        conversations = new object[]
        {
            new
            {
                modality = "text",
                conversationItems = new object[]
                {
                    new
                    {
                        id = "<id>",
                        participantId = "<participantId>",
                        language = "<language>",
                        modality = "transcript",
                        role = "customer",
                        text = "<text>",
                    }
                },
                id = "<id>",
                language = "<language>",
                domain = "finance",
            }
        },
    },
    tasks = new object[]
    {
        new
        {
            kind = "ConversationalPIITask",
            parameters = new
            {
                loggingOptOut = true,
                modelVersion = "<modelVersion>",
                piiCategories = new object[]
                {
                    "Address"
                },
                redactAudioTiming = true,
                redactionSource = "lexical",
                redactionCharacter = "!",
                excludePiiCategories = new object[]
                {
                    "Address"
                },
            },
            taskName = "<taskName>",
        }
    },
});
Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content);

Applies to