Skip to Content

Chat - RunMVChat

Overview

Chat Interface

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is RunMVChat.Yes
PublicKeystringThe user’s public key can be obtained from Console Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
Role.NstringTransmit 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.NstringTransmit 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
AppIDstringApplication IDYes
SessionIDintSession ID (A new session will be created by default if left blank)No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
MsgstringStatus Code DescriptionYes
IDintUnique Message IdentifierYes
SessionIDintSession IDYes
ResponsestringReply ContentYes
TimeintTimeYes

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 }