mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-19 00:01:33 +00:00
10 lines
287 B
Python
10 lines
287 B
Python
from uuid import uuid4
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class BaseNode(BaseModel):
|
|
id: str = Field(default_factory=lambda: uuid4().hex)
|
|
text: str = Field(default="")
|
|
embedding: list[float] | None = Field(default=None)
|
|
metadata: dict = Field(default_factory=dict)
|