feat: remove identities from .af (#1388)
This commit is contained in:
@@ -105,4 +105,7 @@ class MarshmallowAgentSchema(BaseSchema):
|
|||||||
"sources",
|
"sources",
|
||||||
"source_passages",
|
"source_passages",
|
||||||
"agent_passages",
|
"agent_passages",
|
||||||
|
"identities",
|
||||||
|
"is_deleted",
|
||||||
|
"groups",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ class SerializedBlockSchema(BaseSchema):
|
|||||||
|
|
||||||
class Meta(BaseSchema.Meta):
|
class Meta(BaseSchema.Meta):
|
||||||
model = Block
|
model = Block
|
||||||
exclude = BaseSchema.Meta.exclude + ("agents",)
|
exclude = BaseSchema.Meta.exclude + ("agents", "identities", "is_deleted")
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ class SerializedToolSchema(BaseSchema):
|
|||||||
|
|
||||||
class Meta(BaseSchema.Meta):
|
class Meta(BaseSchema.Meta):
|
||||||
model = Tool
|
model = Tool
|
||||||
exclude = BaseSchema.Meta.exclude
|
exclude = BaseSchema.Meta.exclude + ("is_deleted",)
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ from letta.schemas.llm_config import LLMConfig
|
|||||||
class CoreMemoryBlockSchema(BaseModel):
|
class CoreMemoryBlockSchema(BaseModel):
|
||||||
created_at: str
|
created_at: str
|
||||||
description: Optional[str]
|
description: Optional[str]
|
||||||
identities: List[Any]
|
|
||||||
is_deleted: bool
|
|
||||||
is_template: bool
|
is_template: bool
|
||||||
label: str
|
label: str
|
||||||
limit: int
|
limit: int
|
||||||
@@ -42,7 +40,6 @@ class TagSchema(BaseModel):
|
|||||||
class ToolEnvVarSchema(BaseModel):
|
class ToolEnvVarSchema(BaseModel):
|
||||||
created_at: str
|
created_at: str
|
||||||
description: Optional[str]
|
description: Optional[str]
|
||||||
is_deleted: bool
|
|
||||||
key: str
|
key: str
|
||||||
updated_at: str
|
updated_at: str
|
||||||
value: str
|
value: str
|
||||||
@@ -76,7 +73,6 @@ class ToolSchema(BaseModel):
|
|||||||
args_json_schema: Optional[Any]
|
args_json_schema: Optional[Any]
|
||||||
created_at: str
|
created_at: str
|
||||||
description: str
|
description: str
|
||||||
is_deleted: bool
|
|
||||||
json_schema: ToolJSONSchema
|
json_schema: ToolJSONSchema
|
||||||
name: str
|
name: str
|
||||||
return_char_limit: int
|
return_char_limit: int
|
||||||
@@ -94,9 +90,6 @@ class AgentSchema(BaseModel):
|
|||||||
created_at: str
|
created_at: str
|
||||||
description: Optional[str]
|
description: Optional[str]
|
||||||
embedding_config: EmbeddingConfig
|
embedding_config: EmbeddingConfig
|
||||||
groups: List[Any]
|
|
||||||
identities: List[Any]
|
|
||||||
is_deleted: bool
|
|
||||||
llm_config: LLMConfig
|
llm_config: LLMConfig
|
||||||
message_buffer_autoclear: bool
|
message_buffer_autoclear: bool
|
||||||
messages: List[MessageSchema]
|
messages: List[MessageSchema]
|
||||||
|
|||||||
@@ -351,6 +351,11 @@ def test_append_copy_suffix_simple(local_client, server, serialize_test_agent, d
|
|||||||
"""Test deserializing JSON into an Agent instance."""
|
"""Test deserializing JSON into an Agent instance."""
|
||||||
result = server.agent_manager.serialize(agent_id=serialize_test_agent.id, actor=default_user)
|
result = server.agent_manager.serialize(agent_id=serialize_test_agent.id, actor=default_user)
|
||||||
|
|
||||||
|
# write file
|
||||||
|
with open("test_agent_serialization.json", "w") as f:
|
||||||
|
# write json
|
||||||
|
f.write(json.dumps(result.model_dump(), indent=4))
|
||||||
|
|
||||||
# Deserialize the agent
|
# Deserialize the agent
|
||||||
agent_copy = server.agent_manager.deserialize(serialized_agent=result, actor=other_user, append_copy_suffix=append_copy_suffix)
|
agent_copy = server.agent_manager.deserialize(serialized_agent=result, actor=other_user, append_copy_suffix=append_copy_suffix)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user