Skip to content

Commit

Permalink
fix: add name alias to block.template_name to fix ADE (#1987)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahwooders authored Nov 6, 2024
1 parent 134a166 commit 2b2b7d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions letta/schemas/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BaseBlock(LettaBase, validate_assignment=True):
limit: int = Field(2000, description="Character limit of the block.")

# template data (optional)
template_name: Optional[str] = Field(None, description="Name of the block if it is a template.")
template_name: Optional[str] = Field(None, description="Name of the block if it is a template.", alias="name")
template: bool = Field(False, description="Whether the block is a template (e.g. saved human/persona options).")

# context window label
Expand Down Expand Up @@ -58,11 +58,11 @@ class Block(BaseBlock):
A Block represents a reserved section of the LLM's context window which is editable. `Block` objects contained in the `Memory` object, which is able to edit the Block values.
Parameters:
name (str): The name of the block.
label (str): The label of the block (e.g. 'human', 'persona'). This defines a category for the block.
value (str): The value of the block. This is the string that is represented in the context window.
limit (int): The character limit of the block.
template_name (str): The name of the block template (if it is a template).
template (bool): Whether the block is a template (e.g. saved human/persona options). Non-template blocks are not stored in the database and are ephemeral, while templated blocks are stored in the database.
label (str): The label of the block (e.g. 'human', 'persona'). This defines a category for the block.
description (str): Description of the block.
metadata_ (Dict): Metadata of the block.
user_id (str): The unique identifier of the user associated with the block.
Expand Down

0 comments on commit 2b2b7d5

Please sign in to comment.