tulip.proto 795 B

123456789101112131415161718192021222324252627282930313233343536
  1. syntax = "proto3";
  2. option java_multiple_files = true;
  3. option java_package = "com.github.iapt_platform.mint.plugins.tulip.v1";
  4. package mint.tulip.v1;
  5. // ----------------------------------------------------------------------------
  6. message SearchRequest {
  7. repeated string keywords = 1;
  8. int32 book = 2;
  9. message Page {
  10. int32 index = 1;
  11. int32 size = 2;
  12. }
  13. optional Page page = 99;
  14. }
  15. message SearchResponse {
  16. message Item {
  17. int32 rank = 1;
  18. string highlight = 2;
  19. int32 book = 3;
  20. int32 paragraph = 4;
  21. string content = 5;
  22. }
  23. repeated Item items = 1;
  24. SearchRequest.Page page = 98;
  25. int32 total = 99;
  26. }
  27. service Search {
  28. rpc Pali(SearchRequest) returns (SearchResponse) {}
  29. }
  30. // ----------------------------------------------------------------------------