diff --git a/scenes/simulation-suite-v2/nodes/fn-sim-suite-set-goal.json b/scenes/simulation-suite-v2/nodes/fn-sim-suite-set-goal.json index a2cf5783..8e5b16f5 100644 --- a/scenes/simulation-suite-v2/nodes/fn-sim-suite-set-goal.json +++ b/scenes/simulation-suite-v2/nodes/fn-sim-suite-set-goal.json @@ -100,22 +100,6 @@ "registry": "data/Set", "base_type": "core/Node" }, - "c66bdaeb-4166-4835-9415-943af547c926": { - "title": "GET local.arg_goal", - "id": "c66bdaeb-4166-4835-9415-943af547c926", - "properties": { - "name": "arg_goal", - "scope": "local" - }, - "x": 20, - "y": 460, - "width": 256, - "height": 122, - "collapsed": false, - "inherited": false, - "registry": "state/GetState", - "base_type": "core/Node" - }, "4e9edb53-0324-4419-a0bb-0598a6fc5cac": { "title": "Save World Entry", "id": "4e9edb53-0324-4419-a0bb-0598a6fc5cac", @@ -306,6 +290,178 @@ "inherited": false, "registry": "core/Stage", "base_type": "core/Node" + }, + "a8110d74-0fb5-4601-b883-6c63ceaa9d31": { + "title": "Get Scene State", + "id": "a8110d74-0fb5-4601-b883-6c63ceaa9d31", + "properties": {}, + "x": 25, + "y": 1823, + "width": 140, + "height": 106, + "collapsed": false, + "inherited": false, + "registry": "scene/GetSceneState", + "base_type": "core/Node" + }, + "a7942f64-51d7-4fd9-8827-56db6c358d4c": { + "title": "GET obj.title", + "id": "a7942f64-51d7-4fd9-8827-56db6c358d4c", + "properties": { + "attribute": "title" + }, + "x": 214, + "y": 1833, + "width": 210, + "height": 98, + "collapsed": false, + "inherited": false, + "registry": "data/Get", + "base_type": "core/Node" + }, + "8c726959-9256-4a89-ab4b-d8217a8d96b7": { + "title": "Make String", + "id": "8c726959-9256-4a89-ab4b-d8217a8d96b7", + "properties": { + "value": "The Simulation Suite" + }, + "x": 214, + "y": 2023, + "width": 210, + "height": 58, + "collapsed": false, + "inherited": false, + "registry": "data/string/Make", + "base_type": "core/Node" + }, + "089a33c1-111d-42fd-8d45-4518d5906342": { + "title": "String Check", + "id": "089a33c1-111d-42fd-8d45-4518d5906342", + "properties": { + "substring": "", + "mode": "exact", + "case_sensitive": true + }, + "x": 524, + "y": 1923, + "width": 210, + "height": 126, + "collapsed": false, + "inherited": false, + "registry": "data/string/StringCheck", + "base_type": "core/Node" + }, + "c66bdaeb-4166-4835-9415-943af547c926": { + "title": "GET local.arg_goal", + "id": "c66bdaeb-4166-4835-9415-943af547c926", + "properties": { + "name": "arg_goal", + "scope": "local" + }, + "x": 20, + "y": 460, + "width": 256, + "height": 122, + "collapsed": false, + "inherited": false, + "registry": "state/GetState", + "base_type": "core/Node" + }, + "51f77586-711a-4cd9-89cd-386e7a6a822f": { + "title": "Switch", + "id": "51f77586-711a-4cd9-89cd-386e7a6a822f", + "properties": { + "pass_through": true + }, + "x": 775, + "y": 1924, + "width": 210, + "height": 78, + "collapsed": false, + "inherited": false, + "registry": "core/Switch", + "base_type": "core/Node" + }, + "1b4e25bf-3d5b-467c-bc0c-69d107a7de6b": { + "title": "Contextual Generate", + "id": "1b4e25bf-3d5b-467c-bc0c-69d107a7de6b", + "properties": { + "context_type": "scene", + "context_name": "title", + "instructions": "Create a fitting title for the simulated scenario that the user has requested. You response MUST be a short but exciting, descriptive title.", + "length": 50, + "character": null, + "uid": null, + "context_aware": true, + "history_aware": true + }, + "x": 1015, + "y": 1924, + "width": 276, + "height": 406, + "collapsed": false, + "inherited": false, + "registry": "agents/creator/ContextualGenerate", + "base_type": "core/Node" + }, + "8208d05c-1822-4f4a-ba75-cfd18d2de8ca": { + "title": "Get Scene State", + "id": "8208d05c-1822-4f4a-ba75-cfd18d2de8ca", + "properties": {}, + "x": 1345, + "y": 1866, + "width": 140, + "height": 106, + "collapsed": true, + "inherited": false, + "registry": "scene/GetSceneState", + "base_type": "core/Node" + }, + "641c0896-2241-4f44-9c15-2dbad9b0446c": { + "title": "SET obj.title", + "id": "641c0896-2241-4f44-9c15-2dbad9b0446c", + "properties": { + "attribute": "title" + }, + "x": 1585, + "y": 1946, + "width": 210, + "height": 98, + "collapsed": false, + "inherited": false, + "registry": "data/Set", + "base_type": "core/Node" + }, + "1ee8f77b-5272-4f8e-94cf-56dbc2e7a12e": { + "title": "Trim", + "id": "1ee8f77b-5272-4f8e-94cf-56dbc2e7a12e", + "properties": { + "mode": "both", + "chars": "\"'" + }, + "x": 1325, + "y": 1946, + "width": 210, + "height": 102, + "collapsed": false, + "inherited": false, + "registry": "data/string/Trim", + "base_type": "core/Node" + }, + "a2ced2d6-c941-4dae-bd63-417b60e56835": { + "title": "Stage 5", + "id": "a2ced2d6-c941-4dae-bd63-417b60e56835", + "properties": { + "stage": 5 + }, + "x": 1835, + "y": 2006, + "width": 210, + "height": 118, + "collapsed": true, + "inherited": false, + "registry": "core/Stage", + "base_type": "core/Node" } }, "edges": { @@ -322,10 +478,6 @@ "bd7205c1-16a0-40dd-a132-5c5e4fd45cd1.object": [ "e4cd1391-daed-4951-a6c6-438d993c07a9.state" ], - "c66bdaeb-4166-4835-9415-943af547c926.value": [ - "24ac670b-4648-4915-9dbb-b6bf35ee6d80.state", - "24ac670b-4648-4915-9dbb-b6bf35ee6d80.description" - ], "4e9edb53-0324-4419-a0bb-0598a6fc5cac.entry_id": [ "f70eba46-c83e-4544-8cc1-9d8f93fb053d.state" ], @@ -354,6 +506,37 @@ ], "9db37d1e-3cf8-49bd-bdc5-8663494e5657.state": [ "6aec9c99-848b-4567-b50f-793ed1674dee.state" + ], + "a8110d74-0fb5-4601-b883-6c63ceaa9d31.scene": [ + "a7942f64-51d7-4fd9-8827-56db6c358d4c.object" + ], + "a7942f64-51d7-4fd9-8827-56db6c358d4c.value": [ + "089a33c1-111d-42fd-8d45-4518d5906342.string" + ], + "8c726959-9256-4a89-ab4b-d8217a8d96b7.value": [ + "089a33c1-111d-42fd-8d45-4518d5906342.substring" + ], + "089a33c1-111d-42fd-8d45-4518d5906342.result": [ + "51f77586-711a-4cd9-89cd-386e7a6a822f.value" + ], + "c66bdaeb-4166-4835-9415-943af547c926.value": [ + "24ac670b-4648-4915-9dbb-b6bf35ee6d80.state", + "24ac670b-4648-4915-9dbb-b6bf35ee6d80.description" + ], + "51f77586-711a-4cd9-89cd-386e7a6a822f.yes": [ + "1b4e25bf-3d5b-467c-bc0c-69d107a7de6b.state" + ], + "1b4e25bf-3d5b-467c-bc0c-69d107a7de6b.text": [ + "1ee8f77b-5272-4f8e-94cf-56dbc2e7a12e.string" + ], + "8208d05c-1822-4f4a-ba75-cfd18d2de8ca.scene": [ + "641c0896-2241-4f44-9c15-2dbad9b0446c.object" + ], + "641c0896-2241-4f44-9c15-2dbad9b0446c.value": [ + "a2ced2d6-c941-4dae-bd63-417b60e56835.state" + ], + "1ee8f77b-5272-4f8e-94cf-56dbc2e7a12e.result": [ + "641c0896-2241-4f44-9c15-2dbad9b0446c.value" ] }, "groups": [ @@ -401,8 +584,18 @@ "title": "Evaluate Scene Intent", "x": 0, "y": 1509, - "width": 700, - "height": 233, + "width": 705, + "height": 234, + "color": "#8AA", + "font_size": 24, + "inherited": false + }, + { + "title": "Set title", + "x": 0, + "y": 1743, + "width": 2070, + "height": 612, "color": "#8AA", "font_size": 24, "inherited": false @@ -422,7 +615,7 @@ "inputs": [], "outputs": [ { - "id": "97e46225-96cd-4393-891c-f6851d00dc22", + "id": "53a28b26-5e5c-4bac-9b9d-016713bb0b2c", "name": "fn", "optional": false, "group": null, diff --git a/src/talemate/agents/creator/nodes.py b/src/talemate/agents/creator/nodes.py index 7f39f51d..4929badf 100644 --- a/src/talemate/agents/creator/nodes.py +++ b/src/talemate/agents/creator/nodes.py @@ -175,7 +175,7 @@ class ContextualGenerate(AgentNode): name="context_type", description="The type of context to use in generating the text", type="str", - choices=["character attribute", "character detail", "character dialogue", "scene intro", "scene intent", "scene phase intent", "scene type description", "scene type instructions", "general", "list"], + choices=["character attribute", "character detail", "character dialogue", "scene intro", "scene intent", "scene phase intent", "scene type description", "scene type instructions", "general", "list", "scene"], default="general" ) context_name = PropertyField(