Interface MemoryStrategy.Builder

  • Method Details

    • type

      The type of memory the strategy extracts.

      Parameters:
      type - The type of memory the strategy extracts.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      The type of memory the strategy extracts.

      Parameters:
      type - The type of memory the strategy extracts.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • name

      A name for the strategy, unique within the space. Omit it to have the service generate one from the type, for example semantic_1. The name must be 1 to 64 characters: letters, digits, periods, hyphens, and underscores, starting with a letter or digit. A strategy's name can't be changed, and the strategy's memories are stored under it: a strategy added under a new name starts with no memories.

      Parameters:
      name - A name for the strategy, unique within the space. Omit it to have the service generate one from the type, for example semantic_1. The name must be 1 to 64 characters: letters, digits, periods, hyphens, and underscores, starting with a letter or digit. A strategy's name can't be changed, and the strategy's memories are stored under it: a strategy added under a new name starts with no memories.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      MemoryStrategy.Builder description(String description)

      A description of the strategy.

      Parameters:
      description - A description of the strategy.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • configuration

      Settings for the strategy. When you create a strategy, omit it to use the defaults for the strategy's type.

      A CUSTOM strategy must set extractionPrompt.

      Parameters:
      configuration - Settings for the strategy. When you create a strategy, omit it to use the defaults for the strategy's type.

      A CUSTOM strategy must set extractionPrompt.

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

      Settings for the strategy. When you create a strategy, omit it to use the defaults for the strategy's type.

      A CUSTOM strategy must set extractionPrompt.

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

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

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