Interface CreateMemoryRequest.Builder

  • Method Details

    • spaceId

      The ID of the space that owns the memory, for example sp-02864597b164.

      Parameters:
      spaceId - The ID of the space that owns the memory, for example sp-02864597b164.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • name

      The name of the strategy that the memory belongs to. The space must already declare the strategy, and the memory's type comes from that strategy. The name must be 1 to 64 characters: letters, digits, periods, hyphens, and underscores, starting with a letter or digit.

      Parameters:
      name - The name of the strategy that the memory belongs to. The space must already declare the strategy, and the memory's type comes from that strategy. The name must be 1 to 64 characters: letters, digits, periods, hyphens, and underscores, starting with a letter or digit.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • content

      The memory text, stored and embedded as provided.

      Parameters:
      content - The memory text, stored and embedded as provided.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • actorId

      The actor (end user or agent) that owns the memory.

      Parameters:
      actorId - The actor (end user or agent) that owns the memory.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sessionId

      CreateMemoryRequest.Builder sessionId(String sessionId)

      The session that the memory belongs to. If you omit it, the service generates a session ID and returns it.

      Parameters:
      sessionId - The session that the memory belongs to. If you omit it, the service generates a session ID and returns it.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • metadata

      Metadata tags to store with the memory. Keys that begin with x-amz-, the key documentS3Source, and other keys that the service uses internally are reserved: a request that sets one fails with ValidationException, and the message names the key.

      A space can use at most 50 distinct metadata keys across all of its events and memories. A request that would add a key beyond that fails with ValidationException. Reuse an existing key instead.

      Parameters:
      metadata - Metadata tags to store with the memory. Keys that begin with x-amz-, the key documentS3Source, and other keys that the service uses internally are reserved: a request that sets one fails with ValidationException, and the message names the key.

      A space can use at most 50 distinct metadata keys across all of its events and memories. A request that would add a key beyond that fails with ValidationException. Reuse an existing key instead.

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

      CreateMemoryRequest.Builder clientToken(String clientToken)

      A unique, case-sensitive identifier that makes the request idempotent. Within 2 hours of the first request, a retry with the same token returns the same memoryId instead of creating a second memory. Reusing the token with a different name, content, metadata, actorId, or sessionId fails with ConflictException. If you omit sessionId, a retry with the same token gets the same session. If you omit the token, each call creates a new memory.

      Parameters:
      clientToken - A unique, case-sensitive identifier that makes the request idempotent. Within 2 hours of the first request, a retry with the same token returns the same memoryId instead of creating a second memory. Reusing the token with a different name, content, metadata, actorId, or sessionId fails with ConflictException. If you omit sessionId, a retry with the same token gets the same session. If you omit the token, each call creates a new memory.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • overrideConfiguration

      CreateMemoryRequest.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.