Interface Request

All Superinterfaces:
AttributeProvider

@Experimental public interface Request extends AttributeProvider
A descriptor for a generative AI request.
Since:
5.2.240708
  • Method Details

    • builder

      @NotNull static Request.Builder builder()
      Creates a new builder to create a request instance with.
      Returns:
      The builder instance.
      Since:
      5.2.240708
    • create

      @NotNull static @NotNull Request create(@NotNull @NotNull String prompt)
      Creates a new request with the given user prompt.
      Parameters:
      prompt - The user prompt.
      Returns:
      The request objects.
      Since:
      5.2.240708
    • getMessages

      @NotNull @NotNull List<Message> getMessages()
      Returns a list of messages to use for the request.
      Returns:
      The request messages.
      Since:
      5.2.240708
    • getVariantCount

      int getVariantCount()
      The number of variants to be requested, 1 by default.
      Returns:
      The number of requested variants.
      Since:
      5.2.240708
      See Also: