Skip to content

Commit fc702a2

Browse files
aliyaghoobianMohammad Mahdi Malmasi
authored andcommitted
add counter rpcs to Recommendation service (#52)
* change user_id to username * add counter protos * change counter int size to 64
1 parent 8425433 commit fc702a2

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

protos/ai_services/ai_models/recommendation.proto

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ service Recommendation {
1414
rpc ColdStart(ColdStartRequest) returns (ColdStartResponse);
1515
rpc SimilarItems(SimilarItemsRequest) returns (SimilarItemsResponse);
1616
rpc UserSpecific(UserSpecificRequest) returns (UserSpecificResponse);
17+
rpc SetCounter(SetCounterRequest) returns (SetCounterResponse);
18+
rpc GetCounter(GetCounterRequest) returns (GetCounterResponse);
1719
}
1820

1921
message ModelProperties {
20-
int32 user_id = 1;
22+
string username = 1;
2123
string model_name = 2;
2224
}
2325

@@ -125,3 +127,19 @@ message UserSpecificItem{
125127
message UserSpecificResponse {
126128
repeated UserSpecificItem items = 1;
127129
}
130+
131+
message SetCounterRequest {
132+
ModelProperties model = 1;
133+
int64 counter = 2;
134+
}
135+
136+
message SetCounterResponse { // empty message
137+
}
138+
139+
message GetCounterRequest {
140+
ModelProperties model = 1;
141+
}
142+
143+
message GetCounterResponse {
144+
int64 counter = 1;
145+
}

0 commit comments

Comments
 (0)