fix(transcription): Behebt Start- und API-Fehler in der App [2f488f42]
This commit is contained in:
@@ -111,3 +111,38 @@ Please provide the output in Markdown format.
|
||||
|
||||
# You can add more prompts here for other analysis types.
|
||||
# For example, a prompt for a technical summary, a marketing summary, etc.
|
||||
|
||||
TRANSLATE_TRANSCRIPT_PROMPT = """
|
||||
You are a highly accurate and fluent translator.
|
||||
Your task is to translate the given meeting transcript into {target_language}.
|
||||
Maintain the original format (who said what) as closely as possible.
|
||||
|
||||
**Transcript:**
|
||||
---
|
||||
{transcript}
|
||||
---
|
||||
|
||||
**Output:**
|
||||
Provide only the translated text. Do not add any commentary or additional formatting.
|
||||
"""
|
||||
|
||||
_PROMPTS = {
|
||||
"meeting_minutes": MEETING_MINUTES_PROMPT,
|
||||
"action_items": ACTION_ITEMS_PROMPT,
|
||||
"sales_summary": SALES_SUMMARY_PROMPT,
|
||||
"translate_transcript": TRANSLATE_TRANSCRIPT_PROMPT,
|
||||
}
|
||||
|
||||
def get_prompt(prompt_type: str, context: dict = None) -> str:
|
||||
"""
|
||||
Retrieves a prompt by its type and formats it with the given context.
|
||||
"""
|
||||
prompt_template = _PROMPTS.get(prompt_type)
|
||||
if not prompt_template:
|
||||
raise ValueError(f"Unknown prompt type: {prompt_type}")
|
||||
|
||||
if context:
|
||||
return prompt_template.format(**context)
|
||||
|
||||
return prompt_template
|
||||
|
||||
|
||||
Reference in New Issue
Block a user