first commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from marshmallow import Schema, fields
|
||||
|
||||
|
||||
class MemorySchema(Schema):
|
||||
id = fields.Integer(dump_only=True)
|
||||
workspace_id = fields.Integer()
|
||||
agent_id = fields.Integer(allow_none=True)
|
||||
type = fields.String(required=True)
|
||||
content = fields.String(required=True)
|
||||
tags = fields.List(fields.String(), allow_none=True)
|
||||
importance = fields.Integer()
|
||||
created_at = fields.DateTime(dump_only=True)
|
||||
updated_at = fields.DateTime(dump_only=True)
|
||||
|
||||
|
||||
class MemoryCreateSchema(Schema):
|
||||
type = fields.String(required=True)
|
||||
content = fields.String(required=True)
|
||||
tags = fields.List(fields.String(), allow_none=True)
|
||||
importance = fields.Integer()
|
||||
|
||||
|
||||
class MemoryUpdateSchema(Schema):
|
||||
content = fields.String()
|
||||
tags = fields.List(fields.String())
|
||||
importance = fields.Integer()
|
||||
Reference in New Issue
Block a user