tencent_cloud_chat_robot

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

tencent cloud chat robot

What's this?
This pub package is a plug-in for Tencent Cloud Chat. You can use this plug-in to process robot messages, which supports robot messages with connection jumps and streaming messages similar to chatGPT.
How to use?
Install the package
flutter pub add tencent_cloud_chat_robot
copied to clipboard
Determine whether the message is a robot message
TencentCloudChatRobotPlugin.isRobotMessage(message);
copied to clipboard
Render bot messages
TencentCloudChatRobotPlugin.renderRobotMessage(message);
copied to clipboard
Api list



apiName
Describe
Param




renderRobotMessage
Render the message to the message List
V2TimMessage Instance


isRobotMessage
Determine whether the message is a robot message
V2TimMessage Instance


ignoreRenderMessage
Determine whether the message need ignore for render
V2TimMessage Instance



Dependency package
Tencent_cloud_chat_sdk
Backend interface
Send a Stream message from backend, use Tencent cloud chat,use this api SendMessage To Person,you need to send a custom message. The Data field is a json string like this.
{
"chatbotPlugin": 1,
"src": 2,
"isFinished": 1,// When this field is 0, it means it is not over, and when it is 1, it means it is over.
"chunks": ['hello']
}
copied to clipboard
Then you need add chunks,by ModifyMessage like this
{
"chatbotPlugin": 1,
"src": 2,
"isFinished": 1,// When this field is 0, it means it is not over, and when it is 1, it means it is over.
"chunks": ['hello','this','is','a','robot']
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.