| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- syntax = "proto3";
- package api.ai;
- import "google/api/annotations.proto";
- import "google/protobuf/struct.proto";
- import "google/protobuf/empty.proto";
- option go_package = "git.ikuban.com/server/pw-protobuf/api/ai;ai";
- option java_multiple_files = true;
- option java_package = "api.ai";
- service Ai {
- // 查询AI模板
- rpc FindAITemplate (FindAITemplateRequest) returns (FindAITemplateReply){
- option (google.api.http) = {
- post: "/api/ai/template/list",
- body:"*"
- };
- };
- // 创建AI
- rpc CreateAIRobot (CreateAIRobotRequest) returns (AIRobotIDReply){
- option (google.api.http) = {
- post: "/api/ai/create",
- body:"*"
- };
- };
- // 销毁AI
- rpc DeleteAIRobot (AIRobotIDRequest) returns (google.protobuf.Empty){
- option (google.api.http) = {
- post: "/api/ai/delete",
- body:"*"
- };
- };
- // 更新AI
- rpc UpdateAIRobot (UpdateAIRobotRequest) returns (AIRobotIDReply){
- option (google.api.http) = {
- post: "/api/ai/update",
- body:"*"
- };
- };
- // 查询AI机器人列表
- rpc FindAIRobotList (FindAIRobotListRequest) returns (AIRobotList){
- option (google.api.http) = {
- post: "/api/ai/find/list",
- body:"*"
- };
- };
- // 查询AI机器人
- rpc GetAIRobot (AIRobotIDRequest) returns (AIRobotInfo){
- option (google.api.http) = {
- post: "/api/ai/find/info",
- body:"*"
- };
- };
- // 查询AI聊天记录
- rpc FindAIChatRecordList (FindAIChatRecordListRequest) returns (AIRecordListReply){
- option (google.api.http) = {
- post: "/api/ai/chat/record",
- body:"*"
- };
- };
- // 发送消息给ai
- rpc SendAIChat (SendAIChatRequest) returns (google.protobuf.Empty){
- option (google.api.http) = {
- post: "/api/ai/send",
- body:"*"
- };
- };
- }
- message AIRobotIDReply{
- int64 id = 1;
- }
- message AIRecordListReply{
- repeated AIRecordInfo list = 1;
- int64 nextId = 2;
- }
- message AIRecordInfo{
- int64 messageId = 1; // 消息的ID
- string msgType = 2; // 消息类型
- Message message = 3; // 消息的结构
- int64 robotId = 4; // 机器人ID
- bool isSelf = 5; // 是否是自己
- int64 sendTime = 6; // 发送时间
- string status = 7; // 消息状态
- string statusMsg = 8;// 状态说明
- }
- message Message{
- string content = 1; // 文本内容
- }
- message SendAIChatRequest{
- int64 id = 1;
- string message = 2;// 消息
- }
- message FindAIChatRecordListRequest{
- int64 nextId = 1;
- int64 offset = 2;
- int64 id = 3;
- }
- message AIRobotList{
- int64 nextId = 1;
- repeated AIRobotInfo list = 2;
- }
- message AIRobotInfo{
- int64 id = 1;
- string name = 2;// ai名称
- string avatarUrl = 3;// ai头像
- int64 sex = 4;// ai性别
- int64 age = 5;// ai年龄
- string constellation = 6;// ai星座
- int64 lastTime = 7;// 上次发送时间
- string lastContent = 8;// 上次发送的内容
- int64 unreadNum = 9;// 未读
- string status = 10;// 状态
- int64 createTime = 11;// 创建时间
- }
- message FindAIRobotListRequest{
- int64 nextId = 1;
- int64 offset = 2;
- }
- message UpdateAIRobotRequest{
- int64 id = 1;
- string aiName = 2;// 自定义ai名称
- string userName = 3;// ai对我的称呼
- }
- message AIRobotIDRequest{
- int64 id = 1;
- }
- message FindAITemplateRequest{
- int64 nextId = 1;
- int64 offset = 2;
- int64 sex = 3;// 性别
- }
- message FindAITemplateReply{
- int64 nextId = 1;
- repeated AITemplateInfo list= 2;
- }
- message AITemplateInfo{
- int64 id = 1;// ai模板ID
- string name = 2;// ai名称
- string avatarUrl = 3;// ai头像
- int64 sex = 4;// ai性别
- int64 age = 5;// ai年龄
- repeated string label = 6;// ai标签
- string description = 7;// ai描述
- string constellation = 8;// ai星座
- repeated Relation relationList = 9;// ai关系列表
- }
- message Relation{
- int64 id = 1;// 关系ID
- string picture = 2;// 图片
- string relation = 3;// 关系
- }
- message CreateAIRobotRequest{
- int64 templateId = 1;// ai模板ID
- string aiName = 2;// 自定义ai名称
- string userName = 3;// ai对我的称呼
- int64 relationId = 4;// 关系ID
- }
|