File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed
Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ GRPC_SERVER_DIMENSION=3 // required
33
44GRPC_SERVER_HOST = localhost // defaults to 127.0.0.1 aka localhost
55GRPC_SERVER_PORT = 8080 // defaults to 8080
6- GRPC_SERVER_STORAGE_TYPE = inmemory // (inmemory/rocksdb) defaults to inmemory
6+ GRPC_SERVER_STORAGE_TYPE = inmemory // (inmemory/rocksdb) defaults to ' inmemory'
77GRPC_SERVER_INDEX_TYPE = flat // defaults to flat
88GRPC_SERVER_DATA_PATH = data // defaults to a temporary directory
99GRPC_SERVER_LOGGING = true // defaults to true
Original file line number Diff line number Diff line change 1+ ### Build
2+
3+ Clone the repository and run ` cargo build --bin grpc_server ` to build the binary of the gRPC server crate.
4+
5+ You can than then start the gRPC server by running:
6+
7+ ``` bash
8+ cargo run --bin grpc_server
9+ ```
10+
11+ ### Configuration
12+
13+ Use the [ .sample.env] ( .sample.env ) shown below as a reference to set your environment variables in a ` .env ` file.
14+
15+ ``` bash
16+ GRPC_SERVER_ROOT_PASSWORD=123 // required
17+ GRPC_SERVER_DIMENSION=3 // required
18+
19+ GRPC_SERVER_HOST=localhost // defaults to 127.0.0.1 aka localhost
20+ GRPC_SERVER_PORT=8080 // defaults to 8080
21+ GRPC_SERVER_STORAGE_TYPE=inmemory // (inmemory/rocksdb) defaults to inmemory
22+ GRPC_SERVER_INDEX_TYPE=flat // defaults to flat
23+ GRPC_SERVER_DATA_PATH=data // defaults to a temporary directory
24+ GRPC_SERVER_LOGGING=true // defaults to true
25+
26+ ```
27+
28+
29+ ### Testing
30+
31+ The [ vector-db.proto] ( proto/vector-db.proto ) can be imported into any gRPC client.
Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ impl VectorDb for VectorDBService {
7171
7272 let point = point_opt. unwrap ( ) ;
7373
74- // TODO: handle payload properly once we decide to define it
7574 Ok ( Response :: new ( Point {
7675 id : Some ( PointId { id : point. id } ) ,
7776 vector : Some ( DenseVector {
@@ -89,8 +88,6 @@ impl VectorDb for VectorDBService {
8988
9089 let search_request = request. into_inner ( ) ;
9190
92- //TODO: distance function panics if different dimensions; no dimension enforcement
93-
9491 // extract request arguments
9592 let query_vect = search_request. query_vector . unwrap ( ) ;
9693 let similarity = SIMILARITY_PROTOBUFF_MAP [ search_request. similarity as usize ] ;
You can’t perform that action at this time.
0 commit comments