MVP 0.93 - stabile, aber Writing Profile ohne erkennbaren Nutzen
This commit is contained in:
1 parent
53b1eff833
commit
f17b3083e8
56 files changed
+5366
-784
No files matched your search
@@ -75,6 +75,9 @@ def build_internal_context(
|
||||
existing_text: str = "",
|
||||
reconstruction: str = "",
|
||||
day_spec: dict | None = None,
|
||||
style_examples: str = "",
|
||||
editorial_mode: str = "",
|
||||
editorial_instructions: str = "",
|
||||
) -> dict:
|
||||
purpose = purpose if purpose in PURPOSES else "dialogue_turn"
|
||||
if conversation_id and not space_id:
|
||||
@@ -150,6 +153,9 @@ 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 ""})
|
||||
if reconstruction:
|
||||
items.append({"type": "reconstruction", "body": reconstruction})
|
||||
if include_existing and existing_text:
|
||||
@@ -179,6 +185,9 @@ def assemble_text(context: dict) -> dict[str, str]:
|
||||
interaction_hint = ""
|
||||
existing_text = ""
|
||||
reconstruction = ""
|
||||
style_examples = ""
|
||||
editorial_mode = ""
|
||||
editorial_instructions = ""
|
||||
user_bodies: list[str] = []
|
||||
purpose = context.get("purpose") or ""
|
||||
for item in context.get("items") or []:
|
||||
@@ -218,6 +227,12 @@ def assemble_text(context: dict) -> dict[str, str]:
|
||||
existing_text = item.get("body") or ""
|
||||
elif kind == "reconstruction":
|
||||
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 == "opening":
|
||||
pass
|
||||
opening_hint = ""
|
||||
@@ -238,6 +253,9 @@ def assemble_text(context: dict) -> dict[str, str]:
|
||||
return {
|
||||
"dialogue_context": "\n".join(dialogue_parts).strip(),
|
||||
"writing_profile": writing_profile,
|
||||
"style_examples": style_examples,
|
||||
"editorial_mode": editorial_mode,
|
||||
"editorial_instructions": editorial_instructions,
|
||||
"interaction_hint": interaction_hint,
|
||||
"existing_text": existing_text,
|
||||
"reconstruction": reconstruction,
|
||||
|
||||
Reference in new issue
Block a user