tencent_cloud_chat_robot 1.1.0 copy "tencent_cloud_chat_robot: ^1.1.0" to clipboard
tencent_cloud_chat_robot: ^1.1.0 copied to clipboard

A component for Tencent clout chat robot message

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

Determine whether the message is a robot message

TencentCloudChatRobotPlugin.isRobotMessage(message);

Render bot messages

TencentCloudChatRobotPlugin.renderRobotMessage(message);

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']
}

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']
}
2
likes
0
points
59
downloads

Publisher

verified publishertrtc.io

Weekly Downloads

A component for Tencent clout chat robot message

Homepage

License

unknown (license)

Dependencies

flutter, tencent_cloud_chat_sdk

More

Packages that depend on tencent_cloud_chat_robot