-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd54989
commit 43ec538
Showing
7 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
syntax = "proto3"; | ||
|
||
package vectorindex; | ||
|
||
service VectorIndex { | ||
rpc UpsertItemBatch(UpsertItemBatchRequest) returns (UpsertItemBatchResponse) {} | ||
rpc Search(SearchRequest) returns (SearchResponse) {} | ||
} | ||
|
||
message Item { | ||
string id = 1; | ||
Vector vector = 2; | ||
repeated Metadata metadata = 3; | ||
} | ||
|
||
message UpsertItemBatchRequest { | ||
string index_name = 1; | ||
repeated Item items = 2; | ||
} | ||
|
||
message UpsertItemBatchResponse { | ||
repeated uint32 error_indices = 1; | ||
} | ||
|
||
message Vector { | ||
repeated float elements = 1; | ||
} | ||
|
||
message Metadata { | ||
string field = 1; | ||
oneof value { | ||
// Eventually can support ints, dates, etc | ||
string string_value = 2; | ||
} | ||
} | ||
|
||
message MetadataRequest { | ||
message Some { | ||
repeated string fields = 1; | ||
} | ||
message All {} | ||
|
||
oneof kind { | ||
Some some = 2; | ||
} | ||
} | ||
|
||
message SearchRequest { | ||
string index_name = 1; | ||
uint32 top_k = 2; | ||
Vector query_vector = 3; | ||
MetadataRequest metadata_fields = 4; | ||
} | ||
|
||
message SearchHit { | ||
string id = 1; | ||
float distance = 2; | ||
repeated Metadata metadata = 3; | ||
} | ||
|
||
message SearchResponse { | ||
repeated SearchHit hits = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters