diff --git a/proto/controlclient.proto b/proto/controlclient.proto index acf726f..bc38199 100644 --- a/proto/controlclient.proto +++ b/proto/controlclient.proto @@ -21,21 +21,29 @@ service ScsControl { rpc ListIndexes(_ListIndexesRequest) returns (_ListIndexesResponse) {} } -message _CreateIndexRequest { - message _EuclideanSimilarity{} +message _SimilarityMetric { + message _EuclideanSimilarity { + } - message _InnerProduct{} + message _InnerProduct { + } + + message _CosineSimilarity { + } - message _CosineSimilarity{} - string index_name = 1; - uint64 num_dimensions = 2; oneof similarity_metric { - _EuclideanSimilarity euclidean_similarity = 3; - _InnerProduct inner_product = 4; - _CosineSimilarity cosine_similarity = 5; + _EuclideanSimilarity euclidean_similarity = 1; + _InnerProduct inner_product = 2; + _CosineSimilarity cosine_similarity = 3; } } +message _CreateIndexRequest { + string index_name = 1; + uint64 num_dimensions = 2; + _SimilarityMetric similarity_metric = 3; +} + message _CreateIndexResponse { } @@ -50,7 +58,12 @@ message _ListIndexesRequest { } message _ListIndexesResponse { - repeated string index_names = 1; + message _Index { + string index_name = 1; + uint64 num_dimensions = 2; + _SimilarityMetric similarity_metric = 3; + } + repeated _Index indexes = 1; } message _DeleteCacheRequest {