Class MemoryCreateParams.Body

  • All Implemented Interfaces:

    
    public final class MemoryCreateParams.Body
    
                        

    The request body for Create a Memory.

    Creating a memory never replaces another one. The request fails with HTTP status 409 if a memory already uses path, or if path is an ancestor or descendant of another memory's path. It also fails, with HTTP status 400, if the memory store is archived or has reached its limit of 10,000 memories. To change an existing memory, update it instead.

    See the memory guide to learn more about creating memories.

    • Constructor Detail

    • Method Detail

      • content

         final Optional<String> content()

        The UTF-8 text content of the new memory. Pass "" to create an empty memory.

        The maximum size is 100 kB (102,400 bytes).

      • path

         final String path()

        The path of the new memory, such as /projects/foo/notes.md. Paths are case-sensitive.

        A path starts with / and has 1 to 20 segments. A segment can't be empty and can't be . or ... A path can't contain control characters, format characters, or the line and paragraph separators U+2028 and U+2029. It must be in Unicode Normalization Form C and at most 1,024 bytes long.

      • _content

         final JsonField<String> _content()

        Returns the raw JSON value of content.

        Unlike content, this method doesn't throw if the JSON field has an unexpected type.

      • _path

         final JsonField<String> _path()

        Returns the raw JSON value of path.

        Unlike path, this method doesn't throw if the JSON field has an unexpected type.

      • validate

         final MemoryCreateParams.Body validate()

        Validates that the types of all values in this object match their expected types recursively.

        This method is not forwards compatible with new types from the API for existing fields.