Interface Citation.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Citation.Builder,Citation>, SdkBuilder<Citation.Builder,Citation>, SdkPojo
Enclosing class:
Citation

@Mutable @NotThreadSafe public static interface Citation.Builder extends SdkPojo, CopyableBuilder<Citation.Builder,Citation>
  • Method Details

    • title

      Citation.Builder title(String title)

      The title or identifier of the source document being cited.

      Parameters:
      title - The title or identifier of the source document being cited.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sourceContent

      Citation.Builder sourceContent(Collection<CitationSourceContent> sourceContent)

      The specific content from the source document that was referenced or cited in the generated response.

      Parameters:
      sourceContent - The specific content from the source document that was referenced or cited in the generated response.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sourceContent

      Citation.Builder sourceContent(CitationSourceContent... sourceContent)

      The specific content from the source document that was referenced or cited in the generated response.

      Parameters:
      sourceContent - The specific content from the source document that was referenced or cited in the generated response.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sourceContent

      Citation.Builder sourceContent(Consumer<CitationSourceContent.Builder>... sourceContent)

      The specific content from the source document that was referenced or cited in the generated response.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to sourceContent(List<CitationSourceContent>).

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

      Citation.Builder location(CitationLocation location)

      The precise location within the source document where the cited content can be found, including character positions, page numbers, or chunk identifiers.

      Parameters:
      location - The precise location within the source document where the cited content can be found, including character positions, page numbers, or chunk identifiers.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • location

      default Citation.Builder location(Consumer<CitationLocation.Builder> location)

      The precise location within the source document where the cited content can be found, including character positions, page numbers, or chunk identifiers.

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

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

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