syntax = "proto3"; package proto; //新增一个可选的package声明符,用来防止不同的消息类型有命名冲突 option go_package = "./pkg/proto;proto"; //这个选项表明生成go结构体所在的包 // import "google/protobuf/any.proto"; message Status { int32 code = 1; string msg = 2; } // 经纬度 message SemanticRequestLbs { double longitude = 1; double latitude = 2; } message AddressInfo { string province = 1; string city = 2; string county = 3; } message SemanticRequest { string macWifi = 1; string macVoice = 2; string query = 3; string ip = 4; string testID = 5; string originQuery = 6; string mid = 7; string requestId = 8; SemanticRequestLbs lbs = 9; string vender = 10; string appKey = 11; // 云小微 string accessToken = 12; string qua = 13; string auth = 14; string dsn = 15; string guid = 16; bool exist = 17; // 授权信息是否存在 string tRequestId = 18; // 腾讯v2的requestId string requestType = 19; // 腾讯nlp websocket RequestType string commType = 20; // 腾讯nlp websocket CommType string characterID = 21; // 腾讯nlp websocket Common.CharacterID string event = 22; // 腾讯nlp websocket Semantic.Event message Native { string name = 1; string seqID = 2; int32 code = 3; string message = 4; string dataVersion = 5; message Data { // TODO: Native API协议数据, 由云端和客户端一起定义 } Data data = 6; } Native native = 23; // 腾讯nlp websocket Payload.Nativate message SDKExtend { int32 carDOA = 1; string lastRspType = 2; string lastRspResult = 3; int32 lastSessionStatus = 4; string lastCompleteCmdResult = 5; } SDKExtend sdkExtend = 24; // 腾讯nlp websocket Payload.SDKExtend AddressInfo addressInfo = 25; string language = 26; string homeId = 27; } message SemanticResponse { Status status = 1; SemanticData data = 2; } message SemanticData { string semanticRespJsonData = 1; } service TencentNlu { rpc TencentNluParse (SemanticRequest) returns (SemanticResponse) {} rpc TencentNluParseStream (stream SemanticRequest) returns (stream SemanticResponse) {} }