Interface RerankResult.Builder

  • Method Details

    • document

      Contains information about the document.

      Parameters:
      document - Contains information about the document.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • document

      Contains information about the document.

      This is a convenience method that creates an instance of the RerankDocument.Builder avoiding the need to create one manually via RerankDocument.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to document(RerankDocument).

      Parameters:
      document - a consumer that will call methods on RerankDocument.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • index

      The ranking of the document. The lower a number, the higher the document is ranked.

      Parameters:
      index - The ranking of the document. The lower a number, the higher the document is ranked.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • relevanceScore

      RerankResult.Builder relevanceScore(Float relevanceScore)

      The relevance score of the document.

      Parameters:
      relevanceScore - The relevance score of the document.
      Returns:
      Returns a reference to this object so that method calls can be chained together.