Spaces:
Running
Running
Merge pull request #3 from DeltaZN/llm_agent_integration
Browse filesfix: correct typo in STORY_FRAME_PROMPT and enhance SCENE_PROMPT clarity
- src/agent/prompts.py +3 -1
- src/agent/tools.py +0 -1
src/agent/prompts.py
CHANGED
@@ -10,7 +10,7 @@ Return ONLY a JSON object with:
|
|
10 |
- milestones: 2-4 key events (id, description)
|
11 |
- endings: good/bad endings (id, type, condition, description)
|
12 |
Translate the lore, goal, milestones and endings into
|
13 |
-
a
|
14 |
"""
|
15 |
|
16 |
SCENE_PROMPT = """
|
@@ -21,6 +21,8 @@ Milestones: {milestones}
|
|
21 |
Endings: {endings}
|
22 |
History: {history}
|
23 |
Last choice: {last_choice}
|
|
|
|
|
24 |
Respond ONLY with JSON containing:
|
25 |
- description: short summary of the scene
|
26 |
- choices: exactly two dicts {{"text": ..., "next_scene_short_desc": ...}}
|
|
|
10 |
- milestones: 2-4 key events (id, description)
|
11 |
- endings: good/bad endings (id, type, condition, description)
|
12 |
Translate the lore, goal, milestones and endings into
|
13 |
+
a language of setting language.
|
14 |
"""
|
15 |
|
16 |
SCENE_PROMPT = """
|
|
|
21 |
Endings: {endings}
|
22 |
History: {history}
|
23 |
Last choice: {last_choice}
|
24 |
+
The scene description must be 2-3 sentences and no more than 50 words.
|
25 |
+
Each choice text must be concise, up to 7 words.
|
26 |
Respond ONLY with JSON containing:
|
27 |
- description: short summary of the scene
|
28 |
- choices: exactly two dicts {{"text": ..., "next_scene_short_desc": ...}}
|
src/agent/tools.py
CHANGED
@@ -122,7 +122,6 @@ async def generate_scene_image(
|
|
122 |
state = get_user_state(user_hash)
|
123 |
if scene_id in state.scenes:
|
124 |
state.scenes[scene_id].image = image_path
|
125 |
-
state.assets[scene_id] = image_path
|
126 |
set_user_state(user_hash, state)
|
127 |
return image_path
|
128 |
except Exception as exc: # noqa: BLE001
|
|
|
122 |
state = get_user_state(user_hash)
|
123 |
if scene_id in state.scenes:
|
124 |
state.scenes[scene_id].image = image_path
|
|
|
125 |
set_user_state(user_hash, state)
|
126 |
return image_path
|
127 |
except Exception as exc: # noqa: BLE001
|