Files
wehub-resource-sync 4a19d70af1
Lint with Ruff / ruff (push) Has been cancelled
MCP Server Tests / live-mcp-tests (push) Has been cancelled
Tests / unit-tests (push) Has been cancelled
Tests / database-integration-tests (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Server Tests / live-server-tests (push) Has been cancelled
Pyright Type Check / pyright (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:38:54 +08:00

29 lines
1.0 KiB
Python

from datetime import datetime
from typing import Literal
from graphiti_core.utils.datetime_utils import utc_now
from pydantic import BaseModel, Field
class Result(BaseModel):
message: str
success: bool
class Message(BaseModel):
content: str = Field(..., description='The content of the message')
uuid: str | None = Field(default=None, description='The uuid of the message (optional)')
name: str = Field(
default='', description='The name of the episodic node for the message (optional)'
)
role_type: Literal['user', 'assistant', 'system'] = Field(
..., description='The role type of the message (user, assistant or system)'
)
role: str | None = Field(
description='The custom role of the message to be used alongside role_type (user name, bot name, etc.)',
)
timestamp: datetime = Field(default_factory=utc_now, description='The timestamp of the message')
source_description: str = Field(
default='', description='The description of the source of the message'
)