Chat - RunMVChat
Overview
Chat Interface
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is RunMVChat . | Yes |
PublicKey | string | The user’s public key can be obtained from Console  | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Role.N | string | Transmit the dialogue list collection from old to new according to time, which needs to correspond one-to-one with Content Role is the role of the author of this message, the enumeration value is user or assistant - user refers to the information input by the user role - assistant refers to the information returned by the model. | Yes |
Content.N | string | Transmit the dialogue list set from old to new according to the time, which needs to correspond one-to-one with Role. Content is the specific content of this message. | Yes |
AppID | string | Application ID | Yes |
SessionID | int | Session ID (A new session will be created by default if left blank) | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Msg | string | Status Code Description | Yes |
ID | int | Unique Message Identifier | Yes |
SessionID | int | Session ID | Yes |
Response | string | Reply Content | Yes |
Time | int | Time | Yes |
Example
Request Example
https://api.ucloud-global.com/?Action=RunMVChat
&Prompt=DTAUtpZW
&AppID=gjvyCaRg
&SessionID=3
&Content=uOsqGAyA
Response Example
{
"Action": "RunMVChatResponse",
"ID": 6,
"Msg": "EWskKMcN",
"Response": "EFZUczjm",
"RetCode": 0,
"SessionID": 6,
"Time": 3
}