BERT REST Client

Encode Request

var encodeRequest = EncodeRequest.builder()
    .id("123")
    .chunk("First chunk of text for the encoding")
    .chunk("Second chunk of text for the prediction")
    .model("sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2") // if this is null, the server will use the default model
    .build();

var result = client.encode(request);

The result will return 200 for the status code and the corresponding list of vectors:

{
  "id": 123,
  "results": [[float-list], [float-list]],
  "status": 200
}

©2024 Pureinsights Technology Corporation