Interface SearchAgentContextRequest.Builder

  • Method Details

    • maxResults

      Maximum number of results to return per page.

      Parameters:
      maxResults - Maximum number of results to return per page.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • nextToken

      Opaque continuation token from a prior response. Omit on the first page.

      Parameters:
      nextToken - Opaque continuation token from a prior response. Omit on the first page.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • agentContextId

      SearchAgentContextRequest.Builder agentContextId(String agentContextId)

      The agent context to search, by ID or full Amazon Resource Name (ARN).

      Parameters:
      agentContextId - The agent context to search, by ID or full Amazon Resource Name (ARN).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • query

      The natural-language query or keywords to search for in the agent context. AWS Context interprets it based on searchType: as literal text for KEYWORD, as a semantic concept for SEMANTIC, or as both for AUTO.

      Parameters:
      query - The natural-language query or keywords to search for in the agent context. AWS Context interprets it based on searchType: as literal text for KEYWORD, as a semantic concept for SEMANTIC, or as both for AUTO.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • filter

      Optional filter on node attributes: a single comparison, or andAll of comparisons that must all match.

      Parameters:
      filter - Optional filter on node attributes: a single comparison, or andAll of comparisons that must all match.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • filter

      Optional filter on node attributes: a single comparison, or andAll of comparisons that must all match.

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

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

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

      SearchAgentContextRequest.Builder searchType(String searchType)

      The search strategy to use. Valid values:

      • KEYWORD - Full-text keyword matching (BM25).

      • SEMANTIC - Vector similarity of embeddings.

      • AUTO - Keyword matches first, then semantic matches for the remaining results.

      Parameters:
      searchType - The search strategy to use. Valid values:

      • KEYWORD - Full-text keyword matching (BM25).

      • SEMANTIC - Vector similarity of embeddings.

      • AUTO - Keyword matches first, then semantic matches for the remaining results.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • searchType

      The search strategy to use. Valid values:

      • KEYWORD - Full-text keyword matching (BM25).

      • SEMANTIC - Vector similarity of embeddings.

      • AUTO - Keyword matches first, then semantic matches for the remaining results.

      Parameters:
      searchType - The search strategy to use. Valid values:

      • KEYWORD - Full-text keyword matching (BM25).

      • SEMANTIC - Vector similarity of embeddings.

      • AUTO - Keyword matches first, then semantic matches for the remaining results.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • overrideConfiguration

      SearchAgentContextRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.