Skip to main content

RunCompletionMessage

You can call the Tongyi Xiaomi CCAI-Conversation Analysis AIO application using the Message protocol format to obtain conversation summaries, extract key information, and generate quality inspection and conversation analysis results. The application supports HTTP calls to provide responses. You can use either the standard HTTP or HTTP Server-Sent Events (SSE) protocol.

Operation description

Before you use this API, make sure you understand the billing methods and pricing of the Tongyi Xiaomi CCAI-Conversation Analysis AIO product. Prerequisites
  1. Activate the Tongyi Xiaomi CCAI-Conversation Analysis AIO service.
  2. Create an application: create a Tongyi Xiaomi CCAI-Conversation Analysis AIO application in the Application Center and obtain the APP-ID and WORKSPACE-ID: Obtain the APP-ID and WORKSPACE-ID.

Debug

You can run this API directly in OpenAPI Explorer without having to calculate signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples. Debug

Authorization information

No authorization information is exposed for the current API.

Request syntax

POST /{workspaceId}/ccai/app/{appId}/completion_message HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample
workspaceIdstringYes

The workspace ID.

llm-ik******RVYCKzt
appIdstringYes

The application ID.

097d65c9c7004f8dad2b454850ac232b
bodyobjectNo

schema of request body

Messagesarray<object>Yes

The list of messages for the model request.

objectNo

The structure of a message.

ContentstringYes

The content of the prompt.

e.g. Role=system, Content=You are a helpful assistant. Role=user, Content=Read the following conversation and perform the instructed task.
RolestringYes

(Conversation role) Valid values: user (customer), assistant (customer service representative), system (system message), function (function).

user
ModelCodestringNo

The model specification.

tyxmTurbo
StreambooleanNo

If true, SSE responses are enabled. Default value: false.

false

Response parameters

NameTypeDescriptionExample
object

The structure of the response.

FinishReasonstring

For streaming output, the value is null while the model is generating. If generation ends due to a stop token, the value is stop.

stop
RequestIdstring

The unique ID generated by the system to identify this request.

17204B98-xxxx-4F9A-8464-2446A84821CA
Textstring

The result returned by the application.

The conversation appears to be a discussion between a customer service representative and a customer about a service or product, but the specific content is difficult to understand because the conversation is scattered and abstract.

Examples

Success response JSON format
{
  "FinishReason": "stop",
  "RequestId": "17204B98-xxxx-4F9A-8464-2446A84821CA\n",
  "Text": "这段对话似乎是客服与客户之间关于一个服务或产品的讨论,但具体内容难以明确理解,因为对话中的言语比较零散和抽象。",
  "inputTokens": "",
  "outputTokens": "",
  "totalTokens": ""
}

Error codes

HTTP status codeError codeError messageDescription
400CCAI.InvalidParam.NotExistThe specified parameter %s is not valid.The request parameter does not exist.
400CCAI.Throttling.QpmTrigger QPM flow restriction. Please purchase higher QPM for paid API. If free API has special requirements, please contact us through DingTalk group (62730018475).QPM throttling is triggered. For paid APIs, purchase a higher QPM. If you have special requirements for a free API, contact us through the DingTalk group (62730018475).
400CCAI.Throttling.QpsTrigger current QPS limit, pay API please buy higher QPS, the free API if you have special requirements, please contact us through the DingTalk group (62730018475).Throttling is triggered. For paid APIs, purchase a higher QPS. If you have special requirements for a free API, contact us through the DingTalk group (62730018475).
400CCAI.ParamInvalid.IllegalParamValueThe parameter value of the request API is illegal %s.The request parameter is invalid.
403CCAI.IllegalPermission.NoAuthUser not authorized to operate on the specified resource.The user is not authorized to operate on the specified resource.
403CCAI.ParamNotfound.MissParamParameter verification failed, The specified parameter %s is missing.Parameter validation failed. The specified parameter is missing.
403CCAI.TenantPermission.NoAuthThe current account does not have the permission to specify the business space. Please authorize the business space permission.The current account does not have permission to access the specified workspace. Grant the workspace permissions.
500CCAI.InternalErrorThe request processing has failed due to some unknown error, exception or failure.Internal system error. Try again later.
Visit the Error Center to view more error codes.