Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions echo/server/dembrane/api/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,11 +878,14 @@ async def generate_verification_artifacts(
except Exception as exc:
logger.warning("Failed to attach audio chunk %s: %s", chunk_id, exc)

project_language = (conversation.get("project_id") or {}).get("language") or "en"

system_prompt = render_prompt(
"generate_artifact",
"en",
{
"prompt": target_topic.prompt,
"language": project_language,
},
)

Expand Down Expand Up @@ -973,6 +976,9 @@ async def update_verification_artifact(
reference_conversation_id = body.use_conversation.conversation_id
reference_timestamp = body.use_conversation.timestamp

conversation = await _get_conversation_with_project(reference_conversation_id, client)
project_language = (conversation.get("project_id") or {}).get("language") or "en"

chunks = await _get_conversation_chunks(reference_conversation_id, client)

conversation_transcript = _build_transcript_text(chunks)
Expand All @@ -995,6 +1001,7 @@ async def update_verification_artifact(
"transcript": conversation_transcript or "No transcript available.",
"outcome": artifact.get("content") or "",
"feedback": feedback_text or "No textual feedback available.",
"language": project_language,
},
)

Expand Down
6 changes: 5 additions & 1 deletion echo/server/prompt_templates/generate_artifact.en.jinja
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
You will receive a conversation transcript (and optionally audio fragments). Turn it into a concrete outcome that captures key decisions or insights.

Project language: {{ language }}
Your entire response MUST be written in {{ language }}. The participants expect to read the outcome in this language.

Specific Ask:
{{ prompt }}

Guidelines:

Start with a clear title that reflects what was discussed
Skip preambles—go directly to the outcome
Use "we/our" language for collective ownership
Be concise but complete enough to stand alone
Include context for future readers
Match the transcript's language
Acknowledge uncertainty when present
Make it feel worth signing—true, not perfect
5 changes: 4 additions & 1 deletion echo/server/prompt_templates/revise_artifact.en.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ A conversation transcript
An outcome artifact summarizing that conversation
Participant feedback on the outcome

Project language: {{ language }}
Your entire response MUST be written in {{ language }}. The participants expect to read the revised outcome in this language.

Transcript:
{{ transcript }}
Outcome:
Expand All @@ -19,5 +22,5 @@ Integrate all changes naturally into the main content—don't append meta-commen
Address whatever participants need: add missing details, clarify ambiguities, expand on nuances, or correct errors
State what something is, not what it isn't (avoid "X is not Y" unless essential)
Maintain coherent structure even when adding depth or detail
Match the original language and tone
Maintain the original tone
Remove any references to the feedback process itself
Loading