feat: vertexai

This commit is contained in:
Zheng Kai
2023-09-01 17:33:51 +08:00
parent e620651059
commit bdf34ab55b
18 changed files with 394 additions and 25 deletions

View File

@@ -4,9 +4,21 @@ package pb;
message VaChatReq {
string system = 1;
repeated string user = 2;
string user = 2;
bool noCache = 3;
VaParam param = 4;
bool debug = 5;
}
message VaChatRsp {
string content = 1;
bool blocked = 2;
}
message VaChatWebRsp {
bool ok = 1;
VaChatRsp data = 2;
VaDebug debug = 3;
string error = 4;
}
message VaParam {
@@ -15,3 +27,19 @@ message VaParam {
float topP = 3;
uint32 topK = 4;
}
message VaDebug {
uint32 costMs = 1;
string cahceFile = 2;
uint32 inputChar = 3;
uint32 inputToken = 4;
uint32 outputChar = 5;
uint32 outputToken = 6;
repeated VaSafety safety = 7;
uint32 totalMs = 8;
}
message VaSafety {
string category = 1;
float score = 2;
}