Interface HuggingFaceRestApi


@Path("") @ClientHeaderParam(name="Authorization", value="Bearer {token}") @Consumes("application/json") @Produces("application/json") public interface HuggingFaceRestApi
This Microprofile REST client is used as the building block of all the API calls to HuggingFace. The implementation is provided by the Reactive REST Client in Quarkus.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<float[]>
    embed(dev.langchain4j.model.huggingface.client.EmbeddingRequest request, String token)
     
    List<dev.langchain4j.model.huggingface.client.TextGenerationResponse>
    generate(dev.langchain4j.model.huggingface.client.TextGenerationRequest request, String token)
     
    static com.fasterxml.jackson.databind.ObjectMapper
    objectMapper(com.fasterxml.jackson.databind.ObjectMapper defaultObjectMapper)
     
  • Method Details

    • generate

      @POST List<dev.langchain4j.model.huggingface.client.TextGenerationResponse> generate(dev.langchain4j.model.huggingface.client.TextGenerationRequest request, @NotBody String token)
    • embed

      @POST List<float[]> embed(dev.langchain4j.model.huggingface.client.EmbeddingRequest request, @NotBody String token)
    • objectMapper

      static com.fasterxml.jackson.databind.ObjectMapper objectMapper(com.fasterxml.jackson.databind.ObjectMapper defaultObjectMapper)