add chat sys prompts to settings
This commit is contained in:
@@ -210,7 +210,7 @@ Respond ONLY in JSON. "analysis" and "text" MUST be in Simplified Chinese:
|
||||
]
|
||||
}`;
|
||||
|
||||
export const CONVERSATION_REFINEMENT_PROMPT_TEMPLATE = `You are a professional conversation editor. Refine the [Current Translation] based on the [Audit Suggestions] and [Conversation History].
|
||||
export const CONVERSATION_REFINEMENT_PROMPT_TEMPLATE = `You are a professional conversation editor. Refine the [Current Translation] based on the [Original Source Text], [Audit Suggestions], and [Conversation History].
|
||||
|
||||
# Context Info
|
||||
- Role A (Me): {ME_NAME}, Gender: {ME_GENDER}, Language: {ME_LANG}.
|
||||
@@ -220,6 +220,9 @@ export const CONVERSATION_REFINEMENT_PROMPT_TEMPLATE = `You are a professional c
|
||||
[Conversation History]
|
||||
{HISTORY_BLOCK}
|
||||
|
||||
[Original Source Text]
|
||||
{ORIGINAL_TEXT}
|
||||
|
||||
[Current Translation]
|
||||
{CURRENT_TRANSLATION}
|
||||
|
||||
@@ -227,11 +230,11 @@ export const CONVERSATION_REFINEMENT_PROMPT_TEMPLATE = `You are a professional c
|
||||
{SUGGESTIONS}
|
||||
|
||||
# Task
|
||||
Produce a new, refined version of the translation that addresses the suggestions while remaining naturally integrated into the conversation flow.
|
||||
Produce a new, refined version of the translation that addresses the suggestions while staying true to the original meaning and natural conversation flow.
|
||||
|
||||
# Constraints
|
||||
1. Maintain semantic identity with the [Source Text].
|
||||
2. Strictly follow the {TARGET_TONE}.
|
||||
1. Maintain semantic identity with the [Original Source Text].
|
||||
2. Strictly follow the Target Tone.
|
||||
3. Output ONLY the refined translation text. No explanations.`;
|
||||
|
||||
export const useSettingsStore = defineStore('settings', () => {
|
||||
@@ -248,6 +251,10 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
const evaluationProfileId = useLocalStorage<string | null>('evaluation-profile-id', null);
|
||||
const refinementPromptTemplate = useLocalStorage('refinement-prompt-template', DEFAULT_REFINEMENT_TEMPLATE);
|
||||
|
||||
const chatSystemPromptTemplate = useLocalStorage('chat-system-prompt-template', CONVERSATION_SYSTEM_PROMPT_TEMPLATE);
|
||||
const chatEvaluationPromptTemplate = useLocalStorage('chat-evaluation-prompt-template', CONVERSATION_EVALUATION_PROMPT_TEMPLATE);
|
||||
const chatRefinementPromptTemplate = useLocalStorage('chat-refinement-prompt-template', CONVERSATION_REFINEMENT_PROMPT_TEMPLATE);
|
||||
|
||||
// 存储整个对象以保持一致性
|
||||
const sourceLang = useLocalStorage<Language>('source-lang-v2', LANGUAGES[0]);
|
||||
const targetLang = useLocalStorage<Language>('target-lang-v2', LANGUAGES[4]);
|
||||
@@ -391,6 +398,9 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
evaluationPromptTemplate,
|
||||
evaluationProfileId,
|
||||
refinementPromptTemplate,
|
||||
chatSystemPromptTemplate,
|
||||
chatEvaluationPromptTemplate,
|
||||
chatRefinementPromptTemplate,
|
||||
sourceLang,
|
||||
targetLang,
|
||||
speakerIdentity,
|
||||
|
||||
Reference in New Issue
Block a user