MVP 0.94
This commit is contained in:
1 parent
f17b3083e8
commit
4f37991ad1
48 files changed
+4919
-540
No files matched your search
+24
-12
@@ -76,8 +76,10 @@ def build_internal_context(
|
||||
reconstruction: str = "",
|
||||
day_spec: dict | None = None,
|
||||
style_examples: str = "",
|
||||
editorial_mode: str = "",
|
||||
editorial_instructions: str = "",
|
||||
transformation_instructions: str = "",
|
||||
detail_instructions: str = "",
|
||||
voice_instructions: str = "",
|
||||
narrative_instructions: str = "",
|
||||
) -> dict:
|
||||
purpose = purpose if purpose in PURPOSES else "dialogue_turn"
|
||||
if conversation_id and not space_id:
|
||||
@@ -154,8 +156,10 @@ def build_internal_context(
|
||||
brief = compile_task_brief(profile_id, "journal_generate")
|
||||
items.append({"type": "writing_profile", "compiled_brief": brief})
|
||||
items.append({"type": "style_examples", "body": style_examples or ""})
|
||||
items.append({"type": "editorial_mode", "text": editorial_mode or ""})
|
||||
items.append({"type": "editorial_instructions", "text": editorial_instructions or ""})
|
||||
items.append({"type": "transformation_instructions", "text": transformation_instructions or ""})
|
||||
items.append({"type": "detail_instructions", "text": detail_instructions or ""})
|
||||
items.append({"type": "voice_instructions", "text": voice_instructions or ""})
|
||||
items.append({"type": "narrative_instructions", "text": narrative_instructions or ""})
|
||||
if reconstruction:
|
||||
items.append({"type": "reconstruction", "body": reconstruction})
|
||||
if include_existing and existing_text:
|
||||
@@ -186,8 +190,10 @@ def assemble_text(context: dict) -> dict[str, str]:
|
||||
existing_text = ""
|
||||
reconstruction = ""
|
||||
style_examples = ""
|
||||
editorial_mode = ""
|
||||
editorial_instructions = ""
|
||||
transformation_instructions = ""
|
||||
detail_instructions = ""
|
||||
voice_instructions = ""
|
||||
narrative_instructions = ""
|
||||
user_bodies: list[str] = []
|
||||
purpose = context.get("purpose") or ""
|
||||
for item in context.get("items") or []:
|
||||
@@ -229,10 +235,14 @@ def assemble_text(context: dict) -> dict[str, str]:
|
||||
reconstruction = item.get("body") or ""
|
||||
elif kind == "style_examples":
|
||||
style_examples = item.get("body") or ""
|
||||
elif kind == "editorial_mode":
|
||||
editorial_mode = item.get("text") or ""
|
||||
elif kind == "editorial_instructions":
|
||||
editorial_instructions = item.get("text") or ""
|
||||
elif kind == "transformation_instructions":
|
||||
transformation_instructions = item.get("text") or ""
|
||||
elif kind == "detail_instructions":
|
||||
detail_instructions = item.get("text") or ""
|
||||
elif kind == "voice_instructions":
|
||||
voice_instructions = item.get("text") or ""
|
||||
elif kind == "narrative_instructions":
|
||||
narrative_instructions = item.get("text") or ""
|
||||
elif kind == "opening":
|
||||
pass
|
||||
opening_hint = ""
|
||||
@@ -254,8 +264,10 @@ def assemble_text(context: dict) -> dict[str, str]:
|
||||
"dialogue_context": "\n".join(dialogue_parts).strip(),
|
||||
"writing_profile": writing_profile,
|
||||
"style_examples": style_examples,
|
||||
"editorial_mode": editorial_mode,
|
||||
"editorial_instructions": editorial_instructions,
|
||||
"transformation_instructions": transformation_instructions,
|
||||
"detail_instructions": detail_instructions,
|
||||
"voice_instructions": voice_instructions,
|
||||
"narrative_instructions": narrative_instructions,
|
||||
"interaction_hint": interaction_hint,
|
||||
"existing_text": existing_text,
|
||||
"reconstruction": reconstruction,
|
||||
|
||||
Reference in new issue
Block a user