forked from jplu/faiss-grpc-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfaiss.proto
43 lines (33 loc) · 778 Bytes
/
faiss.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
syntax = "proto3";
package faiss;
import "google/protobuf/empty.proto";
message HeartbeatResponse {
string message = 1;
};
message Vector {
repeated float float_val = 5;
}
message SearchRequest {
Vector vector = 1;
uint64 top_k = 2;
};
message Neighbor {
uint64 id = 1;
float score = 2;
}
message SearchResponse {
repeated Neighbor neighbors = 2;
};
message SearchByIdRequest {
uint64 id = 1;
uint64 top_k = 2;
};
message SearchByIdResponse {
uint64 request_id = 1;
repeated Neighbor neighbors = 2;
};
service FaissService {
rpc Heartbeat (google.protobuf.Empty) returns (HeartbeatResponse);
rpc Search(SearchRequest) returns (SearchResponse);
rpc SearchById(SearchByIdRequest) returns (SearchByIdResponse);
};