Interface AgenticRetrieveResultEvent.Builder

  • Method Details

    • retrievedContext

      AgenticRetrieveResultEvent.Builder retrievedContext(Collection<RetrievedContext> retrievedContext)

      The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.

      Parameters:
      retrievedContext - The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • retrievedContext

      AgenticRetrieveResultEvent.Builder retrievedContext(RetrievedContext... retrievedContext)

      The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.

      Parameters:
      retrievedContext - The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • retrievedContext

      The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.

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

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

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

      The synthesized natural-language answer, when one was generated.

      Parameters:
      answer - The synthesized natural-language answer, when one was generated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • citations

      Maps spans of answer to the supporting entities, when an answer was generated.

      Parameters:
      citations - Maps spans of answer to the supporting entities, when an answer was generated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • citations

      Maps spans of answer to the supporting entities, when an answer was generated.

      Parameters:
      citations - Maps spans of answer to the supporting entities, when an answer was generated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • citations

      Maps spans of answer to the supporting entities, when an answer was generated.

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

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

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