syntax = "proto3";
package ai.v1;

service Embeddings {
   rpc embed(EmbedRequest) returns (EmbedResponse) {}
   rpc rerank(RerankRequest) returns (RerankResponse) {}
}

service Ocr {
   rpc ocr(OcrRequest) returns (OcrResponse) {}
}

message EmbedRequest {
   repeated string texts = 1;
   // LoRa adapter for embedding requests, one of: "classification", "retrieval.passage", "retrieval.query", "separation" or "text-matching"
   string task = 2;
}

message Embedding {
   repeated float vector = 1;
}

message EmbedResponse {
   repeated Embedding embeddings = 1;
   uint32 processed_tokens = 2;
}

message RerankRequest {
   string query = 1;
   repeated string texts = 2;
}

message RerankItem {
   float score = 1;
   uint32 index = 2;
}

message RerankResponse {
   repeated RerankItem scores = 1;
   uint32 processed_tokens = 2;
}

message OcrRequest {

}

message OcrResponse {

}