mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-03 21:02:40 +02:00
error
This commit is contained in:
parent
48fb38bafc
commit
92aa3f4eab
3 changed files with 72 additions and 20 deletions
|
|
@ -475,10 +475,11 @@ class ChatCommentMention(BaseModel, TimestampMixin):
|
|||
class MemoryCategory(str, Enum):
|
||||
"""Categories for user memories."""
|
||||
|
||||
PREFERENCE = "preference" # User preferences (e.g., "prefers dark mode")
|
||||
FACT = "fact" # Facts about the user (e.g., "is a Python developer")
|
||||
INSTRUCTION = "instruction" # Standing instructions (e.g., "always respond in bullet points")
|
||||
CONTEXT = "context" # Contextual information (e.g., "working on project X")
|
||||
# Using lowercase keys to match PostgreSQL enum values
|
||||
preference = "preference" # User preferences (e.g., "prefers dark mode")
|
||||
fact = "fact" # Facts about the user (e.g., "is a Python developer")
|
||||
instruction = "instruction" # Standing instructions (e.g., "always respond in bullet points")
|
||||
context = "context" # Contextual information (e.g., "working on project X")
|
||||
|
||||
|
||||
class UserMemory(BaseModel, TimestampMixin):
|
||||
|
|
@ -510,7 +511,7 @@ class UserMemory(BaseModel, TimestampMixin):
|
|||
category = Column(
|
||||
SQLAlchemyEnum(MemoryCategory),
|
||||
nullable=False,
|
||||
default=MemoryCategory.FACT,
|
||||
default=MemoryCategory.fact,
|
||||
)
|
||||
# Vector embedding for semantic search
|
||||
embedding = Column(Vector(config.embedding_model_instance.dimension))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue