This commit is contained in:
vegu-ai-tools
2025-10-03 23:46:10 +03:00
parent 99efbade54
commit d41953a70d
4 changed files with 5 additions and 6 deletions

View File

@@ -58,9 +58,7 @@ class Character(pydantic.BaseModel):
example_dialogue: list[str] = pydantic.Field(default_factory=list)
# attribute and detail storage
base_attributes: dict = pydantic.Field(
default_factory=dict
)
base_attributes: dict = pydantic.Field(default_factory=dict)
details: dict[str, str] = pydantic.Field(default_factory=dict)
# helpful references

View File

@@ -191,7 +191,7 @@ def export_node_definitions() -> dict:
field_defs[prop_name] = prop_data.model_dump()
exported_node = {"fields": field_defs, **node.model_dump()}
if node._module_path:
try:
exported_node["module_path"] = relative_to_root(Path(node._module_path))
@@ -200,7 +200,7 @@ def export_node_definitions() -> dict:
"export_node_definitions: failed to get relative path",
module_path=node._module_path,
)
exported_node["selectable"] = node._export_definition
exported_node.pop("nodes", None)

View File

@@ -17,6 +17,7 @@ TTS_DIR = TALEMATE_ROOT / "tts"
CONFIG_FILE = TALEMATE_ROOT / "config.yaml"
def relative_to_root(path: Path | str) -> Path:
if isinstance(path, str):
path = Path(path)

View File

@@ -916,7 +916,7 @@ class Scene(Emitter):
if isinstance(actor, Player):
actor.character.is_player = True
if actor.character.name not in self.character_data:
self.character_data[actor.character.name] = actor.character