42 lines
885 B
Protocol Buffer
42 lines
885 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package RagService;
|
|
|
|
option go_package = "leafdev.top/leaf/rag/api/rag";
|
|
|
|
|
|
import "google/api/annotations.proto";
|
|
import "google/api/httpbody.proto";
|
|
import "api/rag/document.proto";
|
|
import "api/rag/library.proto";
|
|
|
|
|
|
service RAGService {
|
|
rpc ListLibrary(ListLibraryRequest) returns (ListLibraryResponse) {
|
|
option (google.api.http) = {
|
|
get: "/api/v1/libraries"
|
|
};
|
|
}
|
|
|
|
rpc CreateLibrary(CreateLibraryRequest) returns (CreateLibraryResponse) {
|
|
option (google.api.http) = {
|
|
post: "/api/v1/libraries"
|
|
};
|
|
}
|
|
|
|
// DocumentService
|
|
rpc CreateDocument(CreateDocumentRequest) returns (CreateDocumentResponse) {
|
|
option (google.api.http) = {
|
|
post: "/api/v1/documents"
|
|
};
|
|
}
|
|
|
|
rpc ListDocument(ListDocumentRequest) returns (ListDocumentResponse) {
|
|
option (google.api.http) = {
|
|
get: "/api/v1/documents"
|
|
};
|
|
}
|
|
|
|
}
|
|
|