2023-03-08 03:28:26 +09:00
|
|
|
package prompts
|
|
|
|
|
2023-03-08 05:25:20 +09:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"strings"
|
|
|
|
)
|
2023-03-08 03:28:26 +09:00
|
|
|
|
|
|
|
func General() string {
|
|
|
|
return "You are a helpful assistant."
|
|
|
|
}
|
|
|
|
|
|
|
|
func Translate(targetLang string) string {
|
|
|
|
return fmt.Sprintf(
|
2023-03-08 05:25:20 +09:00
|
|
|
strings.Join([]string{
|
|
|
|
"You are a helpful assistant.",
|
|
|
|
"Your task is to help translate the text sent by the user into %s.",
|
|
|
|
"You should never interpret the user's text, but only translate it.",
|
|
|
|
"You should structure the translated text to sound natural in native %s while keeping the meanings unchanged.",
|
|
|
|
"If the user's text contains only a single word, please also add a brief explanation in %s, of the meaning of the original word.",
|
|
|
|
"The first text to be translated is:",
|
|
|
|
}, " \n"),
|
|
|
|
targetLang, targetLang, targetLang,
|
2023-03-08 03:28:26 +09:00
|
|
|
)
|
|
|
|
}
|