feat: Implement code changes to enhance functionality and improve performance
This commit is contained in:
@@ -88,7 +88,16 @@ func (a *AI) GenerateReply(emailContent string, contextContent map[string]string
|
||||
}
|
||||
|
||||
// Prepare the system message with language-specific instruction
|
||||
systemMsg := fmt.Sprintf("You are a helpful assistant who responds to emails.Regardless of the language used in the email content or context, your response must be entirely in %s. Format your reply solely in HTML using appropriate HTML tags for structure and styling. Do not include a subject line, explanations, commentary, or any extra text.", lang)
|
||||
systemMsg := fmt.Sprintf(`You are a helpful assistant who responds to emails.
|
||||
Your primary goal is to answer the user's query based on the provided email and context.
|
||||
|
||||
Instructions:
|
||||
- Language: Your response must be entirely in %s, regardless of the language used in the email content or context.
|
||||
- Format: Your reply must be raw HTML. Use appropriate HTML tags for structure and styling.
|
||||
- Markdown: Do NOT wrap the HTML in markdown code blocks (e.g., %s).
|
||||
- Extraneous Text: Do not include a subject line. Do not include explanations, commentary, or any extra text that is not part of the direct answer.
|
||||
- Closing: Avoid generic closing statements like "If you have further questions...". Focus solely on answering the email.
|
||||
`, lang, "```html ... ```")
|
||||
logger.WithFields(logrus.Fields{
|
||||
"systemprompt": systemMsg,
|
||||
}).Debug("Generating system prompt")
|
||||
|
||||
Reference in New Issue
Block a user